All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toralf Förster" <toralf.foerster@gmx.de>
To: sparclinux@vger.kernel.org
Subject: format string mismatch in arch/sparc/kernel/sysfs.c
Date: Sun, 18 May 2014 13:52:55 +0000	[thread overview]
Message-ID: <5378BB37.2000402@gmx.de> (raw)

Hi,

I'm just wondering if the format mismatch error is intentionally left in the code or not :

[arch/sparc/kernel/sysfs.c:154]: (warning) %ld in format string (no. 1) requires 'long *' but the argument type is 'unsigned long *'.


8a25a2fd arch/sparc/kernel/sysfs.c   (Kay Sievers      2011-12-21 14:29:42 -0800 149) static ssize_t store_mmustat_enable(struct device *s,
8a25a2fd arch/sparc/kernel/sysfs.c   (Kay Sievers      2011-12-21 14:29:42 -0800 150)                   struct device_attribute *attr, const char *buf,
4a0b2b4d arch/sparc64/kernel/sysfs.c (Andi Kleen       2008-07-01 18:48:41 +0200 151)                   size_t count)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 152) {
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 153)   unsigned long val, err;
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 154)   int ret = sscanf(buf, "%ld", &val);               <--------------
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 155)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 156)   if (ret != 1)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 157)           return -EINVAL;
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 158)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 159)   err = run_on_cpu(s->id, write_mmustat_enable, val);
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 160)   if (err)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 161)           return -EIO;
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 162)
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 163)   return count;
d887ab3a arch/sparc64/kernel/sysfs.c (David Miller     2007-06-03 23:38:09 -0700 164) }

-- 
Toralf


             reply	other threads:[~2014-05-18 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 13:52 Toralf Förster [this message]
2014-05-18 17:32 ` format string mismatch in arch/sparc/kernel/sysfs.c Sam Ravnborg
2014-05-18 17:45 ` Toralf Förster

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=5378BB37.2000402@gmx.de \
    --to=toralf.foerster@gmx.de \
    --cc=sparclinux@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 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.