From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] nfc: s3fwrn5: fix undefined parameter values in dev_err()
Date: Wed, 28 Jul 2021 00:59:47 +0800 [thread overview]
Message-ID: <202107280053.BcO8iMjs-lkp@intel.com> (raw)
In-Reply-To: <20210727122506.6900-1-tangbin@cmss.chinamobile.com>
[-- Attachment #1: Type: text/plain, Size: 5452 bytes --]
Hi Tang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[cannot apply to net/master linus/master v5.14-rc3 next-20210726]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Tang-Bin/nfc-s3fwrn5-fix-undefined-parameter-values-in-dev_err/20210727-202559
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b0e81817629a496854ff1799f6cbd89597db65fd
config: h8300-randconfig-r032-20210727 (attached as .config)
compiler: h8300-linux-gcc (GCC) 10.3.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/0day-ci/linux/commit/6800fa99883890b135346d9fb8fff11b50426812
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tang-Bin/nfc-s3fwrn5-fix-undefined-parameter-values-in-dev_err/20210727-202559
git checkout 6800fa99883890b135346d9fb8fff11b50426812
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=h8300
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 include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/irqchip.h:14,
from arch/h8300/include/asm/irq.h:5,
from include/linux/irq.h:23,
from include/asm-generic/hardirq.h:17,
from ./arch/h8300/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/net/nfc/nci_core.h:20,
from drivers/nfc/s3fwrn5/s3fwrn5.h:14,
from drivers/nfc/s3fwrn5/firmware.c:14:
drivers/nfc/s3fwrn5/firmware.c: In function 's3fwrn5_fw_download':
>> drivers/nfc/s3fwrn5/firmware.c:425:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
425 | "Cannot allocate shash (code=%d)\n", PTR_ERR(tfm));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/nfc/s3fwrn5/firmware.c:424:3: note: in expansion of macro 'dev_err'
424 | dev_err(&fw_info->ndev->nfc_dev->dev,
| ^~~~~~~
drivers/nfc/s3fwrn5/firmware.c:425:34: note: format string is defined here
425 | "Cannot allocate shash (code=%d)\n", PTR_ERR(tfm));
| ~^
| |
| int
| %ld
vim +425 drivers/nfc/s3fwrn5/firmware.c
409
410 int s3fwrn5_fw_download(struct s3fwrn5_fw_info *fw_info)
411 {
412 struct s3fwrn5_fw_image *fw = &fw_info->fw;
413 u8 hash_data[SHA1_DIGEST_SIZE];
414 struct crypto_shash *tfm;
415 u32 image_size, off;
416 int ret;
417
418 image_size = fw_info->sector_size * fw->image_sectors;
419
420 /* Compute SHA of firmware data */
421
422 tfm = crypto_alloc_shash("sha1", 0, 0);
423 if (IS_ERR(tfm)) {
424 dev_err(&fw_info->ndev->nfc_dev->dev,
> 425 "Cannot allocate shash (code=%d)\n", PTR_ERR(tfm));
426 return PTR_ERR(tfm);
427 }
428
429 ret = crypto_shash_tfm_digest(tfm, fw->image, image_size, hash_data);
430
431 crypto_free_shash(tfm);
432 if (ret) {
433 dev_err(&fw_info->ndev->nfc_dev->dev,
434 "Cannot compute hash (code=%d)\n", ret);
435 return ret;
436 }
437
438 /* Firmware update process */
439
440 dev_info(&fw_info->ndev->nfc_dev->dev,
441 "Firmware update: %s\n", fw_info->fw_name);
442
443 ret = s3fwrn5_fw_enter_update_mode(fw_info, hash_data,
444 SHA1_DIGEST_SIZE, fw_info->sig, fw_info->sig_size);
445 if (ret < 0) {
446 dev_err(&fw_info->ndev->nfc_dev->dev,
447 "Unable to enter update mode\n");
448 return ret;
449 }
450
451 for (off = 0; off < image_size; off += fw_info->sector_size) {
452 ret = s3fwrn5_fw_update_sector(fw_info,
453 fw_info->base_addr + off, fw->image + off);
454 if (ret < 0) {
455 dev_err(&fw_info->ndev->nfc_dev->dev,
456 "Firmware update error (code=%d)\n", ret);
457 return ret;
458 }
459 }
460
461 ret = s3fwrn5_fw_complete_update_mode(fw_info);
462 if (ret < 0) {
463 dev_err(&fw_info->ndev->nfc_dev->dev,
464 "Unable to complete update mode\n");
465 return ret;
466 }
467
468 dev_info(&fw_info->ndev->nfc_dev->dev,
469 "Firmware update: success\n");
470
471 return ret;
472 }
473
---
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: 38048 bytes --]
next prev parent reply other threads:[~2021-07-27 16:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 12:25 [PATCH] nfc: s3fwrn5: fix undefined parameter values in dev_err() Tang Bin
2021-07-27 16:59 ` kernel test robot [this message]
2021-07-27 16:59 ` kernel test robot
2021-07-27 17:34 ` Nathan Chancellor
2021-07-28 1:32 ` tangbin
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=202107280053.BcO8iMjs-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.