public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: include/linux/dev_printk.h:110:2: warning: '%s' directive argument is null
Date: Thu, 25 Jan 2024 18:32:48 +0800	[thread overview]
Message-ID: <202401251824.Vie9Sa4X-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6098d87eaf31f48153c984e2adadf14762520a87
commit: af628aae8640c268938a0c9344b4ec0d102c0a0a device.h: move dev_printk()-like functions to dev_printk.h
date:   4 years, 1 month ago
config: x86_64-randconfig-012-20240106 (https://download.01.org/0day-ci/archive/20240125/202401251824.Vie9Sa4X-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240125/202401251824.Vie9Sa4X-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/202401251824.Vie9Sa4X-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/input/mouse/synaptics.c: In function 'synaptics_process_packet':
   drivers/input/mouse/synaptics.c:1103:6: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1103 |      ;   /* Nothing, treat a pen as a single finger */
         |      ^
   In file included from include/linux/device.h:15,
                    from include/linux/input.h:19,
                    from include/linux/input/mt.h:11,
                    from drivers/input/mouse/synaptics.c:26:
   drivers/input/mouse/synaptics.c: In function 'synaptics_init_ps2':
>> include/linux/dev_printk.h:110:2: warning: '%s' directive argument is null [-Wformat-overflow=]
     110 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/input/mouse/psmouse.h:202:2: note: in expansion of macro 'dev_info'
     202 |  dev_info(&(psmouse)->ps2dev.serio->dev,  \
         |  ^~~~~~~~
   drivers/input/mouse/synaptics.c:1628:3: note: in expansion of macro 'psmouse_info'
    1628 |   psmouse_info(psmouse,
         |   ^~~~~~~~~~~~


vim +110 include/linux/dev_printk.h

    91	
    92	/*
    93	 * #defines for all the dev_<level> macros to prefix with whatever
    94	 * possible use of #define dev_fmt(fmt) ...
    95	 */
    96	
    97	#define dev_emerg(dev, fmt, ...)					\
    98		_dev_emerg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    99	#define dev_crit(dev, fmt, ...)						\
   100		_dev_crit(dev, dev_fmt(fmt), ##__VA_ARGS__)
   101	#define dev_alert(dev, fmt, ...)					\
   102		_dev_alert(dev, dev_fmt(fmt), ##__VA_ARGS__)
   103	#define dev_err(dev, fmt, ...)						\
   104		_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
   105	#define dev_warn(dev, fmt, ...)						\
   106		_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
   107	#define dev_notice(dev, fmt, ...)					\
   108		_dev_notice(dev, dev_fmt(fmt), ##__VA_ARGS__)
   109	#define dev_info(dev, fmt, ...)						\
 > 110		_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
   111	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-01-25 10:33 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=202401251824.Vie9Sa4X-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox