> $ sparse --version > v0.4.4-133-g5449cfb My is: sparse --version v0.4.5-rc1 > Hard to believe - did you pass the CF= on the command line? I suggest > > ccflags-y += -D__CHECK_ENDIAN__ Agree that it's not a version difference :) Yes , i set check endian. Weird, will try to modify makefile and see if that helps. > Also, code might be fine, but buff_to_be() is still not a good idea > since it breaks all endian annotation. Could you please explain in more details how does buff_to_be break endian annotation? > Also, I suggested to run smatch, I guess you never did: I ran it and even fixed some of the errors. These errors i might just missed because of the output is flooded with messages like: drivers/net/wireless/ath/wcn36xx/main.c:24 (null)() info: ignoring unreachable code. Thanx for pointing to these warnings. On Sat, Oct 12, 2013 at 7:25 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Fri, 2013-10-11 at 21:39 +0100, Eugene Krasnikov wrote: > >> Do you see the same warning? > > Yes > >> With the latest sparse i do not see this >> warning. > > $ sparse --version > v0.4.4-133-g5449cfb > >> I assume this warning depends on sparse version since with my >> environment it does not pop up. Also from code perspective it looks >> fine. Any ideas?:) > > Hard to believe - did you pass the CF= on the command line? I suggest > > ccflags-y += -D__CHECK_ENDIAN__ > > in your Makefile. > > Also, code might be fine, but buff_to_be() is still not a good idea > since it breaks all endian annotation. > > Also, I suggested to run smatch, I guess you never did: > drivers/net/wireless/ath/wcn36xx/smd.c:1314 wcn36xx_smd_send_beacon() warn: inconsistent returns mutex:&wcn->hal_mutex: locked (1289 [(-12)]) unlocked (1314 [0], 1314 [s32min-(-1),1-s32max]) > drivers/net/wireless/ath/wcn36xx/smd.c:1357 wcn36xx_smd_update_proberesp_tmpl() warn: inconsistent returns mutex:&wcn->hal_mutex: locked (1330 [(-7)]) unlocked (1357 [0], 1357 [s32min-(-1),1-s32max]) > drivers/net/wireless/ath/wcn36xx/smd.c:1626 wcn36xx_smd_keep_alive_req() warn: inconsistent returns mutex:&wcn->hal_mutex: locked (1609 [(-22)]) unlocked (1626 [0], 1626 [s32min-(-1),1-s32max]) > drivers/net/wireless/ath/wcn36xx/smd.c:2041 wcn36xx_smd_rsp_process() error: potential null dereference 'msg_ind'. (kmalloc returns null) > > johannes > -- Best regards, Eugene -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html