public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] device_for_each_child(): kill pointless warning noise
Date: Wed, 27 Sep 2006 21:50:16 -0400	[thread overview]
Message-ID: <451B2A58.9010603@garzik.org> (raw)
In-Reply-To: <20060927184200.7d7b9cc2.akpm@osdl.org>

Andrew Morton wrote:
> On Wed, 27 Sep 2006 21:05:18 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
> 
>> As the last patch demonstrated, it is quite valid for a caller to ignore
>> the return value of device_for_each_child(), given that the return value
>> is wholly dependent on the actor -- which in practice often has a
>> hardcoded return value.
> 
> Yes, but almost all of the instances which you found are flat-out *wrong*. 
> They're returning 0 or 1 at random places in the callchain because they're
> calling intermediate void-returning functions which are themselves dropping
> error codes on the floor instead of returning them.

"almost all"  Thus it is wrong to _force_ the usage model on the caller.

It should be obvious that a simple search need not _require_ a dummy 
return value, that is promptly ignored.

See previous email for examples.

	Jeff




  reply	other threads:[~2006-09-28  1:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28  1:05 [PATCH] device_for_each_child(): kill pointless warning noise Jeff Garzik
2006-09-28  1:42 ` Andrew Morton
2006-09-28  1:50   ` Jeff Garzik [this message]
2006-09-28 11:30     ` Alan Cox

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=451B2A58.9010603@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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