* [PATCH] ASoC: jack: remove unused variable in snd_soc_jack_report()
@ 2012-10-18 14:49 Wei Yongjun
2012-10-22 13:50 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2012-10-18 14:49 UTC (permalink / raw)
To: lrg, broonie, perex, tiwai; +Cc: yongjun_wei, alsa-devel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
The variable oldstatus is initialized but never used
otherwise, so remove the unused variable.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
sound/soc/soc-jack.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index fa0fd8d..933eb25 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -66,7 +66,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
struct snd_soc_dapm_context *dapm;
struct snd_soc_jack_pin *pin;
int enable;
- int oldstatus;
trace_snd_soc_jack_report(jack, mask, status);
@@ -78,8 +77,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
mutex_lock(&jack->mutex);
- oldstatus = jack->status;
-
jack->status &= ~mask;
jack->status |= status & mask;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: jack: remove unused variable in snd_soc_jack_report()
2012-10-18 14:49 [PATCH] ASoC: jack: remove unused variable in snd_soc_jack_report() Wei Yongjun
@ 2012-10-22 13:50 ` Mark Brown
2012-10-22 14:13 ` Wei Yongjun
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-10-22 13:50 UTC (permalink / raw)
To: Wei Yongjun; +Cc: lrg, perex, tiwai, yongjun_wei, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On Thu, Oct 18, 2012 at 10:49:19PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> The variable oldstatus is initialized but never used
> otherwise, so remove the unused variable.
Applied, thanks. However for changes like this you should really
consider in your changelog why the variable is unused - is the bug that
the result is ignored or that it is needlessly generated?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: jack: remove unused variable in snd_soc_jack_report()
2012-10-22 13:50 ` Mark Brown
@ 2012-10-22 14:13 ` Wei Yongjun
0 siblings, 0 replies; 3+ messages in thread
From: Wei Yongjun @ 2012-10-22 14:13 UTC (permalink / raw)
To: broonie; +Cc: lrg, perex, tiwai, yongjun_wei, alsa-devel, linux-kernel
On 10/22/2012 09:50 PM, Mark Brown wrote:
> On Thu, Oct 18, 2012 at 10:49:19PM +0800, Wei Yongjun wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> The variable oldstatus is initialized but never used
>> otherwise, so remove the unused variable.
> Applied, thanks. However for changes like this you should really
> consider in your changelog why the variable is unused - is the bug that
> the result is ignored or that it is needlessly generated?
Yes, I will review every patch before send out them. I will try to
fix it if it is a bug, but some times, I does not have all of those
knowledge, many place have unused variables, but it is hard to
find why this is unused, so maybe some times I send the wrong
patch.
Like this patch:
https://patchwork.kernel.org/patch/1606481/
It is found by the same rule, but I fixed it as a bug.
Thanks,
Yongjun Wei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-22 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 14:49 [PATCH] ASoC: jack: remove unused variable in snd_soc_jack_report() Wei Yongjun
2012-10-22 13:50 ` Mark Brown
2012-10-22 14:13 ` Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).