2022-11-16 12:08:07

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

It is not used outside of its compilation unit, so there's no need to
export this variable.

Signed-off-by: Javier Martinez Canillas <[email protected]>
---

(no changes since v1)

drivers/base/dd.c | 6 ++----
include/linux/device/driver.h | 1 -
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 3dda62503102..040b4060f903 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -257,13 +257,11 @@ static int deferred_devs_show(struct seq_file *s, void *data)
DEFINE_SHOW_ATTRIBUTE(deferred_devs);

#ifdef CONFIG_MODULES
-int driver_deferred_probe_timeout = 10;
+static int driver_deferred_probe_timeout = 10;
#else
-int driver_deferred_probe_timeout;
+static int driver_deferred_probe_timeout;
#endif

-EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout);
-
static int __init deferred_probe_timeout_setup(char *str)
{
int timeout;
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 2114d65b862f..50d0a416a5e7 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -240,7 +240,6 @@ driver_find_device_by_acpi_dev(struct device_driver *drv, const void *adev)
}
#endif

-extern int driver_deferred_probe_timeout;
void driver_deferred_probe_add(struct device *dev);
int driver_deferred_probe_check_state(struct device *dev);
void driver_init(void);
--
2.38.1



2022-11-16 13:58:40

by Andrew Halaney

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

On Wed, Nov 16, 2022 at 12:53:45PM +0100, Javier Martinez Canillas wrote:
> It is not used outside of its compilation unit, so there's no need to
> export this variable.
>
> Signed-off-by: Javier Martinez Canillas <[email protected]>

Reviewed-by: Andrew Halaney <[email protected]>

> ---
>
> (no changes since v1)
>
> drivers/base/dd.c | 6 ++----
> include/linux/device/driver.h | 1 -
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index 3dda62503102..040b4060f903 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -257,13 +257,11 @@ static int deferred_devs_show(struct seq_file *s, void *data)
> DEFINE_SHOW_ATTRIBUTE(deferred_devs);
>
> #ifdef CONFIG_MODULES
> -int driver_deferred_probe_timeout = 10;
> +static int driver_deferred_probe_timeout = 10;
> #else
> -int driver_deferred_probe_timeout;
> +static int driver_deferred_probe_timeout;
> #endif
>
> -EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout);
> -
> static int __init deferred_probe_timeout_setup(char *str)
> {
> int timeout;
> diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
> index 2114d65b862f..50d0a416a5e7 100644
> --- a/include/linux/device/driver.h
> +++ b/include/linux/device/driver.h
> @@ -240,7 +240,6 @@ driver_find_device_by_acpi_dev(struct device_driver *drv, const void *adev)
> }
> #endif
>
> -extern int driver_deferred_probe_timeout;
> void driver_deferred_probe_add(struct device *dev);
> int driver_deferred_probe_check_state(struct device *dev);
> void driver_init(void);
> --
> 2.38.1
>


2022-11-17 20:13:05

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

On Wed, Nov 16, 2022 at 3:54 AM Javier Martinez Canillas
<[email protected]> wrote:
>
> It is not used outside of its compilation unit, so there's no need to
> export this variable.
>
> Signed-off-by: Javier Martinez Canillas <[email protected]>
> ---
>
> (no changes since v1)
>
> drivers/base/dd.c | 6 ++----
> include/linux/device/driver.h | 1 -
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index 3dda62503102..040b4060f903 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -257,13 +257,11 @@ static int deferred_devs_show(struct seq_file *s, void *data)
> DEFINE_SHOW_ATTRIBUTE(deferred_devs);
>
> #ifdef CONFIG_MODULES
> -int driver_deferred_probe_timeout = 10;
> +static int driver_deferred_probe_timeout = 10;
> #else
> -int driver_deferred_probe_timeout;
> +static int driver_deferred_probe_timeout;
> #endif
>
> -EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout);
> -

Yeah, I added the EXPORT for the regulator code to use it in
dca0b44957e5 but that got backed out when setting
driver_deferred_probe_timeout to 30s was reverted, and this bit was
forgotten.

Thanks for catching this!

Acked-by: John Stultz <[email protected]>

2022-12-12 09:21:44

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

On 12/12/22 09:59, Greg Kroah-Hartman wrote:
> On Mon, Dec 12, 2022 at 09:50:16AM +0100, Javier Martinez Canillas wrote:

[...]

>> Could you please pick this patch? Is a fix independent of the other
>> patches in the series and it has already been acked by John.
>
> It is the middle of the merge window and I can't take anything now until
> after 6.2-rc1 is out. I also really can't take individual patches out
> of a patch series easily, so please just resend it as a single patch
> when 6.2-rc1 is out.
>

Sure, I will. Thanks!

> thanks,
>
> greg k-h
>

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

2022-12-12 09:42:47

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

Hello Greg,

On 11/17/22 20:14, John Stultz wrote:
> On Wed, Nov 16, 2022 at 3:54 AM Javier Martinez Canillas
> <[email protected]> wrote:
>>
>> It is not used outside of its compilation unit, so there's no need to
>> export this variable.
>>
>> Signed-off-by: Javier Martinez Canillas <[email protected]>
>> ---
>>
>> (no changes since v1)
>>
>> drivers/base/dd.c | 6 ++----
>> include/linux/device/driver.h | 1 -
>> 2 files changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
>> index 3dda62503102..040b4060f903 100644
>> --- a/drivers/base/dd.c
>> +++ b/drivers/base/dd.c
>> @@ -257,13 +257,11 @@ static int deferred_devs_show(struct seq_file *s, void *data)
>> DEFINE_SHOW_ATTRIBUTE(deferred_devs);
>>
>> #ifdef CONFIG_MODULES
>> -int driver_deferred_probe_timeout = 10;
>> +static int driver_deferred_probe_timeout = 10;
>> #else
>> -int driver_deferred_probe_timeout;
>> +static int driver_deferred_probe_timeout;
>> #endif
>>
>> -EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout);
>> -
>
> Yeah, I added the EXPORT for the regulator code to use it in
> dca0b44957e5 but that got backed out when setting
> driver_deferred_probe_timeout to 30s was reverted, and this bit was
> forgotten.
>
> Thanks for catching this!
>
> Acked-by: John Stultz <[email protected]>
>

Could you please pick this patch? Is a fix independent of the other
patches in the series and it has already been acked by John.

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

2022-12-12 10:09:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable

On Mon, Dec 12, 2022 at 09:50:16AM +0100, Javier Martinez Canillas wrote:
> Hello Greg,
>
> On 11/17/22 20:14, John Stultz wrote:
> > On Wed, Nov 16, 2022 at 3:54 AM Javier Martinez Canillas
> > <[email protected]> wrote:
> >>
> >> It is not used outside of its compilation unit, so there's no need to
> >> export this variable.
> >>
> >> Signed-off-by: Javier Martinez Canillas <[email protected]>
> >> ---
> >>
> >> (no changes since v1)
> >>
> >> drivers/base/dd.c | 6 ++----
> >> include/linux/device/driver.h | 1 -
> >> 2 files changed, 2 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> >> index 3dda62503102..040b4060f903 100644
> >> --- a/drivers/base/dd.c
> >> +++ b/drivers/base/dd.c
> >> @@ -257,13 +257,11 @@ static int deferred_devs_show(struct seq_file *s, void *data)
> >> DEFINE_SHOW_ATTRIBUTE(deferred_devs);
> >>
> >> #ifdef CONFIG_MODULES
> >> -int driver_deferred_probe_timeout = 10;
> >> +static int driver_deferred_probe_timeout = 10;
> >> #else
> >> -int driver_deferred_probe_timeout;
> >> +static int driver_deferred_probe_timeout;
> >> #endif
> >>
> >> -EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout);
> >> -
> >
> > Yeah, I added the EXPORT for the regulator code to use it in
> > dca0b44957e5 but that got backed out when setting
> > driver_deferred_probe_timeout to 30s was reverted, and this bit was
> > forgotten.
> >
> > Thanks for catching this!
> >
> > Acked-by: John Stultz <[email protected]>
> >
>
> Could you please pick this patch? Is a fix independent of the other
> patches in the series and it has already been acked by John.

It is the middle of the merge window and I can't take anything now until
after 6.2-rc1 is out. I also really can't take individual patches out
of a patch series easily, so please just resend it as a single patch
when 6.2-rc1 is out.

thanks,

greg k-h