staging: wilc1000: fix cast to restricted __le32
PATCH 1/1 staging: wilc1000: fix cast to restricted __le32
Fixes the following sparse warnings:
drivers/staging/wilc1000/host_interface.c:2360:30: warning:
incorrect type in assignment (different base types)
expected restricted __le32 [addressable] [assigned] [usertype] frame_type got restricted __le16 [usertype] <noident>
--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -2357,7 +2357,7 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)default :break ; } - reg_frame.frame_type =cpu_to_le16 (frame_type); + reg_frame.frame_type =cpu_to_le32 (frame_type); result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 ,wilc_get_vif_idx (vif));if (result)
Signature · 1 line
2.14.5
A message that is not in the archive (sent off-list or not yet received): CAP=P++A1LritztQ1=fHOE7XXJN_0TvNHEjh7tVrpDj1kYFrNTQ@mail.gmail.com
Greg KH
maintainerQuoted 1 line · Július Milan
sorry, bad mail, see the next one please
Properly version your patches so I know what "next one" really means.
I've dropped all of these patches from my queue now, please resend with a v2 added to the patch as the documentation says to do.
thanks,
greg k-h
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.
regards,
dan carpenter
Quoted 33 lines · Július Milan
Fixes the following sparse warnings:
drivers/staging/wilc1000/host_interface.c:2360:30: warning:
incorrect type in assignment (different base types)
expected restricted__le32[addressable] [assigned] [usertype]frame_typegot restricted__le16[usertype] <noident>Fixes 147ccfd451024 ("staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context")Signed-off-by Július Milan <[email protected]>--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wilc1000/host_interface.c +1
-1@@ -2357,7 +2357,7 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)default :break ; } - reg_frame.frame_type =cpu_to_le16 (frame_type); + reg_frame.frame_type =cpu_to_le32 (frame_type); result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 ,wilc_get_vif_idx (vif));if (result)Signature · 6 lines
2.14.5 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Quoted 5 lines · Dan Carpenter
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.
Bitwise (and thus endian) checking is enabled by default in the kernel since 05de97003 ("linux/types.h: enable endian checks for all sparse builds") included in v4.10-rc1. Since then they make more than half of sparse warnings (in a x86-64 allyesconfig).
Best regards,
-- Luc