public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah•com>
To: Anton Vorontsov <avorontsov@mvista•com>
Cc: linuxppc-dev@ozlabs•org, Greg Kroah-Hartman <gregkh@suse•de>,
	linux-usb@vger•kernel.org
Subject: Re: [PATCH] USB: FHCI: cq_get() should check kfifo_out()'s return value
Date: Tue, 4 May 2010 12:17:19 -0700	[thread overview]
Message-ID: <20100504191719.GA13854@kroah.com> (raw)
In-Reply-To: <20100502173025.GA24086@oksana.dev.rtsoft.ru>

On Sun, May 02, 2010 at 09:30:25PM +0400, Anton Vorontsov wrote:
> Since commit 7acd72eb85f1c7a15e8b5eb554994949241737f1 ("kfifo: rename
> kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out..."),
> kfifo_out() is marked __must_check, and that causes gcc to produce
> lots of warnings like this:
> 
>   CC      drivers/usb/host/fhci-mem.o
> In file included from drivers/usb/host/fhci-hcd.c:34:
> drivers/usb/host/fhci.h: In function 'cq_get':
> drivers/usb/host/fhci.h:520: warning: ignoring return value of 'kfifo_out', declared with attribute warn_unused_result
> ...
> 
> Fix it with BUG_ON() check. We could just forcibly ignore return
> value, but it's better to check if we really got a whole pointer.

No, you don't want to crash the whole machine for something like this.

Please just handle the error normally and pass it up to the upper levels
if possible.

thanks,

greg k-h

      reply	other threads:[~2010-05-04 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-02 17:30 [PATCH] USB: FHCI: cq_get() should check kfifo_out()'s return value Anton Vorontsov
2010-05-04 19:17 ` Greg KH [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=20100504191719.GA13854@kroah.com \
    --to=greg@kroah$(echo .)com \
    --cc=avorontsov@mvista$(echo .)com \
    --cc=gregkh@suse$(echo .)de \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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