lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201910140915.Lgnfkkdd%lkp@intel.com>
Date:   Mon, 14 Oct 2019 09:21:29 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Joe Perches <joe@...ches.com>
Cc:     kbuild-all@...ts.01.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Corey Minyard <minyard@....org>,
        openipmi-developer@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipmi: Convert ipmi_debug_msg to pr_debug and use %*ph

Hi Joe,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[cannot apply to v5.4-rc2 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Joe-Perches/ipmi-Convert-ipmi_debug_msg-to-pr_debug-and-use-ph/20191014-051352
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/char/ipmi/ipmi_msghandler.c: In function 'i_ipmi_request':
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'unsigned char *' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/char/ipmi/ipmi_msghandler.c:2251:3: note: in expansion of macro 'pr_debug'
      pr_debug("%s: %*ph\n",
      ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:2251:18: note: format string is defined here
      pr_debug("%s: %*ph\n",
                    ~^~
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'int' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
>> drivers/char/ipmi/ipmi_msghandler.c:2251:3: note: in expansion of macro 'pr_debug'
      pr_debug("%s: %*ph\n",
      ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:2251:19: note: format string is defined here
      pr_debug("%s: %*ph\n",
                    ~~^
                    %*d
   drivers/char/ipmi/ipmi_msghandler.c: In function 'handle_ipmb_get_msg_cmd':
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'unsigned char *' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:3715:3: note: in expansion of macro 'pr_debug'
      pr_debug("%s: %*ph\n",
      ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:3715:18: note: format string is defined here
      pr_debug("%s: %*ph\n",
                    ~^~
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'int' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:3715:3: note: in expansion of macro 'pr_debug'
      pr_debug("%s: %*ph\n",
      ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:3715:19: note: format string is defined here
      pr_debug("%s: %*ph\n",
                    ~~^
                    %*d
   drivers/char/ipmi/ipmi_msghandler.c: In function 'handle_one_recv_msg':
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'unsigned char *' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4203:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s: %*ph\n", "Recv", msg->rsp, msg->rsp_size);
     ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4203:17: note: format string is defined here
     pr_debug("%s: %*ph\n", "Recv", msg->rsp, msg->rsp_size);
                   ~^~
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'int' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4203:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s: %*ph\n", "Recv", msg->rsp, msg->rsp_size);
     ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4203:18: note: format string is defined here
     pr_debug("%s: %*ph\n", "Recv", msg->rsp, msg->rsp_size);
                   ~~^
                   %*d
   drivers/char/ipmi/ipmi_msghandler.c: In function 'smi_from_recv_msg':
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'unsigned char *' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4562:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s: %*ph\n", "Resend", smi_msg->data, smi_msg->data_size);
     ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4562:17: note: format string is defined here
     pr_debug("%s: %*ph\n", "Resend", smi_msg->data, smi_msg->data_size);
                   ~^~
>> drivers/char/ipmi/ipmi_msghandler.c:14:21: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'int' [-Wformat=]
    #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
                        ^
   include/linux/dynamic_debug.h:125:15: note: in expansion of macro 'pr_fmt'
      func(&id, ##__VA_ARGS__);  \
                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     _dynamic_func_call(fmt, __dynamic_pr_debug,  \
     ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4562:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s: %*ph\n", "Resend", smi_msg->data, smi_msg->data_size);
     ^~~~~~~~
   drivers/char/ipmi/ipmi_msghandler.c:4562:18: note: format string is defined here
     pr_debug("%s: %*ph\n", "Resend", smi_msg->data, smi_msg->data_size);
                   ~~^
                   %*d

vim +14 drivers/char/ipmi/ipmi_msghandler.c

445e2cbda928a3 Joe Perches 2018-05-09 @14  #define pr_fmt(fmt) "%s" fmt, "IPMI message handler: "
445e2cbda928a3 Joe Perches 2018-05-09  15  #define dev_fmt pr_fmt
445e2cbda928a3 Joe Perches 2018-05-09  16  

:::::: The code at line 14 was first introduced by commit
:::::: 445e2cbda928a3523c1c1da76788d19df52611c8 ipmi: msghandler: Add and use pr_fmt and dev_fmt, remove PFX

:::::: TO: Joe Perches <joe@...ches.com>
:::::: CC: Corey Minyard <cminyard@...sta.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (59075 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ