[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB=NE6V378RCJ+sYvtfRe01HMyjVOwJOmjYWU8qnec9B_s4+9Q@mail.gmail.com>
Date: Wed, 14 Mar 2018 15:33:23 -0700
From: "Luis R. Rodriguez" <mcgrof@...nel.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
cantabile.desu@...il.com, kubakici@...pl,
linux-wireless <linux-wireless@...r.kernel.org>,
Kees Cook <keescook@...omium.org>, shuah@...nel.org,
Martin Fuzzey <mfuzzey@...keon.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
David Howells <dhowells@...hat.com>,
Pali Rohár <pali.rohar@...il.com>,
Takashi Iwai <tiwai@...e.de>,
Arend Van Spriel <arend.vanspriel@...adcom.com>,
Rafał Miłecki <zajec5@...il.com>,
Nicolas Broeking <nbroeking@...com>,
Vikram Mulukutla <markivx@...eaurora.org>,
Mark Brown <broonie@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Abhay Salunke <Abhay_Salunke@...l.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
jewalt@...innovations.com, oneukum@...e.com,
Alexei Starovoitov <ast@...com>,
Andres Rodriguez <andresx7@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v3 07/20] firmware: move loading timeout under struct firmware_fallback_config
On Wed, Mar 14, 2018 at 11:56 AM, Greg KH <gregkh@...uxfoundation.org> wrote:
> On Sat, Mar 10, 2018 at 06:14:48AM -0800, Luis R. Rodriguez wrote:
>> The timeout is a fallback construct, so we can just stuff the
>> timeout configuration under struct firmware_fallback_config.
>
> Why? What does it matter?
Because we want to remove direct access to things which the direct
firmware loader should not care about, and instead have proper
wrappers so that the fallback code implements it when needed. Part of
the motivation for this then was to move all fallback code into its
own file therefore compartmentalizing it.
>> While at it, add a few helpers which vets the use of getting or
>> setting the timeout as an int. The main use of the timeout is
>> to set a timeout for completion, and that is used as an unsigned
>> long. There a few cases however where it makes sense to get or
>> set the timeout as an int, the helpers annotate these use cases
>> have been properly vetted for.
>
> This feels really odd to me. Why would you want to use it as an int,
> just keep it the same "size" everywhere and it should be simpler and
> easier to keep working correctly over time.
One is the input/output we provide for it uses ints all over so its
much easier to handle this as an int consistently in most places and
only deal with the long where needed. See above uses of
simple_strtol(), add_uevent_var(). Otherwise the inverse has to be
done. This was easier to deal with and vet for.
Luis
Powered by blists - more mailing lists