Re: ips.c warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:
>
> On Sun, 2005-10-16 at 15:57 -0700, Andrew Morton wrote:
> > James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:
> > >  That's weird ... the compiler can't possibly be in a position to make
> > >  that judgement call.  We have lots of places where we return null if
> > >  something goes wrong and the kernel oopses.  The compiler certainly
> > >  isn't warning about all of them.
> > 
> > Well I guess the difference is that the compiler can _see_ that
> > IPS_SG_ADDRESS() might return NULL:
> > 
> > #define IPS_SG_ADDRESS(sg)      (page_address((sg)->page) ? \
> >                                   page_address((sg)->page)+(sg)->offset : NULL)
> > 
> > What's the point in this expression anyway?  Why not just assume that
> > page_address() returns non-NULL?
> 
> Actually, what it should be doing is a kmap/kunmap on page instead of
> assuming the page has an address ...  hopefully the IPS people can fix
> it.
> 

(cc's the IPS people)
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux