mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefani Seibold <stefani@seibold.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: kfifo must_check warning (+ patch)
Date: Wed, 20 Oct 2010 22:09:45 +0200	[thread overview]
Message-ID: <1287605385.27545.9.camel@wall-e.seibold.net> (raw)
In-Reply-To: <20101020115608.996a9db4.akpm@linux-foundation.org>

The problem should be fixed. I renamed the __kfifo_must_check_helper()
into __kfifo_uint_must_check_helper() and add a new
__kfifo_int_must_check_helper() which is now used for kfifo_alloc().

A kernel linux 2.6.36-rc compiled with gcc 4.4.4 doesn't show the
warning.

There a only two functions which return a int: kfifo_alloc() and
kfifo_init(). The later one does not make use of
__kfifo_int_must_check_helper(), but this could be change if required.

I will send the patch in a separate mail.

Am Mittwoch, den 20.10.2010, 11:56 -0700 schrieb Andrew Morton:
> On Wed, 20 Oct 2010 19:37:02 +0100
> Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> 
> > > Some versions of gcc mysteriously report:
> > > drivers/char/n_gsm.c:1580: warning: ignoring return value of '__kfifo_must_check_helper', declared with attribute warn_unused_result
> > > 
> > > This warning can be eliminated by using a local variable for the
> > > returned result value, as suggested by Andrew Morton.
> > 
> > But that just hides the bug in the helper surely - the helper has type
> > errors so needs fixing - not this. If you apply this then the underlying
> > bug is just going to get forgotten
> > 
> 
> It won't get forgotten.
> 
> I agree that the warning is probably an artifact of the signedness
> thing.  So for 2.6.36, disabling __kfifo_must_check_helper() will
> suffice.  I'm sure that Stefani will fix up __kfifo_must_check_helper()
> for real for 2.6.37, then we can see if the warning reoccurs.



      reply	other threads:[~2010-10-20 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 22:10 kfifo must_check warning Randy Dunlap
2010-10-20  5:12 ` Andrew Morton
2010-10-20 16:46   ` kfifo must_check warning (+ patch) Randy Dunlap
2010-10-20 17:51     ` miltonm
2010-10-20 18:37     ` Alan Cox
2010-10-20 18:56       ` Andrew Morton
2010-10-20 20:09         ` Stefani Seibold [this message]

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=1287605385.27545.9.camel@wall-e.seibold.net \
    --to=stefani@seibold.net \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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

Powered by JetHome