Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-27 Thread Enrico Weigelt, metux IT consult
On 18.11.20 11:01, Andy Shevchenko wrote: >>> So a system without CONFIG_OF might still make use of .of_match_table? >> >> Yep! > > If you are curious: > https://elixir.bootlin.com/linux/latest/source/drivers/acpi/bus.c#L615 Phuh, this changes everything ... sorry, didn't know that. If ACPI now

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2020 at 12:09 PM Lee Jones wrote: > On Wed, 18 Nov 2020, Andy Shevchenko wrote: > > On Wed, Nov 18, 2020 at 11:56 AM Andy Shevchenko > > wrote: > > > On Wed, Nov 18, 2020 at 11:54 AM Uwe Kleine-König > > > wrote: > > > > On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko w

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-18 Thread Lee Jones
On Wed, 18 Nov 2020, Andy Shevchenko wrote: > On Wed, Nov 18, 2020 at 11:56 AM Andy Shevchenko > wrote: > > On Wed, Nov 18, 2020 at 11:54 AM Uwe Kleine-König > > wrote: > > > On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko wrote: > > ... > > > > So a system without CONFIG_OF might st

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2020 at 11:56 AM Andy Shevchenko wrote: > On Wed, Nov 18, 2020 at 11:54 AM Uwe Kleine-König > wrote: > > On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko wrote: ... > > So a system without CONFIG_OF might still make use of .of_match_table? > > Yep! If you are curious:

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2020 at 11:54 AM Uwe Kleine-König wrote: > On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko wrote: > > On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult > > wrote: > > > > > > The of_match_ptr(foo) macro evaluates to foo, only if > > > CONFIG_OF is set, oth

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-18 Thread Uwe Kleine-König
On Tue, Nov 17, 2020 at 06:45:37PM +0200, Andy Shevchenko wrote: > On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult > wrote: > > > > The of_match_ptr(foo) macro evaluates to foo, only if > > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > > CONFIG_ACPI. That's very h

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread kernel test robot
Hi "Enrico, I love your patch! Perhaps something to improve: [auto build test WARNING on gpio/for-next] [also build test WARNING on joel-aspeed/for-next v5.10-rc4 next-20201117] [cannot apply to xlnx/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitti

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread kernel test robot
Hi "Enrico, I love your patch! Perhaps something to improve: [auto build test WARNING on gpio/for-next] [also build test WARNING on joel-aspeed/for-next v5.10-rc4 next-20201117] [cannot apply to xlnx/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitti

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Andy Shevchenko
On Tue, Nov 17, 2020 at 6:45 PM Andy Shevchenko wrote: > On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult > wrote: > > > > The of_match_ptr(foo) macro evaluates to foo, only if > > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > > CONFIG_ACPI. That's very helpful fo

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Andy Shevchenko
On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult wrote: > > The of_match_ptr(foo) macro evaluates to foo, only if > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > CONFIG_ACPI. That's very helpful for drivers that can be used > with or without oftree / acpi. > > Even

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Lee Jones
On Tue, 17 Nov 2020, Thierry Reding wrote: > On Tue, Nov 17, 2020 at 04:43:40PM +0100, Enrico Weigelt, metux IT consult > wrote: > > The of_match_ptr(foo) macro evaluates to foo, only if > > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > > CONFIG_ACPI. That's very helpful for driv

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Thierry Reding
On Tue, Nov 17, 2020 at 04:43:40PM +0100, Enrico Weigelt, metux IT consult wrote: > The of_match_ptr(foo) macro evaluates to foo, only if > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > CONFIG_ACPI. That's very helpful for drivers that can be used > with or without oftree / acpi.

[PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Enrico Weigelt, metux IT consult
The of_match_ptr(foo) macro evaluates to foo, only if CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with CONFIG_ACPI. That's very helpful for drivers that can be used with or without oftree / acpi. Even though most of the drivers touched here probably don't actually need that, it's also