From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: ips.c warnings
Date: Sun, 16 Oct 2005 18:11:06 -0500 [thread overview]
Message-ID: <1129504267.9388.4.camel@mulgrave> (raw)
In-Reply-To: <20051016155715.3edda40d.akpm@osdl.org>
On Sun, 2005-10-16 at 15:57 -0700, Andrew Morton wrote:
> James Bottomley <James.Bottomley@SteelEye.com> 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.
James
next prev parent reply other threads:[~2005-10-16 23:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-16 21:08 ips.c warnings Andrew Morton
2005-10-16 22:44 ` James Bottomley
2005-10-16 22:57 ` Andrew Morton
2005-10-16 23:11 ` James Bottomley [this message]
2005-10-16 23:24 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2005-10-20 16:59 Jack Hammer
2005-10-20 17:05 ` Matthew Wilcox
2005-10-20 17:25 Hammer, Jack
2005-10-20 17:29 ` Christoph Hellwig
2005-10-20 17:54 ` James Bottomley
2005-10-20 17:33 IpsLinux
2005-10-20 17:38 Salyzyn, Mark
2005-10-20 17:39 ` Christoph Hellwig
2005-10-20 17:59 IpsLinux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1129504267.9388.4.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).