From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [frank-w-bpi-r2-4.14:5.14-rc 6/24] drivers/misc/mediatek/btif/common/plat_inc/plat_common.h:64:9: warning: function 'hal_log_print' might be a candidate for 'gnu_printf' format attribute
Date: Sun, 22 Aug 2021 00:54:42 +0800 [thread overview]
Message-ID: <202108220036.rcARASQb-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7076 bytes --]
tree: https://github.com/frank-w/BPI-R2-4.14 5.14-rc
head: 15ab19c94d88070dd93ad282b83ff856be6092fc
commit: 6c7a57f4d7a96ee09d6aacbdac04d2f3b3da24f6 [6/24] mt6625l: include wifi-code
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/frank-w/BPI-R2-4.14/commit/6c7a57f4d7a96ee09d6aacbdac04d2f3b3da24f6
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.14-rc
git checkout 6c7a57f4d7a96ee09d6aacbdac04d2f3b3da24f6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/misc/mediatek/btif/common/plat_inc/btif_pub.h:17,
from drivers/misc/mediatek/btif/common/mtk_btif.c:37:
drivers/misc/mediatek/btif/common/plat_inc/plat_common.h: In function 'hal_log_print':
>> drivers/misc/mediatek/btif/common/plat_inc/plat_common.h:64:9: warning: function 'hal_log_print' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
64 | vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args);
| ^~~~~~~~~
drivers/misc/mediatek/btif/common/mtk_btif.c: In function 'mtk_btif_restore_noirq':
>> drivers/misc/mediatek/btif/common/mtk_btif.c:379:13: warning: variable 'i_ret' set but not used [-Wunused-but-set-variable]
379 | int i_ret = 0;
| ^~~~~
drivers/misc/mediatek/btif/common/mtk_btif.c: In function 'flag_store':
>> drivers/misc/mediatek/btif/common/mtk_btif.c:773:13: warning: variable 'result' set but not used [-Wunused-but-set-variable]
773 | int result = 0;
| ^~~~~~
drivers/misc/mediatek/btif/common/mtk_btif.c: In function 'btif_log_buf_dmp_out':
>> drivers/misc/mediatek/btif/common/mtk_btif.c:3029:24: warning: variable 'p_buf' set but not used [-Wunused-but-set-variable]
3029 | unsigned char *p_buf = NULL;
| ^~~~~
--
In file included from drivers/misc/mediatek/btif/common/plat_inc/btif_pub.h:17,
from drivers/misc/mediatek/btif/common/inc/mtk_btif.h:37,
from drivers/misc/mediatek/btif/common/mtk_btif_exp.c:20:
drivers/misc/mediatek/btif/common/plat_inc/plat_common.h: In function 'hal_log_print':
>> drivers/misc/mediatek/btif/common/plat_inc/plat_common.h:64:9: warning: function 'hal_log_print' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
64 | vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args);
| ^~~~~~~~~
--
In file included from drivers/misc/mediatek/btif/common/plat_inc/btif_dma_pub.h:19,
from drivers/misc/mediatek/btif/common/plat_inc/btif_dma_priv.h:18,
from drivers/misc/mediatek/btif/common/btif_dma_plat.c:22:
drivers/misc/mediatek/btif/common/plat_inc/plat_common.h: In function 'hal_log_print':
>> drivers/misc/mediatek/btif/common/plat_inc/plat_common.h:64:9: warning: function 'hal_log_print' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
64 | vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args);
| ^~~~~~~~~
drivers/misc/mediatek/btif/common/btif_dma_plat.c: In function 'hal_dma_pm_ops':
>> drivers/misc/mediatek/btif/common/btif_dma_plat.c:1313:38: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
1313 | unsigned int flag = 0;
| ^~~~
--
In file included from drivers/misc/mediatek/btif/common/plat_inc/btif_pub.h:17,
from drivers/misc/mediatek/btif/common/btif_plat.c:21:
drivers/misc/mediatek/btif/common/plat_inc/plat_common.h: In function 'hal_log_print':
>> drivers/misc/mediatek/btif/common/plat_inc/plat_common.h:64:9: warning: function 'hal_log_print' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
64 | vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args);
| ^~~~~~~~~
drivers/misc/mediatek/btif/common/btif_plat.c: In function 'hal_btif_hw_init':
>> drivers/misc/mediatek/btif/common/btif_plat.c:516:39: warning: implicit conversion from 'enum <anonymous>' to 'ENUM_BTIF_MODE' {aka 'enum _ENUM_BTIF_MODE_'} [-Wenum-conversion]
516 | hal_btif_tx_mode_ctrl(p_btif, false);
| ^~~~~
drivers/misc/mediatek/btif/common/btif_plat.c:518:39: warning: implicit conversion from 'enum <anonymous>' to 'ENUM_BTIF_MODE' {aka 'enum _ENUM_BTIF_MODE_'} [-Wenum-conversion]
518 | hal_btif_rx_mode_ctrl(p_btif, false);
| ^~~~~
drivers/misc/mediatek/btif/common/btif_plat.c: In function 'hal_btif_pm_ops':
>> drivers/misc/mediatek/btif/common/btif_plat.c:1343:38: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
1343 | unsigned int flag = 0;
| ^~~~
vim +64 drivers/misc/mediatek/btif/common/plat_inc/plat_common.h
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 56
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 57 /*Log defination*/
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 58 static int hal_log_print(const char *str, ...)
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 59 {
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 60 va_list args;
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 61 char temp_sring[DBG_LOG_STR_SIZE];
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 62
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 63 va_start(args, str);
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 @64 vsnprintf(temp_sring, DBG_LOG_STR_SIZE, str, args);
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 65 va_end(args);
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 66
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 67 pr_err("%s", temp_sring);
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 68
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 69 return 0;
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 70 }
eca6cb9d1200e7 Frank Wunderlich 2021-07-12 71
:::::: The code at line 64 was first introduced by commit
:::::: eca6cb9d1200e774a42a7dd581e3ce064081bdec mt6625l: add driver folder from 5.13
:::::: TO: Frank Wunderlich <frank-w@public-files.de>
:::::: CC: Frank Wunderlich <frank-w@public-files.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 78738 bytes --]
reply other threads:[~2021-08-21 16:54 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=202108220036.rcARASQb-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.