diff mbox series

[v2,char-misc-next] misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver

Message ID 20220915094729.646185-1-kumaravel.thiagarajan@microchip.com
State Accepted
Commit dc2c96a39da197da137a797f22bb408b5865514d
Headers show
Series [v2,char-misc-next] misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver | expand

Commit Message

Kumaravel Thiagarajan Sept. 15, 2022, 9:47 a.m. UTC
build errors listed below and reported by Sudip Mukherjee
<sudipm.mukherjee@gmail.com> for the builds of
riscv, s390, csky, alpha and loongarch allmodconfig are fixed in
this patch.

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)
      |            ^~~~~~~~~~~~~~~~~~~~~

Fixes: 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
---
Changes in v2:
  - Mention as Sudip had reported in the commit description
    as suggested by Bagas Sanjaya <bagasdotme@gmail.com>
---
 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Conor Dooley Sept. 21, 2022, 4:48 p.m. UTC | #1
On Thu, Sep 15, 2022 at 03:17:29PM +0530, Kumaravel Thiagarajan wrote:
> misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place  of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver
                                                                    ^^
FYI, double space in the subject here, rather a mouthful though and
surely everything after SIMPLE_DEV_PM_OPS() is redundant?

> build errors listed below and reported by Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> for the builds of
> riscv, s390, csky, alpha and loongarch allmodconfig are fixed in
> this patch.

allmodconfig has been broken for a while now, and this patch appears
to have been sitting for a week & a second fix has shown up at:
https://lore.kernel.org/all/20220919094250.858716-1-zengheng4@huawei.com/

I do note that Zeng Hang's patch does slightly more than this one does,
but idk about about the PM APIs /shrug.

Has this just slipped under the radar since so many of us were
attending conferences etc the last while or are you looking for
Kumaravel to do something more here?

Thanks,
Conor.

> 
> 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)
>       |            ^~~~~~~~~~~~~~~~~~~~~
> 
> Fixes: 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")
> Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
> ---
> Changes in v2:
>   - Mention as Sudip had reported in the commit description
>     as suggested by Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
> index 9cc771c604ed..4cd541166b0c 100644
> --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
> +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
> @@ -405,7 +405,7 @@ static int pci1xxxx_gpio_probe(struct auxiliary_device *aux_dev,
>  	return devm_gpiochip_add_data(&aux_dev->dev, &priv->gpio, priv);
>  }
>  
> -static SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
>  
>  static const struct auxiliary_device_id pci1xxxx_gpio_auxiliary_id_table[] = {
>  	{.name = "mchp_pci1xxxx_gp.gp_gpio"},
> -- 
> 2.25.1
> 
>
Zeng Heng Sept. 22, 2022, 3:20 a.m. UTC | #2
在 2022/9/22 0:48, Conor Dooley 写道:
> On Thu, Sep 15, 2022 at 03:17:29PM +0530, Kumaravel Thiagarajan wrote:
>> misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place  of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver
>                                                                      ^^
> FYI, double space in the subject here, rather a mouthful though and
> surely everything after SIMPLE_DEV_PM_OPS() is redundant?
>
>> build errors listed below and reported by Sudip Mukherjee
>> <sudipm.mukherjee@gmail.com> for the builds of
>> riscv, s390, csky, alpha and loongarch allmodconfig are fixed in
>> this patch.
> allmodconfig has been broken for a while now, and this patch appears
> to have been sitting for a week & a second fix has shown up at:
> https://lore.kernel.org/all/20220919094250.858716-1-zengheng4@huawei.com/
>
> I do note that Zeng Hang's patch does slightly more than this one does,
> but idk about about the PM APIs /shrug.

Using 'pm_sleep_ptr' here just for telling compiler to optimize the 
struct pci1xxxx_gpio_pm_ops,

which is located in ro_data section.

~~~

0000000000000770 t pci1xxxx_gpio_irq_set_mask
00000000000008b2 t pci1xxxx_gpio_irq_unmask
0000000000000080 r pci1xxxx_gpio_pm_ops        <--
0000000000000000 t pci1xxxx_gpio_probe
0000000000000636 t pci1xxxx_gpio_set

~~~

> Has this just slipped under the radar since so many of us were
> attending conferences etc the last while or are you looking for
> Kumaravel to do something more here?

Just my fault about double check similar patch emails in the concerned area,

or maybe I would pass the warning and not send the patch.

Thanks all.


Best regards,

Zeng Heng

>
> Thanks,
> Conor.
>
>> 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)
>>        |            ^~~~~~~~~~~~~~~~~~~~~
>>
>> Fixes: 4ec7ac90ff39 ("misc: microchip: pci1xxxx: Add power management functions - suspend & resume handlers.")
>> Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
>> Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
>> ---
>> Changes in v2:
>>    - Mention as Sudip had reported in the commit description
>>      as suggested by Bagas Sanjaya <bagasdotme@gmail.com>
>> ---
>>   drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
>> index 9cc771c604ed..4cd541166b0c 100644
>> --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
>> +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
>> @@ -405,7 +405,7 @@ static int pci1xxxx_gpio_probe(struct auxiliary_device *aux_dev,
>>   	return devm_gpiochip_add_data(&aux_dev->dev, &priv->gpio, priv);
>>   }
>>   
>> -static SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
>> +static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
>>   
>>   static const struct auxiliary_device_id pci1xxxx_gpio_auxiliary_id_table[] = {
>>   	{.name = "mchp_pci1xxxx_gp.gp_gpio"},
>> -- 
>> 2.25.1
>>
>>
Greg KH Sept. 22, 2022, 2:53 p.m. UTC | #3
On Wed, Sep 21, 2022 at 05:48:45PM +0100, Conor Dooley wrote:
> On Thu, Sep 15, 2022 at 03:17:29PM +0530, Kumaravel Thiagarajan wrote:
> > misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place  of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver
>                                                                     ^^
> FYI, double space in the subject here, rather a mouthful though and
> surely everything after SIMPLE_DEV_PM_OPS() is redundant?
> 
> > build errors listed below and reported by Sudip Mukherjee
> > <sudipm.mukherjee@gmail.com> for the builds of
> > riscv, s390, csky, alpha and loongarch allmodconfig are fixed in
> > this patch.
> 
> allmodconfig has been broken for a while now, and this patch appears
> to have been sitting for a week & a second fix has shown up at:
> https://lore.kernel.org/all/20220919094250.858716-1-zengheng4@huawei.com/
> 
> I do note that Zeng Hang's patch does slightly more than this one does,
> but idk about about the PM APIs /shrug.
> 
> Has this just slipped under the radar since so many of us were
> attending conferences etc the last while or are you looking for
> Kumaravel to do something more here?

I've taken this change now, sorry for the delay.  Was not looking at
patches while at conferences.

greg k-h
Conor Dooley Sept. 22, 2022, 3:40 p.m. UTC | #4
On Thu, Sep 22, 2022 at 04:53:52PM +0200, Greg KH wrote:
> On Wed, Sep 21, 2022 at 05:48:45PM +0100, Conor Dooley wrote:
> > On Thu, Sep 15, 2022 at 03:17:29PM +0530, Kumaravel Thiagarajan wrote:
> > > misc: microchip: pci1xxxx: use DEFINE_SIMPLE_DEV_PM_OPS() in place  of the SIMPLE_DEV_PM_OPS() in pci1xxxx's gpio driver
> >                                                                     ^^
> > FYI, double space in the subject here, rather a mouthful though and
> > surely everything after SIMPLE_DEV_PM_OPS() is redundant?
> > 
> > > build errors listed below and reported by Sudip Mukherjee
> > > <sudipm.mukherjee@gmail.com> for the builds of
> > > riscv, s390, csky, alpha and loongarch allmodconfig are fixed in
> > > this patch.
> > 
> > allmodconfig has been broken for a while now, and this patch appears
> > to have been sitting for a week & a second fix has shown up at:
> > https://lore.kernel.org/all/20220919094250.858716-1-zengheng4@huawei.com/
> > 
> > I do note that Zeng Hang's patch does slightly more than this one does,
> > but idk about about the PM APIs /shrug.
> > 
> > Has this just slipped under the radar since so many of us were
> > attending conferences etc the last while or are you looking for
> > Kumaravel to do something more here?
> 
> I've taken this change now, sorry for the delay.  Was not looking at
> patches while at conferences.

Great, thanks Greg!
diff mbox series

Patch

diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
index 9cc771c604ed..4cd541166b0c 100644
--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
+++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
@@ -405,7 +405,7 @@  static int pci1xxxx_gpio_probe(struct auxiliary_device *aux_dev,
 	return devm_gpiochip_add_data(&aux_dev->dev, &priv->gpio, priv);
 }
 
-static SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
 
 static const struct auxiliary_device_id pci1xxxx_gpio_auxiliary_id_table[] = {
 	{.name = "mchp_pci1xxxx_gp.gp_gpio"},