Skip to content

Commit

Permalink
scsi: mpi3mr: Add level check to control event logging
Browse files Browse the repository at this point in the history
Ensure event logs are only generated when the debug logging level
MPI3_DEBUG_EVENT is enabled. This prevents unnecessary logging.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20250415101546.204018-1-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Ranjan Kumar authored and Martin K. Petersen committed Apr 22, 2025
1 parent 08a966a commit b0b7ee3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/mpi3mr/mpi3mr_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc,
char *desc = NULL;
u16 event;

if (!(mrioc->logging_level & MPI3_DEBUG_EVENT))
return;

event = event_reply->event;

switch (event) {
Expand Down

0 comments on commit b0b7ee3

Please sign in to comment.