mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Hannes Reinecke <hare@suse.de>
Subject: drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
Date: Tue, 8 Feb 2022 13:39:59 +0800	[thread overview]
Message-ID: <202202081300.g4MmMWrY-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   555f3d7be91a873114c9656069f1a9fa476ec41a
commit: 87924c5b4094f195507bebcab96e141e48c947d7 ata: sata_fsl: add compile test support
date:   5 weeks ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)
>> drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
    if (sscanf(buf, "%d%d",
        ^
   drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 2) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
    if (sscanf(buf, "%d%d",
        ^
   drivers/ata/sata_fsl.c:376:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
    if (sscanf(buf, "%d", &rx_watermark) != 1) {
        ^

vim +335 drivers/ata/sata_fsl.c

6b4b8fc87dc5cbf Qiang Liu 2012-02-15  328  
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  329  static ssize_t fsl_sata_intr_coalescing_store(struct device *dev,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  330  		struct device_attribute *attr,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  331  		const char *buf, size_t count)
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  332  {
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  333  	unsigned int coalescing_count,	coalescing_ticks;
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  334  
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 @335  	if (sscanf(buf, "%d%d",
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  336  				&coalescing_count,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  337  				&coalescing_ticks) != 2) {
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  338  		printk(KERN_ERR "fsl-sata: wrong parameter format.\n");
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  339  		return -EINVAL;
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  340  	}
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  341  
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  342  	fsl_sata_set_irq_coalescing(dev_get_drvdata(dev),
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  343  			coalescing_count, coalescing_ticks);
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  344  
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  345  	return strlen(buf);
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  346  }
6b4b8fc87dc5cbf Qiang Liu 2012-02-15  347  

:::::: The code at line 335 was first introduced by commit
:::::: 6b4b8fc87dc5cbfcfb5c749dc200906471fb854c sata_fsl: add support for interrupt coalsecing feature

:::::: TO: Qiang Liu <qiang.liu@freescale.com>
:::::: CC: Jeff Garzik <jgarzik@redhat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2022-02-08  5:40 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=202202081300.g4MmMWrY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hare@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®