mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: YueHaibing <yuehaibing@huawei.com>
Cc: <pavel@denx.de>, <tglx@linutronix.de>,
	<gregkh@linuxfoundation.org>, <allison@lohutok.net>,
	<perex@perex.cz>, <pakki001@umn.edu>,
	<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] ALSA: line6: Fix -Wunused-const-variable warnings
Date: Thu, 22 Aug 2019 17:22:04 +0200	[thread overview]
Message-ID: <s5h5zmptecj.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190822145741.9592-1-yuehaibing@huawei.com>

On Thu, 22 Aug 2019 16:57:41 +0200,
YueHaibing wrote:
> 
> sound/usb/line6/driver.h:69:18: warning:
>  SYSEX_DATA_OFS defined but not used [-Wunused-const-variable=]
> sound/usb/line6/driver.h:70:18: warning:
>  SYSEX_EXTRA_SIZE defined but not used [-Wunused-const-variable=]
> 
> SYSEX_EXTRA_SIZE is only used in driver.c and
> SYSEX_DATA_OFS in pod.c, so move them to .c fix
> this warning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

No, this makes things worse.  It should have been simply a normal
define instead.

Care to resend the fix with replacement to define?


thanks,

Takashi

> ---
>  sound/usb/line6/driver.c | 2 ++
>  sound/usb/line6/driver.h | 3 ---
>  sound/usb/line6/pod.c    | 2 ++
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c
> index b5a3f75..8027da8 100644
> --- a/sound/usb/line6/driver.c
> +++ b/sound/usb/line6/driver.c
> @@ -31,6 +31,8 @@ const unsigned char line6_midi_id[3] = {
>  };
>  EXPORT_SYMBOL_GPL(line6_midi_id);
>  
> +static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4;
> +
>  /*
>  	Code to request version of POD, Variax interface
>  	(and maybe other devices).
> diff --git a/sound/usb/line6/driver.h b/sound/usb/line6/driver.h
> index e5e572e..c57633a 100644
> --- a/sound/usb/line6/driver.h
> +++ b/sound/usb/line6/driver.h
> @@ -66,9 +66,6 @@
>  
>  extern const unsigned char line6_midi_id[3];
>  
> -static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3;
> -static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4;
> -
>  /*
>  	 Common properties of Line 6 devices.
>  */
> diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c
> index ee4c9d2..24ad337 100644
> --- a/sound/usb/line6/pod.c
> +++ b/sound/usb/line6/pod.c
> @@ -110,6 +110,8 @@ enum {
>  	POD_BUSY_MIDISEND
>  };
>  
> +static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3;
> +
>  static struct snd_ratden pod_ratden = {
>  	.num_min = 78125,
>  	.num_max = 78125,
> -- 
> 2.7.4
> 
> 
> 

      reply	other threads:[~2019-08-22 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 14:57 YueHaibing
2019-08-22 15:22 ` Takashi Iwai [this message]

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=s5h5zmptecj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=allison@lohutok.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pakki001@umn.edu \
    --cc=pavel@denx.de \
    --cc=perex@perex.cz \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®