2022-09-06 15:43:32

by Sudip Mukherjee

[permalink] [raw]
Subject: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

Hi All,

The builds of riscv, s390, csky, alpha and loongarch allmodconfig have
failed to build next-20220906 with the error:


drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error: 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
311 | static int pci1xxxx_gpio_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error: 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
295 | static int pci1xxxx_gpio_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~


git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.").

I will be happy to test any patch or provide any extra log if needed.


--
Regards
Sudip


2022-09-06 18:14:29

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink) wrote:
> Hi All,
>
> The builds of riscv, s390, csky, alpha and loongarch allmodconfig have
> failed to build next-20220906 with the error:
>
>
> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error: 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error: 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~
>
>
> git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.").
>
> I will be happy to test any patch or provide any extra log if needed.

Hopefully this commit will fix this:
https://lore.kernel.org/r/[email protected]


thanks,

greg k-h

2022-09-06 21:10:26

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

Hi Greg,

On Tue, Sep 6, 2022 at 6:15 PM Greg Kroah-Hartman
<[email protected]> wrote:
>
> On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink) wrote:
> > Hi All,
> >
> > The builds of riscv, s390, csky, alpha and loongarch allmodconfig have
> > failed to build next-20220906 with the error:
> >
> >
> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error: 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> > | ^~~~~~~~~~~~~~~~~~~~
> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error: 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> > | ^~~~~~~~~~~~~~~~~~~~~
> >
> >
> > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.").
> >
> > I will be happy to test any patch or provide any extra log if needed.
>
> Hopefully this commit will fix this:
> https://lore.kernel.org/r/[email protected]

No, it didn't. :(

Looking at other drivers which uses SIMPLE_DEV_PM_OPS, I think
pci1xxxx_gpio_suspend() and pci1xxxx_gpio_resume() needs to be under
"#ifdef CONFIG_PM_SLEEP".


--
Regards
Sudip

2022-09-07 06:26:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

On Tue, Sep 06, 2022 at 10:07:53PM +0100, Sudip Mukherjee wrote:
> Hi Greg,
>
> On Tue, Sep 6, 2022 at 6:15 PM Greg Kroah-Hartman
> <[email protected]> wrote:
> >
> > On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink) wrote:
> > > Hi All,
> > >
> > > The builds of riscv, s390, csky, alpha and loongarch allmodconfig have
> > > failed to build next-20220906 with the error:
> > >
> > >
> > > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error: 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> > > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> > > | ^~~~~~~~~~~~~~~~~~~~
> > > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error: 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> > > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> > > | ^~~~~~~~~~~~~~~~~~~~~
> > >
> > >
> > > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.").
> > >
> > > I will be happy to test any patch or provide any extra log if needed.
> >
> > Hopefully this commit will fix this:
> > https://lore.kernel.org/r/[email protected]
>
> No, it didn't. :(
>
> Looking at other drivers which uses SIMPLE_DEV_PM_OPS, I think
> pci1xxxx_gpio_suspend() and pci1xxxx_gpio_resume() needs to be under
> "#ifdef CONFIG_PM_SLEEP".

Great, Kumaravel, can you send a fixup patch for this?

thanks,

greg k-h

2022-09-07 09:17:55

by Arnd Bergmann

[permalink] [raw]
Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

On Tue, Sep 6, 2022, at 11:07 PM, Sudip Mukherjee wrote:
> On Tue, Sep 6, 2022 at 6:15 PM Greg Kroah-Hartman <[email protected]> wrote:
>> On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink) wrote:
>> >
>> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error: 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
>> > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
>> > | ^~~~~~~~~~~~~~~~~~~~
>> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error: 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
>> > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
>> > | ^~~~~~~~~~~~~~~~~~~~~
>> >
>> >
>> > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.").
>> >
>
> Looking at other drivers which uses SIMPLE_DEV_PM_OPS, I think
> pci1xxxx_gpio_suspend() and pci1xxxx_gpio_resume() needs to be under
> "#ifdef CONFIG_PM_SLEEP".

That would work, but a better fix is to use DEFINE_SIMPLE_DEV_PM_OPS()
in place of the deprecated SIMPLE_DEV_PM_OPS().

Arnd

2022-09-07 12:54:43

by Kumaravel Thiagarajan

[permalink] [raw]
Subject: RE: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

> -----Original Message-----
> From: Arnd Bergmann <[email protected]>
> Sent: Wednesday, September 7, 2022 2:12 PM
> To: Sudip Mukherjee <[email protected]>; Greg Kroah-
> Hartman <[email protected]>
> Cc: Kumaravel Thiagarajan - I21417
> <[email protected]>; open list:GPIO SUBSYSTEM
> <[email protected]>; linux-kernel <[email protected]>;
> linux-next <[email protected]>
> Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc:
> microchip: pci1xxxx: Add power management functions - suspend & resume
> handlers.")
>
>
> On Tue, Sep 6, 2022, at 11:07 PM, Sudip Mukherjee wrote:
> > On Tue, Sep 6, 2022 at 6:15 PM Greg Kroah-Hartman
> <[email protected]> wrote:
> >> On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink)
> wrote:
> >> >
> >> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error:
> 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> >> > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> >> > | ^~~~~~~~~~~~~~~~~~~~
> >> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error:
> 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> >> > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> >> > | ^~~~~~~~~~~~~~~~~~~~~
> >> >
> >> >
> >> > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add
> power management functions - suspend & resume handlers.").
> >> >
> >
> > Looking at other drivers which uses SIMPLE_DEV_PM_OPS, I think
> > pci1xxxx_gpio_suspend() and pci1xxxx_gpio_resume() needs to be under
> > "#ifdef CONFIG_PM_SLEEP".
Thank you Sudip ! I will review this.
>
> That would work, but a better fix is to use DEFINE_SIMPLE_DEV_PM_OPS()
> in place of the deprecated SIMPLE_DEV_PM_OPS().
Thank you Arnd ! I will review this.


2022-09-09 15:15:02

by Kumaravel Thiagarajan

[permalink] [raw]
Subject: RE: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

> -----Original Message-----
> From: Sudip Mukherjee (Codethink) <[email protected]>
> Sent: Tuesday, September 6, 2022 7:53 PM
> To: Kumaravel Thiagarajan - I21417
> <[email protected]>; Greg Kroah-Hartman
> <[email protected]>
> Cc: Arnd Bergmann <[email protected]>; [email protected]; linux-
> [email protected]; [email protected]
> Subject: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip:
> pci1xxxx: Add power management functions - suspend & resume handlers.")
>
> Hi All,
>
> The builds of riscv, s390, csky, alpha and loongarch allmodconfig have failed
> to build next-20220906 with the error:
>
>
> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error:
> 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error:
> 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~
>
>
> git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power
> management functions - suspend & resume handlers.").
>
> I will be happy to test any patch or provide any extra log if needed.
Sudip, can you please share the .config file that you used for riscv and if possible other .config files too?

Thank You.

Regards,
Kumaravel

2022-09-09 18:14:13

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

On Fri, Sep 9, 2022 at 4:12 PM <[email protected]> wrote:
>
> > -----Original Message-----
> > From: Sudip Mukherjee (Codethink) <[email protected]>
> > Sent: Tuesday, September 6, 2022 7:53 PM
> > To: Kumaravel Thiagarajan - I21417
> > <[email protected]>; Greg Kroah-Hartman
> > <[email protected]>
> > Cc: Arnd Bergmann <[email protected]>; [email protected]; linux-
> > [email protected]; [email protected]
> > Subject: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip:
> > pci1xxxx: Add power management functions - suspend & resume handlers.")
> >
> > Hi All,
> >
> > The builds of riscv, s390, csky, alpha and loongarch allmodconfig have failed
> > to build next-20220906 with the error:
> >
> >
> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error:
> > 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]
> > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> > | ^~~~~~~~~~~~~~~~~~~~
> > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error:
> > 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]
> > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> > | ^~~~~~~~~~~~~~~~~~~~~
> >
> >
> > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power
> > management functions - suspend & resume handlers.").
> >
> > I will be happy to test any patch or provide any extra log if needed.
> Sudip, can you please share the .config file that you used for riscv and if possible other .config files too?

Sure, here is the one for loongarch and riscv. Please let me know if
you need the others and I can generate them for you. These are just
the normal allmodconfig nothing special.
Not sure what you are trying to see here, but imho, you will see the
problem if you check the definition of SET_SYSTEM_SLEEP_PM_OPS in
include/linux/pm.h.


--
Regards
Sudip


Attachments:
loongarch_allmodconfig.gz (74.20 kB)
riscv_allmodconfig.gz (74.25 kB)
Download all attachments

2022-09-12 11:54:04

by Kumaravel Thiagarajan

[permalink] [raw]
Subject: RE: build failure of next-20220906 due to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")

> -----Original Message-----
> From: Sudip Mukherjee <[email protected]>
> Sent: Friday, September 9, 2022 11:22 PM
> To: Kumaravel Thiagarajan - I21417 <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>; Arnd Bergmann
> <[email protected]>; [email protected]; linux-kernel <linux-
> [email protected]>; linux-next <[email protected]>
> Subject: Re: build failure of next-20220906 due to 4ec7ac90ff39 ("misc:
> microchip: pci1xxxx: Add power management functions - suspend & resume
> handlers.")
>
> On Fri, Sep 9, 2022 at 4:12 PM <[email protected]>
> wrote:
> >
> > > -----Original Message-----
> > > From: Sudip Mukherjee (Codethink) <[email protected]>
> > > Sent: Tuesday, September 6, 2022 7:53 PM
> > > To: Kumaravel Thiagarajan - I21417
> > > <[email protected]>; Greg Kroah-Hartman
> > > <[email protected]>
> > > Cc: Arnd Bergmann <[email protected]>; [email protected];
> > > linux- [email protected]; [email protected]
> > > Subject: build failure of next-20220906 due to 4ec7ac90ff39 ("misc:
> microchip:
> > > pci1xxxx: Add power management functions - suspend & resume
> > > handlers.")
> > >
> > > Hi All,
> > >
> > > The builds of riscv, s390, csky, alpha and loongarch allmodconfig
> > > have failed to build next-20220906 with the error:
> > >
> > >
> > > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error:
> > > 'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-
> function]
> > > 311 | static int pci1xxxx_gpio_resume(struct device *dev)
> > > | ^~~~~~~~~~~~~~~~~~~~
> > > drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error:
> > > 'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-
> function]
> > > 295 | static int pci1xxxx_gpio_suspend(struct device *dev)
> > > | ^~~~~~~~~~~~~~~~~~~~~
> > >
> > >
> > > git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add
> > > power management functions - suspend & resume handlers.").
> > >
> > > I will be happy to test any patch or provide any extra log if needed.
> > Sudip, can you please share the .config file that you used for riscv and if
> possible other .config files too?
>
> Sure, here is the one for loongarch and riscv. Please let me know if you need
> the others and I can generate them for you. These are just the normal
> allmodconfig nothing special.
> Not sure what you are trying to see here, but imho, you will see the problem
> if you check the definition of SET_SYSTEM_SLEEP_PM_OPS in
> include/linux/pm.h.
Sudip, Thank you for sharing additional information and it helped so much.

Regards,
Kumaravel