2023-10-16 04:15:42

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the rtc tree

Hi all,

After merging the rtc tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/rtc/rtc-at91rm9200.c:561:13: error: 'at91_rtc_remove' defined but not used [-Werror=unused-function]
561 | static void at91_rtc_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

48bc8830fbed ("rtc: at91rm9200: Convert to platform remove callback returning void")

This function lost its __exit attribute (which includes a "used"
attribute) and exit_p(x) is NULL when not being built with
CONFIG_MODULE set. This build has CONFIG_RTC_DRV_AT91RM9200=y

I have reverted that commit for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-10-16 04:35:13

by Alexandre Belloni

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the rtc tree

On 16/10/2023 15:15:22+1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rtc tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/rtc/rtc-at91rm9200.c:561:13: error: 'at91_rtc_remove' defined but not used [-Werror=unused-function]
> 561 | static void at91_rtc_remove(struct platform_device *pdev)
> | ^~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 48bc8830fbed ("rtc: at91rm9200: Convert to platform remove callback returning void")
>
> This function lost its __exit attribute (which includes a "used"
> attribute) and exit_p(x) is NULL when not being built with
> CONFIG_MODULE set. This build has CONFIG_RTC_DRV_AT91RM9200=y
>
> I have reverted that commit for today.
>

Thanks for the report, this is fixed now.


--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2023-10-16 07:12:20

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the rtc tree

Hello,

On Mon, Oct 16, 2023 at 03:15:22PM +1100, Stephen Rothwell wrote:
> After merging the rtc tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/rtc/rtc-at91rm9200.c:561:13: error: 'at91_rtc_remove' defined but not used [-Werror=unused-function]
> 561 | static void at91_rtc_remove(struct platform_device *pdev)
> | ^~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 48bc8830fbed ("rtc: at91rm9200: Convert to platform remove callback returning void")

Ah, yes, sorry I missed that. That's what my coccinelle patch does (for
reasons unknown to me). For some other patches I noticed that, but this
one slipped through.

> This function lost its __exit attribute (which includes a "used"
> attribute) and exit_p(x) is NULL when not being built with
> CONFIG_MODULE set. This build has CONFIG_RTC_DRV_AT91RM9200=y

The better fix is to add the __exit again and I see that's what
Alexandre did in his rtc-next already.

Thanks for cleaning up after me,
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (1.21 kB)
signature.asc (499.00 B)
Download all attachments