Messages in this thread |  | | Date | Tue, 16 Jun 2015 15:54:01 -0400 | From | Tejun Heo <> | Subject | Re: [PATCH] kernel/params.c: make use of unused but set variable |
| |
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 <lou_langholtz@me.com> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> > > 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 <tj@kernel.org>
Thanks.
-- tejun
|  |