Re: drivers/hid/wacom_wac.c:2484: bad if test ?

3 messages, 2 authors, 2015-11-16 · open the first message on its own page

Re: drivers/hid/wacom_wac.c:2484: bad if test ?

From: Jiri Kosina <jikos@kernel.org>
Date: 2015-11-16 22:39:11

On Mon, 16 Nov 2015, David Binderman wrote:
Hello there,

drivers/hid/wacom_wac.c:2484:35: warning: logical ‘or’ of collectively 
exhaustive tests is always true [-Wlogical-op]

Source code is

if (features->type>= INTUOSHT || features->type <= BAMBOO_PT)
Good catch, that code is obviously crappy.

Adding Ping, Aaron and Jason to CC.

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: drivers/hid/wacom_wac.c:2484: bad if test ?

From: Ping Cheng <hidden>
Date: 2015-11-16 23:09:41

Oh, boy! It should be:

 if (features->type>= INTUOSHT && features->type <= BAMBOO_PT)

Thank you David for your sharp eyes ;-).

Jiri,

Can you fix it upstream or do you need a patch from me?

Ping

On Mon, Nov 16, 2015 at 2:39 PM, Jiri Kosina [off-list ref] wrote:
On Mon, 16 Nov 2015, David Binderman wrote:
quoted
Hello there,

drivers/hid/wacom_wac.c:2484:35: warning: logical ‘or’ of collectively
exhaustive tests is always true [-Wlogical-op]

Source code is

if (features->type>= INTUOSHT || features->type <= BAMBOO_PT)
Good catch, that code is obviously crappy.

Adding Ping, Aaron and Jason to CC.

--
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: drivers/hid/wacom_wac.c:2484: bad if test ?

From: Jiri Kosina <jikos@kernel.org>
Date: 2015-11-16 23:21:42

On Mon, 16 Nov 2015, Ping Cheng wrote:
Oh, boy! It should be:

 if (features->type>= INTUOSHT && features->type <= BAMBOO_PT)

Thank you David for your sharp eyes ;-).

Jiri,

Can you fix it upstream or do you need a patch from me?
Yup, I have already comitted fix with David's Reported-by:, just wanted to 
make you aware of this.

Thanks,

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