All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mike Marshall <hubcap@omnibond.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Ira Weiny <ira.weiny@intel.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: pvr2fb: fix compile-testing as module
Date: Fri, 21 Jun 2019 13:15:00 +0200	[thread overview]
Message-ID: <3ee91294-044d-9bcd-0c4c-3365c0c97604@samsung.com> (raw)
In-Reply-To: <20190617124758.1252449-1-arnd@arndb.de>


On 6/17/19 2:47 PM, Arnd Bergmann wrote:
> Building an allmodconfig kernel now produces a harmless warning:
> 
> drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 'pvr2_get_param_val' [-Werror,-Wunused-function]
> 
> Shut this up the same way as we do for other unused functions
> in the same file, using the __maybe_unused attribute.
> 
> Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks but I've fixed it already by adding #ifndef MODULE (since other
functions in the same file using __maybe_unused depend on either PCI or
SH_DREAMCAST I've preferred not to use this attribute):

https://marc.info/?l=linux-fbdev&m=156050904010778&w=2

> ---
>  drivers/video/fbdev/pvr2fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
> index 59c59b3a67cb..cf9cfdc5e685 100644
> --- a/drivers/video/fbdev/pvr2fb.c
> +++ b/drivers/video/fbdev/pvr2fb.c
> @@ -723,8 +723,8 @@ static struct fb_ops pvr2fb_ops = {
>  	.fb_imageblit	= cfb_imageblit,
>  };
>  
> -static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
> -			      int size)
> +static int __maybe_unused pvr2_get_param_val(const struct pvr2_params *p,
> +					     const char *s, int size)
>  {
>  	int i;

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

WARNING: multiple messages have this Message-ID (diff)
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mike Marshall <hubcap@omnibond.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Ira Weiny <ira.weiny@intel.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: pvr2fb: fix compile-testing as module
Date: Fri, 21 Jun 2019 11:15:00 +0000	[thread overview]
Message-ID: <3ee91294-044d-9bcd-0c4c-3365c0c97604@samsung.com> (raw)
In-Reply-To: <20190617124758.1252449-1-arnd@arndb.de>


On 6/17/19 2:47 PM, Arnd Bergmann wrote:
> Building an allmodconfig kernel now produces a harmless warning:
> 
> drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 'pvr2_get_param_val' [-Werror,-Wunused-function]
> 
> Shut this up the same way as we do for other unused functions
> in the same file, using the __maybe_unused attribute.
> 
> Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks but I've fixed it already by adding #ifndef MODULE (since other
functions in the same file using __maybe_unused depend on either PCI or
SH_DREAMCAST I've preferred not to use this attribute):

https://marc.info/?l=linux-fbdev&m\x156050904010778&w=2

> ---
>  drivers/video/fbdev/pvr2fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
> index 59c59b3a67cb..cf9cfdc5e685 100644
> --- a/drivers/video/fbdev/pvr2fb.c
> +++ b/drivers/video/fbdev/pvr2fb.c
> @@ -723,8 +723,8 @@ static struct fb_ops pvr2fb_ops = {
>  	.fb_imageblit	= cfb_imageblit,
>  };
>  
> -static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
> -			      int size)
> +static int __maybe_unused pvr2_get_param_val(const struct pvr2_params *p,
> +					     const char *s, int size)
>  {
>  	int i;

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

  reply	other threads:[~2019-06-21 11:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190617124822epcas2p2c93d6cec3b60d08d85f228945d5c7623@epcas2p2.samsung.com>
2019-06-17 12:47 ` [PATCH] video: fbdev: pvr2fb: fix compile-testing as module Arnd Bergmann
2019-06-17 12:47   ` Arnd Bergmann
2019-06-21 11:15   ` Bartlomiej Zolnierkiewicz [this message]
2019-06-21 11:15     ` Bartlomiej Zolnierkiewicz
2019-06-21 14:22     ` Arnd Bergmann
2019-06-21 14:22       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ee91294-044d-9bcd-0c4c-3365c0c97604@samsung.com \
    --to=b.zolnierkie@samsung.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hubcap@omnibond.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.