diff mbox

[v2] ASoC: hdmi-codec: fix non static symbol warnings

Message ID 20170313022618.21103-1-takashi.sakamoto@miraclelinux.com (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Sakamoto March 13, 2017, 2:26 a.m. UTC
Fixes the following sparse warnings:

$ make C=2 sound/soc/codecs/hdmi-codec.o
sound/soc/codecs/hdmi-codec.c:34:1: warning:
 symbol 'hdmi_device_list' was not declared. Should it be static?
sound/soc/codecs/hdmi-codec.c:80:33: warning:
 symbol 'hdmi_codec_stereo_chmaps' was not declared. Should it be static?
sound/soc/codecs/hdmi-codec.c:87:33: warning:
 symbol 'hdmi_codec_8ch_chmaps' was not declared. Should it be static?
sound/soc/codecs/hdmi-codec.c:354:6: warning:
 symbol 'hdmi_codec_eld_chmap' was not declared. Should it be static?

Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
---
 sound/soc/codecs/hdmi-codec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mark Brown March 13, 2017, 4:50 p.m. UTC | #1
On Mon, Mar 13, 2017 at 11:26:18AM +0900, Takashi Sakamoto wrote:

> Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>

Did you write this or did Wei Yongjun?  If they did then the patch
should show them as the author.
Takashi Sakamoto March 14, 2017, 4:01 a.m. UTC | #2
On Mar 14 2017 01:50, Mark Brown wrote:
> On Mon, Mar 13, 2017 at 11:26:18AM +0900, Takashi Sakamoto wrote:
>
>> Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
>
> Did you write this or did Wei Yongjun?  If they did then the patch
> should show them as the author.

I'm sure that you've rejected such a patch in which sender is not commit 
author. With this memory, I sent this patch with my name as author 
regardless of original author.

What fashion is suitable for you? Please give me enough instruction to 
your fashion in this case, Mark. I'm puzzled.


Regards

Takashi Sakamoto
Mark Brown March 14, 2017, 7:46 p.m. UTC | #3
On Tue, Mar 14, 2017 at 01:01:57PM +0900, Takashi Sakamoto wrote:
> On Mar 14 2017 01:50, Mark Brown wrote:

> > Did you write this or did Wei Yongjun?  If they did then the patch
> > should show them as the author.

> I'm sure that you've rejected such a patch in which sender is not commit
> author. With this memory, I sent this patch with my name as author
> regardless of original author.

No, I've never done that.  What I complain about is people sending
patches that they wrote themselves but which have different authorship
information in the file, usually because they've used a different e-mail
address.  This is a problem because it makes it look like it's a patch
that needs at least two signoffs as it wasn't written by the person
sending it so slows things down.  If there are actually two signoffs
there's no problem at all as that's what's expected.

If you look at git you'll see I fairly regularly apply patches which
were forwarded by someone else.

> What fashion is suitable for you? Please give me enough instruction to your
> fashion in this case, Mark. I'm puzzled.

Please follow the process covered in SubmittingPatches - if you're
forwarding on a patch someone else wrote you need to preserve their
authorship and add your own signoff after theirs.
diff mbox

Patch

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 8c5ae1f..6ba6aa5 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -31,7 +31,7 @@  struct hdmi_device {
 	int cnt;
 };
 #define pos_to_hdmi_device(pos)	container_of((pos), struct hdmi_device, list)
-LIST_HEAD(hdmi_device_list);
+static LIST_HEAD(hdmi_device_list);
 static DEFINE_MUTEX(hdmi_mutex);
 
 #define DAI_NAME_SIZE 16
@@ -78,14 +78,14 @@  struct hdmi_codec_cea_spk_alloc {
 };
 
 /* Channel maps  stereo HDMI */
-const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = {
+static const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = {
 	{ .channels = 2,
 	  .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
 	{ }
 };
 
 /* Channel maps for multi-channel playbacks, up to 8 n_ch */
-const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
+static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
 	{ .channels = 2, /* CA_ID 0x00 */
 	  .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
 	{ .channels = 4, /* CA_ID 0x01 */
@@ -352,7 +352,7 @@  static unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc)
 	return spk_mask;
 }
 
-void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
+static void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
 {
 	u8 spk_alloc;
 	unsigned long spk_mask;