public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kfifo must_check warning
@ 2010-10-19 22:10 Randy Dunlap
  2010-10-20  5:12 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2010-10-19 22:10 UTC (permalink / raw)
  To: lkml; +Cc: Stefani Seibold

In 2.6.36-rc8, I see this build warning:

drivers/char/n_gsm.c: In function 'gsm_dlci_alloc':
drivers/char/n_gsm.c:1580: warning: ignoring return value of '__kfifo_must_check_helper', declared with attribute warn_unused_result

The helper seems to be getting in the way (?).  The driver code does this:

	if (kfifo_alloc(&dlci->_fifo, 4096, GFP_KERNEL) < 0) {
		kfree(dlci);
		return NULL;
	}

Should the driver code be doing something else?
or should the kfifo_alloc() macro be checking the result of the helper?


thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-20 20:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox