[PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Mar 22 13:59:33 PDT 2023
Hello Krzysztof,
On Wed, Mar 22, 2023 at 07:12:08PM +0100, Krzysztof Kozlowski wrote:
> On 12/03/2023 16:42, Uwe Kleine-König wrote:
> > Hello,
> >
> > On Sun, Mar 12, 2023 at 02:51:19PM +0100, Krzysztof Kozlowski wrote:
> >> The driver can match only via the DT table so the table should be always
> >> used and the of_match_ptr does not have any sense (this also allows ACPI
> >> matching via PRP0001, even though it might not be relevant here). This
> >> also fixes !CONFIG_OF error:
> >>
> >> drivers/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
> >
> > Hmm, I wonder what else is required here to trigger that warning. On
> > amd64 I also disabled CONFIG_MODULES as otherwise rcar_pwm_of_table is
> > used by
> >
> > MODULE_DEVICE_TABLE(of, rcar_pwm_of_table);
>
> 1. x86_64 allyesconfig, remove CONFIG_OF
> 2. Build with W=1 (this was GCC)
Ah right, it's not that CONFIG_MODULES must be unset, but the driver
must not be configured as module. So I suggest
This also fixes the compiler warning
drivers/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]
for builds with CONFIG_OF=n, CONFIG_PWM_RCAR=y and W=1.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230322/a04b0152/attachment.sig>
More information about the linux-arm-kernel
mailing list