linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused
@ 2018-12-10 20:53 Arnd Bergmann
  2018-12-11 10:50 ` Andy Shevchenko
  2018-12-11 20:40 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-12-10 20:53 UTC (permalink / raw)
  To: Ajay Gupta
  Cc: Arnd Bergmann, Wolfram Sang, Andy Shevchenko, linux-i2c, linux-kernel

When CONFIG_PM is disabled, this is needed to avoid a harmless
unused-function warning:

drivers/i2c/busses/i2c-nvidia-gpu.c:345:12: error: 'gpu_i2c_resume' defined but not used [-Werror=unused-function]

Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index e99c3bb58351..4e67d5ed480e 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -342,7 +342,7 @@ static void gpu_i2c_remove(struct pci_dev *pdev)
 	pci_free_irq_vectors(pdev);
 }
 
-static int gpu_i2c_resume(struct device *dev)
+static __maybe_unused int gpu_i2c_resume(struct device *dev)
 {
 	struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev);
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused
  2018-12-10 20:53 [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused Arnd Bergmann
@ 2018-12-11 10:50 ` Andy Shevchenko
  2018-12-11 20:40 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2018-12-11 10:50 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Ajay Gupta, Wolfram Sang, linux-i2c, linux-kernel

On Mon, Dec 10, 2018 at 09:53:45PM +0100, Arnd Bergmann wrote:
> When CONFIG_PM is disabled, this is needed to avoid a harmless
> unused-function warning:
> 
> drivers/i2c/busses/i2c-nvidia-gpu.c:345:12: error: 'gpu_i2c_resume' defined but not used [-Werror=unused-function]
> 

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
> index e99c3bb58351..4e67d5ed480e 100644
> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> @@ -342,7 +342,7 @@ static void gpu_i2c_remove(struct pci_dev *pdev)
>  	pci_free_irq_vectors(pdev);
>  }
>  
> -static int gpu_i2c_resume(struct device *dev)
> +static __maybe_unused int gpu_i2c_resume(struct device *dev)
>  {
>  	struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev);
>  
> -- 
> 2.20.0
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused
  2018-12-10 20:53 [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused Arnd Bergmann
  2018-12-11 10:50 ` Andy Shevchenko
@ 2018-12-11 20:40 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2018-12-11 20:40 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Ajay Gupta, Andy Shevchenko, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On Mon, Dec 10, 2018 at 09:53:45PM +0100, Arnd Bergmann wrote:
> When CONFIG_PM is disabled, this is needed to avoid a harmless
> unused-function warning:
> 
> drivers/i2c/busses/i2c-nvidia-gpu.c:345:12: error: 'gpu_i2c_resume' defined but not used [-Werror=unused-function]
> 
> Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-11 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 20:53 [PATCH] i2c: nvidia-gpu: mark resume function as __maybe_unused Arnd Bergmann
2018-12-11 10:50 ` Andy Shevchenko
2018-12-11 20:40 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).