Thread (7 messages) 7 messages, 2 authors, 2016-09-02

Re: [PATCH] trivial treewide: Convert dev_set_uevent_suppress argument to bool

From: Bart Van Assche <hidden>
Date: 2016-09-02 16:00:04
Also in: linux-acpi, linux-fsdevel, linux-s390, lkml

On 09/02/2016 08:41 AM, Joe Perches wrote:
On Fri, 2016-09-02 at 13:41 +0000, Bart Van Assche wrote:
quoted
On 09/01/16 17:51, Joe Perches wrote:
quoted
On Fri, 2016-09-02 at 00:47 +0000, Bart Van Assche wrote:
quoted
On 09/01/16 13:11, Joe Perches wrote:
quoted
Assigning an int to a bitfield:1 can lose precision.
Change the caller argument uses from 1/0 to true/false.
Can you clarify how assigning 0 or 1 to a one-bit bitfield can cause a
loss of precision?
There are no existing defects.
Using 1/0 is not a loss of precision, it's just
changing to use bool avoids potential errors and
promotes consistency.
Other uses of this function already use true/false.
In the patch description you refer to loss of precision. However, your
patch does not address any loss of precision issues. So I think that the
patch description is misleading and could be made more clear.
I tend towards terse being better than verbose.
The original patch description says

"no change to objects"

What would you suggest?
Hello Joe,

How about the following:

dev_set_uevent_suppress() expects a boolean as second argument. Make 
this clear by passing true/false instead of 1/0 as the second argument.

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