Skip to contentSkip to conversation

atm: libahci: replace obselete simple_strtoul() with kstrtouint()

PATCH In review Daeseok Youn 3 participants 4 messages Feb 19, 2014 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atm: libahci: replace obselete simple_strtoul() with kstrtouint()

Quoted 1 line

From 18bd7236f36a248a0871f810cec3c1e98f098a91 Mon Sep 17 00:00:00 2001

From: Daeseok Youn <[email protected]>
Date: Wed, 19 Feb 2014 13:44:24 +0900
Subject: [PATCH] atm: libahci: replace obselete simple_strtoul() with
kstrtouint()

---
 drivers/ata/libahci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/ata/libahci.c +0 -0
index 36605ab..417946b 100644
@@ -1032,12 +1032,13 @@ static ssize_t ahci_led_show(struct ata_port *ap, char 

*buf)
static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
size_t size)
{
- int state;
+ unsigned int state;
int pmp;
struct ahci_port_priv *pp = ap->private_data; struct ahci_em_priv *emp;

- state = simple_strtoul(buf, NULL, 0);
+ if (kstrtouint(buf, 0, &state) < 0)
+ return -EINVAL;

/* get the slot number from the message */ pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;

Signature · 2 lines
1.7.9.5
---
#1 lore raw

From: Daeseok Youn <[email protected]>
Date: Wed, 19 Feb 2014 14:09:49 +0900

Quoted 7 lines

From 18bd7236f36a248a0871f810cec3c1e98f098a91 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Wed, 19 Feb 2014 13:44:24 +0900
Subject: [PATCH] atm: libahci: replace obselete simple_strtoul() with
kstrtouint()

Please fix your Subject line, you meant "ata: " not "atm: "

#2 lore raw

I re-send this patch after fixing subject.
Thanks.

Daeseok Youn

2014-02-19 15:05 GMT+09:00 David Miller <[email protected]>:

Quoted 12 lines

From: Daeseok Youn <[email protected]>
Date: Wed, 19 Feb 2014 14:09:49 +0900

Quoted 7 lines

From 18bd7236f36a248a0871f810cec3c1e98f098a91 Mon Sep 17 00:00:00 2001
From: Daeseok Youn <[email protected]>
Date: Wed, 19 Feb 2014 13:44:24 +0900
Subject: [PATCH] atm: libahci: replace obselete simple_strtoul() with
kstrtouint()

Please fix your Subject line, you meant "ata: " not "atm: "