[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210419012417.29366-1-yung-chuan.liao@linux.intel.com>
Date: Mon, 19 Apr 2021 09:24:17 +0800
From: Bard Liao <yung-chuan.liao@...ux.intel.com>
To: alsa-devel@...a-project.org, vkoul@...nel.org
Cc: vinod.koul@...aro.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, srinivas.kandagatla@...aro.org,
rander.wang@...ux.intel.com, hui.wang@...onical.com,
pierre-louis.bossart@...ux.intel.com, sanyog.r.kale@...el.com,
bard.liao@...el.com
Subject: [PATCH] soundwire: dmi-quirks: remove duplicate initialization
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
cppcheck warning:
drivers/soundwire/dmi-quirks.c:85:12: style: Redundant initialization
for 'map'. The initialized value is overwritten before it is
read. [redundantInitialization]
for (map = dmi_id->driver_data; map->adr; map++) {
^
drivers/soundwire/dmi-quirks.c:83:25: note: map is initialized
struct adr_remap *map = dmi_id->driver_data;
^
drivers/soundwire/dmi-quirks.c:85:12: note: map is overwritten
for (map = dmi_id->driver_data; map->adr; map++) {
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@...il.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@...ux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
---
drivers/soundwire/dmi-quirks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 82061c1d9835..5db0a2443a1d 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -80,7 +80,7 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
/* check if any address remap quirk applies */
dmi_id = dmi_first_match(adr_remap_quirk_table);
if (dmi_id) {
- struct adr_remap *map = dmi_id->driver_data;
+ struct adr_remap *map;
for (map = dmi_id->driver_data; map->adr; map++) {
if (map->adr == addr) {
--
2.17.1
Powered by blists - more mailing lists