Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1166347
| From | Tejun Heo <htejun@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] kernel/params.c: make use of unused but set variable |
| Date | 2015-06-16 22:00 +0200 |
| Message-ID | <pC5bA-40P-7@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <pySNz-6Jc-5@gated-at.bofh.it> <pySXf-6UE-1@gated-at.bofh.it> <pAmgx-7p8-3@gated-at.bofh.it> <pAmgx-7p8-1@gated-at.bofh.it> <pBqBs-45E-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] kernel/params.c: make use of unused but set variable Tejun Heo <htejun@gmail.com> - 2015-06-08 02:10 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Linus Torvalds <torvalds@linux-foundation.org> - 2015-06-08 02:20 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Tejun Heo <htejun@gmail.com> - 2015-06-08 03:00 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Tejun Heo <htejun@gmail.com> - 2015-06-11 04:00 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Louis Langholtz <lou_langholtz@me.com> - 2015-06-12 05:20 +0200
Re: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON() Ingo Molnar <mingo@kernel.org> - 2015-06-08 13:30 +0200
Re: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON() Ingo Molnar <mingo@kernel.org> - 2015-06-08 13:30 +0200
Re: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON() Ingo Molnar <mingo@kernel.org> - 2015-06-08 21:40 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Tejun Heo <htejun@gmail.com> - 2015-06-12 03:50 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Tejun Heo <htejun@gmail.com> - 2015-06-16 22:00 +0200
Re: [PATCH] kernel/params.c: make use of unused but set variable Rusty Russell <rusty@rustcorp.com.au> - 2015-06-12 03:50 +0200
csiph-web