[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87oakvt2da.fsf@rustcorp.com.au>
Date: Fri, 05 Jun 2015 10:09:29 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Tejun Heo <htejun@...il.com>
Cc: Louis Langholtz <lou_langholtz@...com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: kernel/params.c: 'err' variable "set but not used" and perhaps should be?
Tejun Heo <htejun@...il.com> writes:
> On Fri, Jun 05, 2015 at 05:16:53AM +0930, Rusty Russell wrote:
>> Tejun Heo <htejun@...il.com> writes:
>> > On Thu, Jun 04, 2015 at 11:03:16AM +0930, Rusty Russell wrote:
>> >> Please describe the circumstances under which this function can fail.
>> >
>> > Allocation failure obviously
>>
>> Won't happen here, this is a boot-time function. version_sysfs_builtin.
>> The __init is the clue.
>
> Yes, that's this one callsite. There are whole others which can fail.
> Just add WARN_ON here. What are you arguing?
What will a second warning which is never triggered achieve? A bit of
code bloat and confusion, when I really do want to ignore the value.
I've asked (again) for gcc to allow cast to void:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists