aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <[email protected]>2021-03-12 09:47:26 +0000
committerMartin K. Petersen <[email protected]>2021-03-15 22:28:58 -0400
commit1c666a3e0a54e0d6df6dee5790cc93ed69aff095 (patch)
tree7eac2000c3811e05e13622c72459aaaa11e01a78
parent181883786427dab3f89724993c407c5831df09e3 (diff)
scsi: esas2r: Supply __printf(x, y) formatting for esas2r_log_master()
Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_log.c: In function ‘esas2r_log_master’: drivers/scsi/esas2r/esas2r_log.c:155:3: warning: function ‘esas2r_log_master’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Link: https://lore.kernel.org/r/[email protected] Cc: Bradley Grove <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/esas2r/esas2r_log.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/esas2r/esas2r_log.c b/drivers/scsi/esas2r/esas2r_log.c
index b545798e400c..d6c87a0bae09 100644
--- a/drivers/scsi/esas2r/esas2r_log.c
+++ b/drivers/scsi/esas2r/esas2r_log.c
@@ -101,6 +101,11 @@ static const char *translate_esas2r_event_level_to_kernel(const long level)
}
}
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
+
/*
* the master logging function. this function will format the message as
* outlined by the formatting string, the input device information and the
@@ -170,6 +175,8 @@ static int esas2r_log_master(const long level,
return 0;
}
+#pragma GCC diagnostic pop
+
/*
* formats and logs a message to the system log.
*