mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Louis Langholtz <lou_langholtz@me.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: kernel/params.c: 'err' variable "set but not used" and perhaps should be?
Date: Fri, 5 Jun 2015 23:24:31 +0900	[thread overview]
Message-ID: <20150605142431.GB4444@mtj.duckdns.org> (raw)
In-Reply-To: <87oakvt2da.fsf@rustcorp.com.au>

Hello, Rusty.

On Fri, Jun 05, 2015 at 10:09:29AM +0930, Rusty Russell wrote:
> What will a second warning which is never triggered achieve?  A bit of

How do you know that tho?  Somebody may change something in the module
code, kernfs or sysfs and break something in an unexpected way.  We've
always used BUG_ON() in __init functions to annotate things which
shouldn't fail.

> code bloat and confusion, when I really do want to ignore the value.

BUG_ON()s are very light weight, __init code gets dropped once done,
and this is an established way of annotating operations which aren't
expected to fail.

I'm having a hard time understanding the point of this thread.  :(

Thanks.

-- 
tejun

      reply	other threads:[~2015-06-05 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <FFF42EF7-42DB-4D5C-9C86-D8773E20D255@me.com>
     [not found] ` <87vbf628uy.fsf@rustcorp.com.au>
2015-06-03 19:41   ` Louis Langholtz
2015-06-03 20:22     ` Tejun Heo
2015-06-04  1:33       ` Rusty Russell
2015-06-04  2:19         ` Tejun Heo
2015-06-04 19:46           ` Rusty Russell
2015-06-04 20:30             ` Tejun Heo
2015-06-05  0:39               ` Rusty Russell
2015-06-05 14:24                 ` Tejun Heo [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=20150605142431.GB4444@mtj.duckdns.org \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lou_langholtz@me.com \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®