s390/net: fix format string mismatches
cppcheck blamed some issues in drivers/s390/net/... They are fixed here. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reported-by: Toralf Foerster <toralf.foerster@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e95051ff5a
commit
a68be015ae
@@ -1943,14 +1943,16 @@ static ssize_t
|
||||
lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct lcs_card *card;
|
||||
int value;
|
||||
int value, rc;
|
||||
|
||||
card = dev_get_drvdata(dev);
|
||||
|
||||
if (!card)
|
||||
return 0;
|
||||
|
||||
sscanf(buf, "%u", &value);
|
||||
rc = sscanf(buf, "%d", &value);
|
||||
if (rc != 1)
|
||||
return -EINVAL;
|
||||
/* TODO: sanity checks */
|
||||
card->portno = value;
|
||||
|
||||
@@ -1997,14 +1999,17 @@ static ssize_t
|
||||
lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct lcs_card *card;
|
||||
int value;
|
||||
unsigned int value;
|
||||
int rc;
|
||||
|
||||
card = dev_get_drvdata(dev);
|
||||
|
||||
if (!card)
|
||||
return 0;
|
||||
|
||||
sscanf(buf, "%u", &value);
|
||||
rc = sscanf(buf, "%u", &value);
|
||||
if (rc != 1)
|
||||
return -EINVAL;
|
||||
/* TODO: sanity checks */
|
||||
card->lancmd_timeout = value;
|
||||
|
||||
|
Reference in New Issue
Block a user