Message ID | 20240205182436.1843447-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [next] soundwire: intel_auxdevice: remove redundant assignment to variable link_flags | expand |
Thanks for the clean-up! > The variable link_flags is being initialized with a value that is never > read, it is being re-assigned later on. The initialization is > redundant and can be removed. > > Cleans up clang scan build warning: > drivers/soundwire/intel_auxdevice.c:624:2: warning: Value stored > to 'link_flags' is never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> > --- > drivers/soundwire/intel_auxdevice.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c > index 93698532deac..95125cc2fc59 100644 > --- a/drivers/soundwire/intel_auxdevice.c > +++ b/drivers/soundwire/intel_auxdevice.c > @@ -621,8 +621,6 @@ static int __maybe_unused intel_resume(struct device *dev) > return 0; > } > > - link_flags = md_flags >> (bus->link_id * 8); > - this redundant line is 3+ years old now, added in a2d9c161db24 ("soundwire: intel: pm_runtime idle scheduling") Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> > if (pm_runtime_suspended(dev)) { > dev_dbg(dev, "pm_runtime status was suspended, forcing active\n"); >
On Mon, 05 Feb 2024 18:24:36 +0000, Colin Ian King wrote: > The variable link_flags is being initialized with a value that is never > read, it is being re-assigned later on. The initialization is > redundant and can be removed. > > Cleans up clang scan build warning: > drivers/soundwire/intel_auxdevice.c:624:2: warning: Value stored > to 'link_flags' is never read [deadcode.DeadStores] > > [...] Applied, thanks! [1/1] soundwire: intel_auxdevice: remove redundant assignment to variable link_flags commit: 9282cfa2eb080e3bbb95f488af35618b614cdf76 Best regards,
diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c index 93698532deac..95125cc2fc59 100644 --- a/drivers/soundwire/intel_auxdevice.c +++ b/drivers/soundwire/intel_auxdevice.c @@ -621,8 +621,6 @@ static int __maybe_unused intel_resume(struct device *dev) return 0; } - link_flags = md_flags >> (bus->link_id * 8); - if (pm_runtime_suspended(dev)) { dev_dbg(dev, "pm_runtime status was suspended, forcing active\n");
The variable link_flags is being initialized with a value that is never read, it is being re-assigned later on. The initialization is redundant and can be removed. Cleans up clang scan build warning: drivers/soundwire/intel_auxdevice.c:624:2: warning: Value stored to 'link_flags' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> --- drivers/soundwire/intel_auxdevice.c | 2 -- 1 file changed, 2 deletions(-)