All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Baojun Xu <baojun.xu@ti.com>
Cc: <tiwai@suse.de>, <robh+dt@kernel.org>,
	<andriy.shevchenko@linux.intel.com>, <lgirdwood@gmail.com>,
	<perex@perex.cz>, <pierre-louis.bossart@linux.intel.com>,
	<shenghao-ding@ti.com>, <navada@ti.com>, <13916275206@139.com>,
	<v-hampiholi@ti.com>, <v-po@ti.com>,
	<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<liam.r.girdwood@intel.com>, <yung-chuan.liao@linux.intel.com>,
	<broonie@kernel.org>, <antheas.dk@gmail.com>, <philm@manjaro.org>
Subject: Re: [PATCH v4] ALSA: hda/tas2781: Add speaker id check for ASUS projects
Date: Wed, 13 Nov 2024 14:01:51 +0100	[thread overview]
Message-ID: <87ldxnuw1s.wl-tiwai@suse.de> (raw)
In-Reply-To: <20241104093138.4819-1-baojun.xu@ti.com>

On Mon, 04 Nov 2024 10:31:38 +0100,
Baojun Xu wrote:
> +	// Speaker id was needed for ASUS projects.
> +	if (!strncmp(sub, TAS2781_ASUS_ID, sizeof(TAS2781_ASUS_ID))) {

Is this really correct?  The sizeof(TAS2781_ASUS_ID) is 5, including
the terminating NUL.  So this becomes equivalent with strcmp(), and
it doesn't check the sub-string.


thanks,

Takashi

  reply	other threads:[~2024-11-13 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04  9:31 [PATCH v4] ALSA: hda/tas2781: Add speaker id check for ASUS projects Baojun Xu
2024-11-13 13:01 ` Takashi Iwai [this message]
2024-11-13 18:55   ` Andy Shevchenko

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=87ldxnuw1s.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=13916275206@139.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=antheas.dk@gmail.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=perex@perex.cz \
    --cc=philm@manjaro.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shenghao-ding@ti.com \
    --cc=v-hampiholi@ti.com \
    --cc=v-po@ti.com \
    --cc=yung-chuan.liao@linux.intel.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.