Skip to contentSkip to conversation

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

DISCUSSION Sudip Mukherjee (Codethink) 4 participants 9 messages Sep 6, 2022 – Sep 12, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

Signature · 2 lines
Regards
Sudip
#1 lore raw
Quoted 14 lines · Sudip Mukherjee (Codethink)

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)
      |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 3 lines

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

#2 lore raw

Hi Greg,

Quoted 16 lines · Greg Kroah-Hartman
Quoted 14 lines · Sudip Mukherjee (Codethink)

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)
      |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 6 lines
Quoted 3 lines

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".

Signature · 2 lines
Regards
Sudip
#3 lore raw
Quoted 24 lines · Sudip Mukherjee

Hi Greg,

Quoted 20 lines · Greg Kroah-Hartman
Quoted 17 lines · Sudip Mukherjee (Codethink)

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.

Quoted 8 lines
Quoted 2 lines

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

#4 lore raw
In reply to Sudip Mukherjee
Quoted 11 lines · Sudip Mukherjee
Quoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Sudip Mukherjee (Codethink)

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)
      |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

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

#5 lore raw
Quoted 25 lines

-----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.")

Quoted 1 line · Sudip Mukherjee

On Tue, Sep 6, 2022 at 6:15 PM Greg Kroah-Hartman

Quoted 1 line · <[email protected]> wrote:
Quoted 1 line

On Tue, Sep 06, 2022 at 03:23:22PM +0100, Sudip Mukherjee (Codethink)

Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines

drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:311:12: error:

'pci1xxxx_gpio_resume' defined but not used [-Werror=unused-function]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

311 | static int pci1xxxx_gpio_resume(struct device *dev)

      |            ^~~~~~~~~~~~~~~~~~~~

drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c:295:12: error:

Quoted 12 lines

'pci1xxxx_gpio_suspend' defined but not used [-Werror=unused-function]

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

295 | static int pci1xxxx_gpio_suspend(struct device *dev)

      |            ^~~~~~~~~~~~~~~~~~~~~

git bisect pointed to 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add

power management functions - suspend & resume handlers.").

Quoted 5 lines
Quoted 1 line
Quoted 1 line

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.

Quoted 3 lines

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.

#6 lore raw
In reply to Sudip Mukherjee (Codethink)
Quoted 27 lines

-----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)
      |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 4 lines

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

#7 lore raw
Quoted 28 lines · On Fri, Sep 9, 2022 at 4:12 PM <[email protected]> wrote:
Quoted 28 lines

-----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)
      |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 5 lines
Quoted 4 lines

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.

Signature · 2 lines
Regards
Sudip
#8 lore raw
Quoted 50 lines

-----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.")

Quoted 10 lines · On Fri, Sep 9, 2022 at 4:12 PM <[email protected]> wrote:
Quoted 10 lines

-----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:

Quoted 11 lines
Quoted 11 lines

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]

Quoted 4 lines
Quoted 4 lines

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]

Quoted 9 lines
Quoted 8 lines

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

Quoted 8 lines

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