lkml.org 
[lkml]   [2012]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [Xen-devel] [PATCH 09/10] xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer.
Ian Jackson writes ("Re: [Xen-devel] [PATCH 09/10] xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer."):
> Konrad Rzeszutek Wilk writes ("[Xen-devel] [PATCH 09/10] xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer."):
> > arch/x86/xen/pci-swiotlb-xen.c:96:1: warning: Using plain integer as NULL pointer
> > arch/x86/xen/pci-swiotlb-xen.c:96:1: warning: Using plain integer as NULL pointer
>
> This warning is simply wrong for this code:
>
> > IOMMU_INIT_FINISH(pci_xen_swiotlb_detect,
> > - 0,
> > + NULL,
>
> There is (according to the C language specifications) nothing wrong
> with writing 0 for a null pointer.
>
> Nor does CODING_STYLE say that it is forbidden to just write 0.

Oh wait this is Linux kernel code, not in Xen? Still,
Documentation/CodingStyle doesn't say that NULL is required.

Ian.


\
 
 \ /
  Last update: 2012-09-13 19:01    [W:0.165 / U:2.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site