Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning

2021-04-18 Thread Luc Van Oostenryck
On Sat, Apr 17, 2021 at 09:31:32PM +, David Laight wrote: > > > Upon running sparse, "warning: dubious: !x | !y" is brought to notice > > > for this file. Logical and bitwise OR are basically the same in this > > > context so it doesn't cause a runtime bug. But let's change it to > > > logica

Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer

2020-10-27 Thread Luc Van Oostenryck
On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote: > > Are you sure these changes are correct? This isn't just a list of > structures after this at the end of the structure? > > Please look at commit 5979afa2c4d1 ("staging: Replace zero-length array > with flexible-array member") which mad

[PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type

2020-06-28 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too and usind 'NETDEV_TX_OK' instead o

[PATCH] staging/wilc1000: let wilc_mac_xmit() to NETDEV_TX_OK

2020-06-28 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type defining 'NETDEV_TX_OK' but this driver returns '0' instead of 'NETDEV_TX_OK'. Fix this by returning ''NETDEV_TX_OK' instead of 0.

Re: [PATCH] Removing ununsed variable int lo, hi, int data and int i from comedi/drivers/dt2814.c.

2020-05-24 Thread Luc Van Oostenryck
On Sun, May 24, 2020 at 07:02:20PM +0530, GAURAV PATHAK wrote: > > For few drivers, I am getting: > > CC [M] drivers/staging/vt6656/key.o > CHECK drivers/staging/vt6656/rf.c > /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:417:9: warning: preprocessor > token offsetof redefined > ./includ

Re: [PATCH] Removing ununsed variable int lo, hi, int data and int i from comedi/drivers/dt2814.c.

2020-05-24 Thread Luc Van Oostenryck
On Sun, May 24, 2020 at 06:19:22PM +0530, GAURAV PATHAK wrote: > Thanks a lot for your reply. > I am trying to run sparse on drivers/staging directory, > but I am not getting any useful warnings. > Steps that I did: > > - Referred https://www.kernel.org/doc/man-pages/linux-next.html to get > linux

Re: [PATCH] Removing ununsed variable int lo, hi, int data and int i from comedi/drivers/dt2814.c.

2020-05-24 Thread Luc Van Oostenryck
Hi, On Sun, May 24, 2020 at 05:06:18PM +0530, Gaurav Pathak wrote: > Silence following sparse warning: > drivers/staging/comedi/drivers/dt2814.c: In function ‘dt2814_interrupt’: > drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable ‘data’ set > but not used [-Wunused-but-set-variable

Re: [PATCH] staging: wilc1000: fix cast to restricted __le32

2019-01-07 Thread Luc Van Oostenryck
On Mon, Jan 07, 2019 at 03:54:37PM +0300, Dan Carpenter wrote: > I'm sort of surprised that the zero day bot didn't complain about this. > It probably should. > > The endianness checking is not turned on by default in Sparse. You have > to do "make C=1 CF=-D__CHECK_ENDIAN__" to turn it on. Bitwi

Re: [PATCH] binder: fix sparse warnings on locking context

2018-12-03 Thread Luc Van Oostenryck
er_lock); This one is questionnable because: 1) if !node->proc, then '&node->proc->inner_lock' is not acquired since it doesn't even exist. 2) OTOH, the function can't have the annotation 100% right because it semantics allows unbalanced locking depen

[PATCH v2] staging/wilc1000: fix wilc_mac_xmit()'s return type

2018-04-26 Thread Luc Van Oostenryck
by 'return NETDEV_TX_OK;' Signed-off-by: Luc Van Oostenryck --- drivers/staging/wilc1000/linux_wlan.c | 8 drivers/staging/wilc1000/wilc_wlan.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1

[PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- drivers

[PATCH] staging: wlan-ng: fix p80211knetdev_hard_start_xmit()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck

[PATCH] staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- dr

[PATCH] staging: ks7010: fix ks_wlan_start_xmit()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- driver

[PATCH] staging: visornic: fix visornic_xmit()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- d

[PATCH] staging: gdm724x: fix gdm_lte_tx()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- drivers

[PATCH] hv_netsvc: fix netvsc_start_xmit()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck --- drive

[PATCH] vboxvideo: fix mode_valid's return type

2018-04-24 Thread Luc Van Oostenryck
The method struct drm_connector_helper_funcs::mode_valid is defined as returning an 'enum drm_mode_status' but the driver implementation for this method uses an 'int' for it. Fix this by using 'enum drm_mode_status' in the driver too. Signed-off-by: Luc Van Oo

Re: [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c

2017-07-02 Thread Luc Van Oostenryck
On Sun, Jul 2, 2017 at 10:49 PM, Janusz Lisiecki wrote: > W dniu 2017-07-02 o 21:38, Luc Van Oostenryck pisze: > >> On Sun, Jul 2, 2017 at 4:27 PM, Janusz Lisiecki >> wrote: >>> >>> This patch fixes the following Sparse warnings in ks_wlan_net.c: >>>

Re: [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c

2017-07-02 Thread Luc Van Oostenryck
On Sun, Jul 2, 2017 at 4:27 PM, Janusz Lisiecki wrote: > This patch fixes the following Sparse warnings in ks_wlan_net.c: > drivers/staging/ks7010/ks_wlan_net.c:1359:24: warning: cast to restricted > __le16 > Both sides of assignment are u16 so (as 'ap' is local_ap_t type and > 'capability' memb