diff mbox series

mfd: atmel-flexcom: fix compilation warning

Message ID 20211207111515.814653-1-claudiu.beznea@microchip.com (mailing list archive)
State New, archived
Headers show
Series mfd: atmel-flexcom: fix compilation warning | expand

Commit Message

Claudiu Beznea Dec. 7, 2021, 11:15 a.m. UTC
Fix "unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]"
compilation warning by using __maybe_unused on PM ops.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/mfd/atmel-flexcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas Ferre Dec. 7, 2021, 1:40 p.m. UTC | #1
On 07/12/2021 at 12:15, Claudiu Beznea wrote:
> Fix "unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]"
> compilation warning by using __maybe_unused on PM ops.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks Claudiu. Best regards,
   Nicolas

> ---
>   drivers/mfd/atmel-flexcom.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/atmel-flexcom.c b/drivers/mfd/atmel-flexcom.c
> index 559eb4d352b6..33caa4fba6af 100644
> --- a/drivers/mfd/atmel-flexcom.c
> +++ b/drivers/mfd/atmel-flexcom.c
> @@ -105,7 +105,7 @@ static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
>   	return 0;
>   }
>   
> -static const struct dev_pm_ops atmel_flexcom_pm_ops = {
> +static const struct dev_pm_ops __maybe_unused atmel_flexcom_pm_ops = {
>   	.resume_noirq = atmel_flexcom_resume_noirq,
>   };
>   
>
Lee Jones Feb. 28, 2022, 8:14 a.m. UTC | #2
On Tue, 07 Dec 2021, Claudiu Beznea wrote:

> Fix "unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]"
> compilation warning by using __maybe_unused on PM ops.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>  drivers/mfd/atmel-flexcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/mfd/atmel-flexcom.c b/drivers/mfd/atmel-flexcom.c
index 559eb4d352b6..33caa4fba6af 100644
--- a/drivers/mfd/atmel-flexcom.c
+++ b/drivers/mfd/atmel-flexcom.c
@@ -105,7 +105,7 @@  static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops atmel_flexcom_pm_ops = {
+static const struct dev_pm_ops __maybe_unused atmel_flexcom_pm_ops = {
 	.resume_noirq = atmel_flexcom_resume_noirq,
 };