From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [bvanassche:scsi-sdev-printk 1/2] drivers/scsi/scsi_logging_test.c:36:11: warning: diagnostic behavior may be improved by adding the 'format(printf, 3, 0)' attribute to the declaration of 'test_capture_dev_printk'
Date: Tue, 18 Aug 2026 14:55:58 +0800 [thread overview]
Message-ID: <202608181453.gR1dacPX-lkp@intel.com> (raw)
tree: https://github.com/bvanassche/linux scsi-sdev-printk
head: a31bd03242fd8e9fc6f3b0b5f48ca64bbb6c8f4c
commit: 3046a51bbd1826503f7037dd728fa56f87b73c23 [1/2] scsi: core: Add KUnit tests for scsi_logging.c
config: arm-randconfig-r072-20260818 (https://download.01.org/0day-ci/archive/20260818/202608181453.gR1dacPX-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 844a18e753e822736c9805ab779144b647a2c186)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/202608181453.gR1dacPX-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608181453.gR1dacPX-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/scsi/scsi_logging.c:467:
>> drivers/scsi/scsi_logging_test.c:36:11: warning: diagnostic behavior may be improved by adding the 'format(printf, 3, 0)' attribute to the declaration of 'test_capture_dev_printk' [-Wmissing-format-attribute]
28 | static void test_capture_dev_printk(const char *level, const struct device *dev,
| __attribute__((format(printf, 3, 0)))
29 | const char *fmt, va_list args)
30 | {
31 | if (captured_count < MAX_CAPTURED_LINES) {
32 | captured_logs[captured_count].level = level;
33 | captured_logs[captured_count].dev = dev;
34 | vscnprintf(captured_logs[captured_count].msg,
35 | sizeof(captured_logs[captured_count].msg), fmt,
36 | args);
| ^
drivers/scsi/scsi_logging_test.c:28:13: note: 'test_capture_dev_printk' declared here
28 | static void test_capture_dev_printk(const char *level, const struct device *dev,
| ^
1 warning generated.
vim +36 drivers/scsi/scsi_logging_test.c
27
28 static void test_capture_dev_printk(const char *level, const struct device *dev,
29 const char *fmt, va_list args)
30 {
31 if (captured_count < MAX_CAPTURED_LINES) {
32 captured_logs[captured_count].level = level;
33 captured_logs[captured_count].dev = dev;
34 vscnprintf(captured_logs[captured_count].msg,
35 sizeof(captured_logs[captured_count].msg), fmt,
> 36 args);
37 captured_count++;
38 }
39 }
40
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-18 6:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608181453.gR1dacPX-lkp@intel.com \
--to=lkp@intel.com \
--cc=bvanassche@acm.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.