Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269713
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drivers:pci:hotplug Fix simple_strtoul is obsolete, use kstrtoul instead |
| Date | 2015-11-15 17:20 +0100 |
| Message-ID | <qv8c2-3ET-11@gated-at.bofh.it> (permalink) |
| References | <qv4UO-1rW-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Nov 15, 2015 at 01:43:55PM +0100, Bogicevic Sasa wrote: > This fixes messages "simple_strtoul is obsolete, use kstrtoul instead" > from checkpatch.pl script > > Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> > --- > drivers/pci/hotplug/pci_hotplug_core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c > index d379d49..a1160c8 100644 > --- a/drivers/pci/hotplug/pci_hotplug_core.c > +++ b/drivers/pci/hotplug/pci_hotplug_core.c > @@ -103,7 +103,7 @@ static ssize_t power_write_file(struct pci_slot *pci_slot, const char *buf, > u8 power; > int retval = 0; > > - lpower = simple_strtoul(buf, NULL, 10); > + lpower = kstrtoul(buf, NULL, 10); I take it you did not test this code, since it would probably result in a crash. Does it even compile ? Hint: When replacing one function call with another, it helps updating the parameters. Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] drivers:pci:hotplug Fix simple_strtoul is obsolete, use kstrtoul instead Bogicevic Sasa <brutallesale@gmail.com> - 2015-11-15 13:50 +0100 Re: [PATCH] drivers:pci:hotplug Fix simple_strtoul is obsolete, use kstrtoul instead Guenter Roeck <linux@roeck-us.net> - 2015-11-15 17:20 +0100
csiph-web