Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756808AbbFPTyM (ORCPT ); Tue, 16 Jun 2015 15:54:12 -0400 Received: from mail-qg0-f54.google.com ([209.85.192.54]:35876 "EHLO mail-qg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbbFPTyE (ORCPT ); Tue, 16 Jun 2015 15:54:04 -0400 Date: Tue, 16 Jun 2015 15:54:01 -0400 From: Tejun Heo To: Rusty Russell Cc: Linus Torvalds , Louis Langholtz , Linux Kernel Mailing List , trivial@kernel.org, Andrew Morton Subject: Re: [PATCH] kernel/params.c: make use of unused but set variable Message-ID: <20150616195401.GB22637@mtj.duckdns.org> References: <1433721270-9182-1-git-send-email-lou_langholtz@me.com> <20150608000007.GA3543@mtj.duckdns.org> <87zj45g1hf.fsf@rustcorp.com.au> <20150612014831.GG6336@mtj.duckdns.org> <87k2v6f4u1.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k2v6f4u1.fsf@rustcorp.com.au> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 41 Hello, Rusty. On Mon, Jun 15, 2015 at 05:19:26AM +0930, Rusty Russell wrote: > Oh. Perhaps my sense of humour is miscalibrated. Heh, prolly mine was. Sorry if I came off as aggressive. > === > Subject: params: suppress unused variable error, warn once just in case code changes. > > It shouldn't fail due to OOM (it's boot time), and already warns if we > get two identical names. But you never know what the future holds, and > WARN_ON_ONCE() keeps gcc happy with minimal code. > > Reported-by: Louis Langholtz > Signed-off-by: Rusty Russell > > diff --git a/kernel/params.c b/kernel/params.c > index 7edf31f2ce96..0b9bbdf830cb 100644 > --- a/kernel/params.c > +++ b/kernel/params.c > @@ -884,6 +884,7 @@ static void __init version_sysfs_builtin(void) > mk = locate_module_kobject(vattr->module_name); > if (mk) { > err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr); > + WARN_ON_ONCE(err); > kobject_uevent(&mk->kobj, KOBJ_ADD); Looks good to me. Please feel free to add Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/