linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint()
@ 2014-02-19  5:09 Daeseok Youn
  2014-02-19  6:05 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Daeseok Youn @ 2014-02-19  5:09 UTC (permalink / raw)
  To: tj; +Cc: linux-ide, linux-kernel

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

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/ata/libahci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 36605ab..417946b 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -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;
-- 
1.7.9.5
---

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint()
  2014-02-19  5:09 [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint() Daeseok Youn
@ 2014-02-19  6:05 ` David Miller
  2014-02-19  6:14   ` DaeSeok Youn
  2014-02-19 12:40   ` Sergei Shtylyov
  0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2014-02-19  6:05 UTC (permalink / raw)
  To: daeseok.youn; +Cc: tj, linux-ide, linux-kernel

From: Daeseok Youn <daeseok.youn@gmail.com>
Date: Wed, 19 Feb 2014 14:09:49 +0900

> From 18bd7236f36a248a0871f810cec3c1e98f098a91 Mon Sep 17 00:00:00 2001
> From: Daeseok Youn <daeseok.youn@gmail.com>
> Date: Wed, 19 Feb 2014 13:44:24 +0900
> Subject: [PATCH] atm: libahci: replace obselete simple_strtoul() with
>  kstrtouint()
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint()
  2014-02-19  6:05 ` David Miller
@ 2014-02-19  6:14   ` DaeSeok Youn
  2014-02-19 12:40   ` Sergei Shtylyov
  1 sibling, 0 replies; 4+ messages in thread
From: DaeSeok Youn @ 2014-02-19  6:14 UTC (permalink / raw)
  To: David Miller; +Cc: tj, linux-ide, linux-kernel

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

Daeseok Youn

2014-02-19 15:05 GMT+09:00 David Miller <davem@davemloft.net>:
> From: Daeseok Youn <daeseok.youn@gmail.com>
> Date: Wed, 19 Feb 2014 14:09:49 +0900
>
>> From 18bd7236f36a248a0871f810cec3c1e98f098a91 Mon Sep 17 00:00:00 2001
>> From: Daeseok Youn <daeseok.youn@gmail.com>
>> Date: Wed, 19 Feb 2014 13:44:24 +0900
>> Subject: [PATCH] atm: libahci: replace obselete simple_strtoul() with
>>  kstrtouint()
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>
> Please fix your Subject line, you meant "ata: " not "atm: "

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint()
  2014-02-19  6:05 ` David Miller
  2014-02-19  6:14   ` DaeSeok Youn
@ 2014-02-19 12:40   ` Sergei Shtylyov
  1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2014-02-19 12:40 UTC (permalink / raw)
  To: David Miller, daeseok.youn; +Cc: tj, linux-ide, linux-kernel

Hello.

On 19-02-2014 10:05, David Miller wrote:

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

>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>

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

    And "obsolete". :-)

WBR, Sergei


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-19 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19  5:09 [PATCH] atm: libahci: replace obselete simple_strtoul() with kstrtouint() Daeseok Youn
2014-02-19  6:05 ` David Miller
2014-02-19  6:14   ` DaeSeok Youn
2014-02-19 12:40   ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).