All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
@ 2020-09-10  8:09 YueHaibing
  2020-09-10  8:22 ` Lubomir Rintel
  2020-09-11 11:27 ` [PATCH v2 " YueHaibing
  0 siblings, 2 replies; 7+ messages in thread
From: YueHaibing @ 2020-09-10  8:09 UTC (permalink / raw)
  To: corbet, mchehab, lkundrak, hverkuil-cisco
  Cc: linux-media, linux-kernel, YueHaibing

If CONFIG_PM is n, gcc warns:

drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
 static int mmpcam_resume(struct device *dev)
            ^~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
 static int mmpcam_suspend(struct device *dev)
            ^~~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
 static int mmpcam_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
 static int mmpcam_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
index c4b28a00a3a2..032fdddbbecc 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
  * Suspend/resume support.
  */
 
-static int mmpcam_runtime_resume(struct device *dev)
+static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 	struct mcam_camera *mcam = &cam->mcam;
@@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_runtime_suspend(struct device *dev)
+static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 	struct mcam_camera *mcam = &cam->mcam;
@@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_suspend(struct device *dev)
+static int __maybe_unused mmpcam_suspend(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 
@@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_resume(struct device *dev)
+static int __maybe_unused mmpcam_resume(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 
-- 
2.17.1



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

* Re: [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-10  8:09 [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings YueHaibing
@ 2020-09-10  8:22 ` Lubomir Rintel
  2020-09-10  9:18   ` Yuehaibing
  2020-09-11 11:27 ` [PATCH v2 " YueHaibing
  1 sibling, 1 reply; 7+ messages in thread
From: Lubomir Rintel @ 2020-09-10  8:22 UTC (permalink / raw)
  To: YueHaibing; +Cc: corbet, mchehab, hverkuil-cisco, linux-media, linux-kernel

On Thu, Sep 10, 2020 at 04:09:33PM +0800, YueHaibing wrote:
> If CONFIG_PM is n, gcc warns:
> 
> drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
>  static int mmpcam_resume(struct device *dev)
>             ^~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
>  static int mmpcam_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~
> 
> Mark them as __maybe_unused to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Your colleague seems to sent out an equivalent patch:
https://lore.kernel.org/lkml/20200910080933.40684-1-yuehaibing@huawei.com/

Cheers
Lubo

> ---
>  drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
> index c4b28a00a3a2..032fdddbbecc 100644
> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
> @@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
>   * Suspend/resume support.
>   */
>  
> -static int mmpcam_runtime_resume(struct device *dev)
> +static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  	struct mcam_camera *mcam = &cam->mcam;
> @@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_runtime_suspend(struct device *dev)
> +static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  	struct mcam_camera *mcam = &cam->mcam;
> @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_suspend(struct device *dev)
> +static int __maybe_unused mmpcam_suspend(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  
> @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_resume(struct device *dev)
> +static int __maybe_unused mmpcam_resume(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  
> -- 
> 2.17.1
> 
> 

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

* Re: [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-10  8:22 ` Lubomir Rintel
@ 2020-09-10  9:18   ` Yuehaibing
  2020-09-10 14:57     ` Lubomir Rintel
  0 siblings, 1 reply; 7+ messages in thread
From: Yuehaibing @ 2020-09-10  9:18 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: corbet, mchehab, hverkuil-cisco, linux-media, linux-kernel

On 2020/9/10 16:22, Lubomir Rintel wrote:
> On Thu, Sep 10, 2020 at 04:09:33PM +0800, YueHaibing wrote:
>> If CONFIG_PM is n, gcc warns:
>>
>> drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
>>  static int mmpcam_resume(struct device *dev)
>>             ^~~~~~~~~~~~~
>> drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
>>  static int mmpcam_suspend(struct device *dev)
>>             ^~~~~~~~~~~~~~
>> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
>>  static int mmpcam_runtime_suspend(struct device *dev)
>>             ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
>>  static int mmpcam_runtime_resume(struct device *dev)
>>             ^~~~~~~~~~~~~~~~~~~~~
>>
>> Mark them as __maybe_unused to fix this.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Your colleague seems to sent out an equivalent patch:
> https://lore.kernel.org/lkml/20200910080933.40684-1-yuehaibing@huawei.com/

This is my patch, paste an wrong link?

> 
> Cheers
> Lubo
> 
>> ---
>>  drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
>> index c4b28a00a3a2..032fdddbbecc 100644
>> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
>> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
>> @@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
>>   * Suspend/resume support.
>>   */
>>  
>> -static int mmpcam_runtime_resume(struct device *dev)
>> +static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
>>  {
>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>  	struct mcam_camera *mcam = &cam->mcam;
>> @@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
>>  	return 0;
>>  }
>>  
>> -static int mmpcam_runtime_suspend(struct device *dev)
>> +static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
>>  {
>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>  	struct mcam_camera *mcam = &cam->mcam;
>> @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
>>  	return 0;
>>  }
>>  
>> -static int mmpcam_suspend(struct device *dev)
>> +static int __maybe_unused mmpcam_suspend(struct device *dev)
>>  {
>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>  
>> @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
>>  	return 0;
>>  }
>>  
>> -static int mmpcam_resume(struct device *dev)
>> +static int __maybe_unused mmpcam_resume(struct device *dev)
>>  {
>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>  
>> -- 
>> 2.17.1
>>
>>
> 
> .
> 


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

* Re: [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-10  9:18   ` Yuehaibing
@ 2020-09-10 14:57     ` Lubomir Rintel
  2020-09-11  4:53       ` Yuehaibing
  0 siblings, 1 reply; 7+ messages in thread
From: Lubomir Rintel @ 2020-09-10 14:57 UTC (permalink / raw)
  To: Yuehaibing; +Cc: corbet, mchehab, hverkuil-cisco, linux-media, linux-kernel

On Thu, Sep 10, 2020 at 05:18:15PM +0800, Yuehaibing wrote:
> On 2020/9/10 16:22, Lubomir Rintel wrote:
> > On Thu, Sep 10, 2020 at 04:09:33PM +0800, YueHaibing wrote:
> >> If CONFIG_PM is n, gcc warns:
> >>
> >> drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
> >>  static int mmpcam_resume(struct device *dev)
> >>             ^~~~~~~~~~~~~
> >> drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
> >>  static int mmpcam_suspend(struct device *dev)
> >>             ^~~~~~~~~~~~~~
> >> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
> >>  static int mmpcam_runtime_suspend(struct device *dev)
> >>             ^~~~~~~~~~~~~~~~~~~~~~
> >> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
> >>  static int mmpcam_runtime_resume(struct device *dev)
> >>             ^~~~~~~~~~~~~~~~~~~~~
> >>
> >> Mark them as __maybe_unused to fix this.
> >>
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > 
> > Your colleague seems to sent out an equivalent patch:
> > https://lore.kernel.org/lkml/20200910080933.40684-1-yuehaibing@huawei.com/
> 
> This is my patch, paste an wrong link?

Indeed, sorry for the confusion.

The original mail only went to linux-media, not lkml, which is why I
picked the wrong one from the archive. Here's the patch:

https://lore.kernel.org/linux-media/20200909112921.5116-1-weiyongjun1@huawei.com/

Take care
Lubo

> 
> > 
> > Cheers
> > Lubo
> > 
> >> ---
> >>  drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
> >>  1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
> >> index c4b28a00a3a2..032fdddbbecc 100644
> >> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
> >> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
> >> @@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
> >>   * Suspend/resume support.
> >>   */
> >>  
> >> -static int mmpcam_runtime_resume(struct device *dev)
> >> +static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
> >>  {
> >>  	struct mmp_camera *cam = dev_get_drvdata(dev);
> >>  	struct mcam_camera *mcam = &cam->mcam;
> >> @@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
> >>  	return 0;
> >>  }
> >>  
> >> -static int mmpcam_runtime_suspend(struct device *dev)
> >> +static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
> >>  {
> >>  	struct mmp_camera *cam = dev_get_drvdata(dev);
> >>  	struct mcam_camera *mcam = &cam->mcam;
> >> @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
> >>  	return 0;
> >>  }
> >>  
> >> -static int mmpcam_suspend(struct device *dev)
> >> +static int __maybe_unused mmpcam_suspend(struct device *dev)
> >>  {
> >>  	struct mmp_camera *cam = dev_get_drvdata(dev);
> >>  
> >> @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
> >>  	return 0;
> >>  }
> >>  
> >> -static int mmpcam_resume(struct device *dev)
> >> +static int __maybe_unused mmpcam_resume(struct device *dev)
> >>  {
> >>  	struct mmp_camera *cam = dev_get_drvdata(dev);
> >>  
> >> -- 
> >> 2.17.1
> >>
> >>
> > 
> > .
> > 
> 

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

* Re: [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-10 14:57     ` Lubomir Rintel
@ 2020-09-11  4:53       ` Yuehaibing
  0 siblings, 0 replies; 7+ messages in thread
From: Yuehaibing @ 2020-09-11  4:53 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: corbet, mchehab, hverkuil-cisco, linux-media, linux-kernel

On 2020/9/10 22:57, Lubomir Rintel wrote:
> On Thu, Sep 10, 2020 at 05:18:15PM +0800, Yuehaibing wrote:
>> On 2020/9/10 16:22, Lubomir Rintel wrote:
>>> On Thu, Sep 10, 2020 at 04:09:33PM +0800, YueHaibing wrote:
>>>> If CONFIG_PM is n, gcc warns:
>>>>
>>>> drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
>>>>  static int mmpcam_resume(struct device *dev)
>>>>             ^~~~~~~~~~~~~
>>>> drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
>>>>  static int mmpcam_suspend(struct device *dev)
>>>>             ^~~~~~~~~~~~~~
>>>> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
>>>>  static int mmpcam_runtime_suspend(struct device *dev)
>>>>             ^~~~~~~~~~~~~~~~~~~~~~
>>>> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
>>>>  static int mmpcam_runtime_resume(struct device *dev)
>>>>             ^~~~~~~~~~~~~~~~~~~~~
>>>>
>>>> Mark them as __maybe_unused to fix this.
>>>>
>>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>>>
>>> Your colleague seems to sent out an equivalent patch:
>>> https://lore.kernel.org/lkml/20200910080933.40684-1-yuehaibing@huawei.com/
>>
>> This is my patch, paste an wrong link?
> 
> Indeed, sorry for the confusion.
> 
> The original mail only went to linux-media, not lkml, which is why I
> picked the wrong one from the archive. Here's the patch:
> 
> https://lore.kernel.org/linux-media/20200909112921.5116-1-weiyongjun1@huawei.com/

mmpcam_runtime_suspend/mmpcam_runtime_resume also should be cared, I'll adjust my patch based on it.

> 
> Take care
> Lubo
> 
>>
>>>
>>> Cheers
>>> Lubo
>>>
>>>> ---
>>>>  drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
>>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
>>>> index c4b28a00a3a2..032fdddbbecc 100644
>>>> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
>>>> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
>>>> @@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
>>>>   * Suspend/resume support.
>>>>   */
>>>>  
>>>> -static int mmpcam_runtime_resume(struct device *dev)
>>>> +static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
>>>>  {
>>>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>>>  	struct mcam_camera *mcam = &cam->mcam;
>>>> @@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
>>>>  	return 0;
>>>>  }
>>>>  
>>>> -static int mmpcam_runtime_suspend(struct device *dev)
>>>> +static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
>>>>  {
>>>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>>>  	struct mcam_camera *mcam = &cam->mcam;
>>>> @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
>>>>  	return 0;
>>>>  }
>>>>  
>>>> -static int mmpcam_suspend(struct device *dev)
>>>> +static int __maybe_unused mmpcam_suspend(struct device *dev)
>>>>  {
>>>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>>>  
>>>> @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
>>>>  	return 0;
>>>>  }
>>>>  
>>>> -static int mmpcam_resume(struct device *dev)
>>>> +static int __maybe_unused mmpcam_resume(struct device *dev)
>>>>  {
>>>>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>>>>  
>>>> -- 
>>>> 2.17.1
>>>>
>>>>
>>>
>>> .
>>>
>>
> 
> .
> 


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

* [PATCH v2 -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-10  8:09 [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings YueHaibing
  2020-09-10  8:22 ` Lubomir Rintel
@ 2020-09-11 11:27 ` YueHaibing
  2020-10-14 13:50   ` Geert Uytterhoeven
  1 sibling, 1 reply; 7+ messages in thread
From: YueHaibing @ 2020-09-11 11:27 UTC (permalink / raw)
  To: corbet, mchehab, lkundrak, hverkuil-cisco
  Cc: linux-media, linux-kernel, YueHaibing

If CONFIG_PM is n, gcc warns:

drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
 static int mmpcam_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
 static int mmpcam_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: Adjust based on https://lore.kernel.org/linux-media/20200909112921.5116-1-weiyongjun1@huawei.com/
---
 drivers/media/platform/marvell-ccic/mmp-driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
index c4b28a00a3a2..c046a0ff3b85 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
  * Suspend/resume support.
  */
 
-static int mmpcam_runtime_resume(struct device *dev)
+static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 	struct mcam_camera *mcam = &cam->mcam;
@@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_runtime_suspend(struct device *dev)
+static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 	struct mcam_camera *mcam = &cam->mcam;
-- 
2.17.1



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

* Re: [PATCH v2 -next] media: marvell-ccic: Fix -Wunused-function warnings
  2020-09-11 11:27 ` [PATCH v2 " YueHaibing
@ 2020-10-14 13:50   ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-10-14 13:50 UTC (permalink / raw)
  To: YueHaibing
  Cc: Jonathan Corbet, Mauro Carvalho Chehab, Lubomir Rintel,
	Hans Verkuil, Linux Media Mailing List,
	Linux Kernel Mailing List

On Fri, Sep 11, 2020 at 1:50 PM YueHaibing <yuehaibing@huawei.com> wrote:
> If CONFIG_PM is n, gcc warns:
>
> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~
>
> Mark them as __maybe_unused to fix this.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2020-10-14 13:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  8:09 [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings YueHaibing
2020-09-10  8:22 ` Lubomir Rintel
2020-09-10  9:18   ` Yuehaibing
2020-09-10 14:57     ` Lubomir Rintel
2020-09-11  4:53       ` Yuehaibing
2020-09-11 11:27 ` [PATCH v2 " YueHaibing
2020-10-14 13:50   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.