Message ID | 20230718134119.118018-1-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | mfd: rz-mtu3: Fix COMPILE_TEST build issue | expand |
Hi All, I would like to drop this patch as better one submitted by Arnd[1]. [1] https://patchwork.ozlabs.org/project/linux-pwm/patch/20230719090430.1925182-1-arnd@kernel.org/ Cheers, Biju > -----Original Message----- > From: Biju Das <biju.das.jz@bp.renesas.com> > Sent: Tuesday, July 18, 2023 2:41 PM > To: Lee Jones <lee@kernel.org>; Thierry Reding > <thierry.reding@gmail.com> > Cc: Biju Das <biju.das.jz@bp.renesas.com>; Uwe Kleine-König <u.kleine- > koenig@pengutronix.de>; linux-pwm@vger.kernel.org; Geert Uytterhoeven > <geert+renesas@glider.be>; Prabhakar Mahadev Lad <prabhakar.mahadev- > lad.rj@bp.renesas.com>; linux-renesas-soc@vger.kernel.org; Randy Dunlap > <rd.dunlab@gmail.com> > Subject: [PATCH] mfd: rz-mtu3: Fix COMPILE_TEST build issue > > When (MFD) RZ_MTU3=m and PWM_RZ_MTU3=y, there are numerous build errors: > > ld: vmlinux.o: in function `rz_mtu3_pwm_config': > drivers/pwm/pwm-rz-mtu3.c:374: undefined reference to `rz_mtu3_disable' > ld: drivers/pwm/pwm-rz-mtu3.c:377: undefined reference to > `rz_mtu3_8bit_ch_write' > ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers': > drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to > `rz_mtu3_16bit_ch_write' > ld: vmlinux.o: in function `rz_mtu3_pwm_config': > drivers/pwm/pwm-rz-mtu3.c:382: undefined reference to > `rz_mtu3_8bit_ch_write' > ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers': > drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to > `rz_mtu3_16bit_ch_write' > ld: drivers/pwm/pwm-rz-mtu3.c:111: undefined reference to > `rz_mtu3_16bit_ch_write' > ld: vmlinux.o: in function `rz_mtu3_pwm_config': > drivers/pwm/pwm-rz-mtu3.c:397: undefined reference to `rz_mtu3_enable' > ld: vmlinux.o: in function `rz_mtu3_pwm_disable': > drivers/pwm/pwm-rz-mtu3.c:259: undefined reference to > `rz_mtu3_8bit_ch_write' > ld: drivers/pwm/pwm-rz-mtu3.c:264: undefined reference to > `rz_mtu3_disable' > ld: vmlinux.o: in function `rz_mtu3_pwm_enable': > drivers/pwm/pwm-rz-mtu3.c:230: undefined reference to > `rz_mtu3_8bit_ch_write' > ld: drivers/pwm/pwm-rz-mtu3.c:234: undefined reference to > `rz_mtu3_8bit_ch_write' > ld: drivers/pwm/pwm-rz-mtu3.c:238: undefined reference to > `rz_mtu3_enable' > ld: vmlinux.o: in function `rz_mtu3_pwm_is_ch_enabled': > drivers/pwm/pwm-rz-mtu3.c:155: undefined reference to > `rz_mtu3_is_enabled' > ld: drivers/pwm/pwm-rz-mtu3.c:162: undefined reference to > `rz_mtu3_8bit_ch_read' > ld: vmlinux.o: in function `rz_mtu3_pwm_read_tgr_registers': > drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to > `rz_mtu3_16bit_ch_read' > ld: drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to > `rz_mtu3_16bit_ch_read' > ld: drivers/pwm/pwm-rz-mtu3.c:103: undefined reference to > `rz_mtu3_16bit_ch_read' > ld: vmlinux.o: in function `rz_mtu3_pwm_get_state': > drivers/pwm/pwm-rz-mtu3.c:296: undefined reference to > `rz_mtu3_8bit_ch_read' > > Replace the macro IS_ENABLED->IS_REACHABLE, allowing COMPILE_TEST to be > built for PWM_RZ_MTU3. > > Reported-by: Randy Dunlap <rd.dunlab@gmail.com> > Closes: > https://lore.k/ > ernel.org%2Flinux- > pwm%2FTYWPR01MB877550F95CF000B63E9AD022C238A%40TYWPR01MB8775.jpnprd01.pr > od.outlook.com%2FT%2F%23t&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C > fcf81d7f6a964899f30608db8794ae02%7C53d82571da1947e49cb4625a166a4a2a%7C0% > 7C0%7C638252844861149534%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJ > QIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q2K5xi > BSEtwf0cwP98ITkZPGs%2FPKBDxeAgAww7x7VME%3D&reserved=0 > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > --- > include/linux/mfd/rz-mtu3.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/mfd/rz-mtu3.h b/include/linux/mfd/rz-mtu3.h > index c5173bc06270..4f15c0dead60 100644 > --- a/include/linux/mfd/rz-mtu3.h > +++ b/include/linux/mfd/rz-mtu3.h > @@ -151,7 +151,7 @@ struct rz_mtu3 { > void *priv_data; > }; > > -#if IS_ENABLED(CONFIG_RZ_MTU3) > +#if IS_REACHABLE(CONFIG_RZ_MTU3) > static inline bool rz_mtu3_request_channel(struct rz_mtu3_channel *ch) > { > mutex_lock(&ch->lock); > -- > 2.25.1
diff --git a/include/linux/mfd/rz-mtu3.h b/include/linux/mfd/rz-mtu3.h index c5173bc06270..4f15c0dead60 100644 --- a/include/linux/mfd/rz-mtu3.h +++ b/include/linux/mfd/rz-mtu3.h @@ -151,7 +151,7 @@ struct rz_mtu3 { void *priv_data; }; -#if IS_ENABLED(CONFIG_RZ_MTU3) +#if IS_REACHABLE(CONFIG_RZ_MTU3) static inline bool rz_mtu3_request_channel(struct rz_mtu3_channel *ch) { mutex_lock(&ch->lock);
When (MFD) RZ_MTU3=m and PWM_RZ_MTU3=y, there are numerous build errors: ld: vmlinux.o: in function `rz_mtu3_pwm_config': drivers/pwm/pwm-rz-mtu3.c:374: undefined reference to `rz_mtu3_disable' ld: drivers/pwm/pwm-rz-mtu3.c:377: undefined reference to `rz_mtu3_8bit_ch_write' ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers': drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to `rz_mtu3_16bit_ch_write' ld: vmlinux.o: in function `rz_mtu3_pwm_config': drivers/pwm/pwm-rz-mtu3.c:382: undefined reference to `rz_mtu3_8bit_ch_write' ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers': drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to `rz_mtu3_16bit_ch_write' ld: drivers/pwm/pwm-rz-mtu3.c:111: undefined reference to `rz_mtu3_16bit_ch_write' ld: vmlinux.o: in function `rz_mtu3_pwm_config': drivers/pwm/pwm-rz-mtu3.c:397: undefined reference to `rz_mtu3_enable' ld: vmlinux.o: in function `rz_mtu3_pwm_disable': drivers/pwm/pwm-rz-mtu3.c:259: undefined reference to `rz_mtu3_8bit_ch_write' ld: drivers/pwm/pwm-rz-mtu3.c:264: undefined reference to `rz_mtu3_disable' ld: vmlinux.o: in function `rz_mtu3_pwm_enable': drivers/pwm/pwm-rz-mtu3.c:230: undefined reference to `rz_mtu3_8bit_ch_write' ld: drivers/pwm/pwm-rz-mtu3.c:234: undefined reference to `rz_mtu3_8bit_ch_write' ld: drivers/pwm/pwm-rz-mtu3.c:238: undefined reference to `rz_mtu3_enable' ld: vmlinux.o: in function `rz_mtu3_pwm_is_ch_enabled': drivers/pwm/pwm-rz-mtu3.c:155: undefined reference to `rz_mtu3_is_enabled' ld: drivers/pwm/pwm-rz-mtu3.c:162: undefined reference to `rz_mtu3_8bit_ch_read' ld: vmlinux.o: in function `rz_mtu3_pwm_read_tgr_registers': drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to `rz_mtu3_16bit_ch_read' ld: drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to `rz_mtu3_16bit_ch_read' ld: drivers/pwm/pwm-rz-mtu3.c:103: undefined reference to `rz_mtu3_16bit_ch_read' ld: vmlinux.o: in function `rz_mtu3_pwm_get_state': drivers/pwm/pwm-rz-mtu3.c:296: undefined reference to `rz_mtu3_8bit_ch_read' Replace the macro IS_ENABLED->IS_REACHABLE, allowing COMPILE_TEST to be built for PWM_RZ_MTU3. Reported-by: Randy Dunlap <rd.dunlab@gmail.com> Closes: https://lore.kernel.org/linux-pwm/TYWPR01MB877550F95CF000B63E9AD022C238A@TYWPR01MB8775.jpnprd01.prod.outlook.com/T/#t Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- include/linux/mfd/rz-mtu3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)