All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [linux-next:master 12773/13763] include/linux/dev_printk.h:154:24: warning: 'len' is used uninitialized in this function
Date: Sun, 14 Jun 2026 13:20:40 +0800	[thread overview]
Message-ID: <202606141301.iyVdFgl7-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c425609d6ac4012c8bbf01ec2e10e801b1923a7b
commit: 4f2692a5383e4bdd43ae940cda012360f7217a2d [12773/13763] mtd: rawnand: ndfc: use ioread32be/iowrite32be and allow COMPILE_TEST
config: alpha-randconfig-r062-20260614 (https://download.01.org/0day-ci/archive/20260614/202606141301.iyVdFgl7-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260614/202606141301.iyVdFgl7-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/202606141301.iyVdFgl7-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/mtd/mtd.h:13,
                    from include/linux/mtd/rawnand.h:16,
                    from drivers/mtd/nand/raw/ndfc.c:20:
   drivers/mtd/nand/raw/ndfc.c: In function 'ndfc_probe':
>> include/linux/dev_printk.h:154:24: warning: 'len' is used uninitialized in this function [-Wuninitialized]
     dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
                           ^~~~~~~~
   drivers/mtd/nand/raw/ndfc.c:191:11: note: 'len' was declared here
     int err, len;
              ^~~


vim +/len +154 include/linux/dev_printk.h

af628aae8640c26 Greg Kroah-Hartman 2019-12-09   99  
ad7d61f159db739 Chris Down         2021-06-15  100  /*
ad7d61f159db739 Chris Down         2021-06-15  101   * Need to take variadic arguments even though we don't use them, as dev_fmt()
ad7d61f159db739 Chris Down         2021-06-15  102   * may only just have been expanded and may result in multiple arguments.
ad7d61f159db739 Chris Down         2021-06-15  103   */
ad7d61f159db739 Chris Down         2021-06-15  104  #define dev_printk_index_emit(level, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  105  	printk_index_subsys_emit("%s %s: ", level, fmt)
ad7d61f159db739 Chris Down         2021-06-15  106  
ad7d61f159db739 Chris Down         2021-06-15  107  #define dev_printk_index_wrap(_p_func, level, dev, fmt, ...)		\
ad7d61f159db739 Chris Down         2021-06-15  108  	({								\
ad7d61f159db739 Chris Down         2021-06-15  109  		dev_printk_index_emit(level, fmt);			\
ad7d61f159db739 Chris Down         2021-06-15  110  		_p_func(dev, fmt, ##__VA_ARGS__);			\
ad7d61f159db739 Chris Down         2021-06-15  111  	})
ad7d61f159db739 Chris Down         2021-06-15  112  
ad7d61f159db739 Chris Down         2021-06-15  113  /*
ad7d61f159db739 Chris Down         2021-06-15  114   * Some callsites directly call dev_printk rather than going through the
ad7d61f159db739 Chris Down         2021-06-15  115   * dev_<level> infrastructure, so we need to emit here as well as inside those
ad7d61f159db739 Chris Down         2021-06-15  116   * level-specific macros. Only one index entry will be produced, either way,
ad7d61f159db739 Chris Down         2021-06-15  117   * since dev_printk's `fmt` isn't known at compile time if going through the
ad7d61f159db739 Chris Down         2021-06-15  118   * dev_<level> macros.
ad7d61f159db739 Chris Down         2021-06-15  119   *
ad7d61f159db739 Chris Down         2021-06-15  120   * dev_fmt() isn't called for dev_printk when used directly, as it's used by
ad7d61f159db739 Chris Down         2021-06-15  121   * the dev_<level> macros internally which already have dev_fmt() processed.
ad7d61f159db739 Chris Down         2021-06-15  122   *
ad7d61f159db739 Chris Down         2021-06-15  123   * We also can't use dev_printk_index_wrap directly, because we have a separate
ad7d61f159db739 Chris Down         2021-06-15  124   * level to process.
ad7d61f159db739 Chris Down         2021-06-15  125   */
ad7d61f159db739 Chris Down         2021-06-15  126  #define dev_printk(level, dev, fmt, ...)				\
ad7d61f159db739 Chris Down         2021-06-15  127  	({								\
ad7d61f159db739 Chris Down         2021-06-15  128  		dev_printk_index_emit(level, fmt);			\
ad7d61f159db739 Chris Down         2021-06-15  129  		_dev_printk(level, dev, fmt, ##__VA_ARGS__);		\
ad7d61f159db739 Chris Down         2021-06-15  130  	})
ad7d61f159db739 Chris Down         2021-06-15  131  
c26ec799042a388 Geert Uytterhoeven 2024-02-28  132  /*
c26ec799042a388 Geert Uytterhoeven 2024-02-28  133   * Dummy dev_printk for disabled debugging statements to use whilst maintaining
c26ec799042a388 Geert Uytterhoeven 2024-02-28  134   * gcc's format checking.
c26ec799042a388 Geert Uytterhoeven 2024-02-28  135   */
c26ec799042a388 Geert Uytterhoeven 2024-02-28  136  #define dev_no_printk(level, dev, fmt, ...)				\
c26ec799042a388 Geert Uytterhoeven 2024-02-28  137  	({								\
c26ec799042a388 Geert Uytterhoeven 2024-02-28  138  		if (0)							\
c26ec799042a388 Geert Uytterhoeven 2024-02-28  139  			_dev_printk(level, dev, fmt, ##__VA_ARGS__);	\
c26ec799042a388 Geert Uytterhoeven 2024-02-28  140  	})
c26ec799042a388 Geert Uytterhoeven 2024-02-28  141  
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  142  /*
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  143   * #defines for all the dev_<level> macros to prefix with whatever
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  144   * possible use of #define dev_fmt(fmt) ...
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  145   */
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  146  
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  147  #define dev_emerg(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  148  	dev_printk_index_wrap(_dev_emerg, KERN_EMERG, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  149  #define dev_crit(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  150  	dev_printk_index_wrap(_dev_crit, KERN_CRIT, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  151  #define dev_alert(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  152  	dev_printk_index_wrap(_dev_alert, KERN_ALERT, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  153  #define dev_err(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15 @154  	dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  155  #define dev_warn(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  156  	dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  157  #define dev_notice(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  158  	dev_printk_index_wrap(_dev_notice, KERN_NOTICE, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  159  #define dev_info(dev, fmt, ...) \
ad7d61f159db739 Chris Down         2021-06-15  160  	dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
af628aae8640c26 Greg Kroah-Hartman 2019-12-09  161  

:::::: The code at line 154 was first introduced by commit
:::::: ad7d61f159db73974f1b0352f21afe04b0bbd920 printk: index: Add indexing support to dev_printk

:::::: TO: Chris Down <chris@chrisdown.name>
:::::: CC: Petr Mladek <pmladek@suse.com>

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

                 reply	other threads:[~2026-06-14  5:21 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=202606141301.iyVdFgl7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rosenp@gmail.com \
    /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.