On Mon, Jan 27, 2020 at 07:44:43PM +0530, Devesh Sharma wrote: > > > I will have to duplicate it again to report the precise warning but > > > based on my memory, sparse or smatch was shouting about "pointer > > > converted to integer without cast" > > > I guess that was because rattr.dma_arr is a pointer and static > > > initialization was assigning value 0 while it should had been NULL. If > > > you insist I would send you exact warning msg and tool-version-number > > > soon. > > > > Yes, please, because NULL is 0 and has special meaning in C standard. > This is what sparse warns about: > make C=2 CHECK="/data2/upstream/tools/sparse/sparse" > CF="-D__CHECK_ENDIAN__" drivers/infiniband/hw/bnxt_re/ > CHECK drivers/infiniband/hw/bnxt_re/main.c > drivers/infiniband/hw/bnxt_re/main.c:1010:43: warning: Using plain > integer as NULL pointer Yes, this is entirely expected, you should not use the {0} pattern, it is not reliable. '= {}' is preferred. Jason