Thread (10 messages) 10 messages, 2 authors, 2010-03-15

RE: [bluetooth-next] bluetooth: hci_sysfs: use strict_strtoul instead of simple_strtoul

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2010-03-09 02:16:35

Hi Tomas,
quoted
quoted
Signed-off-by: Tomas Winkler <redacted>
---
 net/bluetooth/hci_sysfs.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
can you please explain the rational behind this change. What is the
benefit? I just fail to see it right away.
The real reason using strict instead of simple strtoul is explained here thttp://www.kernel.org/doc/htmldocs/kernel-api/re42.html
In the bottom line it just something a chackpatch is complain about. I've touched the file to insert some test hook for the HCI reset so I fixed that on the way. 
I am fine with that. However please use the following constructs:

	if (strict_strtoul(...) < 0)
		return -EINVAL;

There is no point in having ret variable if you don't use it.

Also I like to have a commit body and not only a subject line. It
doesn't have to be a novel, but only the subject is not good enough for
me.

Regards

Marcel

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help