* [PATCH][next] ALSA: firewire-lib: remove redundant assignment to cip_header
@ 2019-05-24 21:33 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-05-24 21:33 UTC (permalink / raw)
To: Clemens Ladisch, Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignement to cip_header is redundant as the value never
read and it is being re-assigned in the if and else paths of
the following if statement. Clean up the code by removing it.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/firewire/amdtp-stream.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 2d9c764061d1..4236955bbf57 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -675,7 +675,6 @@ static int handle_in_packet(struct amdtp_stream *s, unsigned int cycle,
return -EIO;
}
- cip_header = ctx_header + 2;
if (!(s->flags & CIP_NO_HEADER)) {
cip_header = &ctx_header[2];
err = check_cip_header(s, cip_header, payload_length,
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH][next] ALSA: firewire-lib: remove redundant assignment to cip_header
@ 2019-05-24 21:33 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-05-24 21:33 UTC (permalink / raw)
To: Clemens Ladisch, Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignement to cip_header is redundant as the value never
read and it is being re-assigned in the if and else paths of
the following if statement. Clean up the code by removing it.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/firewire/amdtp-stream.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 2d9c764061d1..4236955bbf57 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -675,7 +675,6 @@ static int handle_in_packet(struct amdtp_stream *s, unsigned int cycle,
return -EIO;
}
- cip_header = ctx_header + 2;
if (!(s->flags & CIP_NO_HEADER)) {
cip_header = &ctx_header[2];
err = check_cip_header(s, cip_header, payload_length,
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [alsa-devel] [PATCH][next] ALSA: firewire-lib: remove redundant assignment to cip_header
2019-05-24 21:33 ` Colin King
(?)
@ 2019-05-25 5:45 ` Takashi Sakamoto
-1 siblings, 0 replies; 5+ messages in thread
From: Takashi Sakamoto @ 2019-05-25 5:45 UTC (permalink / raw)
To: Colin King, Clemens Ladisch, Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
Hi Colin,
On Sat, May 25, 2019, at 06:35, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignement to cip_header is redundant as the value never
> read and it is being re-assigned in the if and else paths of
> the following if statement. Clean up the code by removing it.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> sound/firewire/amdtp-stream.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/firewire/amdtp-stream.c
> b/sound/firewire/amdtp-stream.c
> index 2d9c764061d1..4236955bbf57 100644
> --- a/sound/firewire/amdtp-stream.c
> +++ b/sound/firewire/amdtp-stream.c
> @@ -675,7 +675,6 @@ static int handle_in_packet(struct amdtp_stream *s,
> unsigned int cycle,
> return -EIO;
> }
>
> - cip_header = ctx_header + 2;
> if (!(s->flags & CIP_NO_HEADER)) {
> cip_header = &ctx_header[2];
> err = check_cip_header(s, cip_header, payload_length,
Thanks for the fix. I've already posted further patch for refactoring
and this was also fixed by a commit 98e3e43b599d ("
ALSA: firewire-lib: refactoring to obsolete IR packet handler").
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=98e3e43b599d742c104864c6772a251025ffb52b
Thanks
Takashi Sakamoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [alsa-devel] [PATCH][next] ALSA: firewire-lib: remove redu =?UTF-8?Q?ndant=09assignm
@ 2019-05-25 5:45 ` Takashi Sakamoto
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Sakamoto @ 2019-05-25 5:45 UTC (permalink / raw)
To: Colin King, Clemens Ladisch, Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
Hi Colin,
On Sat, May 25, 2019, at 06:35, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignement to cip_header is redundant as the value never
> read and it is being re-assigned in the if and else paths of
> the following if statement. Clean up the code by removing it.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> sound/firewire/amdtp-stream.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/firewire/amdtp-stream.c
> b/sound/firewire/amdtp-stream.c
> index 2d9c764061d1..4236955bbf57 100644
> --- a/sound/firewire/amdtp-stream.c
> +++ b/sound/firewire/amdtp-stream.c
> @@ -675,7 +675,6 @@ static int handle_in_packet(struct amdtp_stream *s,
> unsigned int cycle,
> return -EIO;
> }
>
> - cip_header = ctx_header + 2;
> if (!(s->flags & CIP_NO_HEADER)) {
> cip_header = &ctx_header[2];
> err = check_cip_header(s, cip_header, payload_length,
Thanks for the fix. I've already posted further patch for refactoring
and this was also fixed by a commit 98e3e43b599d ("
ALSA: firewire-lib: refactoring to obsolete IR packet handler").
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id˜e3e43b599d742c104864c6772a251025ffb52b
Thanks
Takashi Sakamoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][next] ALSA: firewire-lib: remove redundant assignment to cip_header
@ 2019-05-25 5:45 ` Takashi Sakamoto
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Sakamoto @ 2019-05-25 5:45 UTC (permalink / raw)
To: Colin King, Clemens Ladisch, Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
Hi Colin,
On Sat, May 25, 2019, at 06:35, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignement to cip_header is redundant as the value never
> read and it is being re-assigned in the if and else paths of
> the following if statement. Clean up the code by removing it.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> sound/firewire/amdtp-stream.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/firewire/amdtp-stream.c
> b/sound/firewire/amdtp-stream.c
> index 2d9c764061d1..4236955bbf57 100644
> --- a/sound/firewire/amdtp-stream.c
> +++ b/sound/firewire/amdtp-stream.c
> @@ -675,7 +675,6 @@ static int handle_in_packet(struct amdtp_stream *s,
> unsigned int cycle,
> return -EIO;
> }
>
> - cip_header = ctx_header + 2;
> if (!(s->flags & CIP_NO_HEADER)) {
> cip_header = &ctx_header[2];
> err = check_cip_header(s, cip_header, payload_length,
Thanks for the fix. I've already posted further patch for refactoring
and this was also fixed by a commit 98e3e43b599d ("
ALSA: firewire-lib: refactoring to obsolete IR packet handler").
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=98e3e43b599d742c104864c6772a251025ffb52b
Thanks
Takashi Sakamoto
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-05-25 5:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 21:33 [PATCH][next] ALSA: firewire-lib: remove redundant assignment to cip_header Colin King
2019-05-24 21:33 ` Colin King
2019-05-25 5:45 ` [alsa-devel] " Takashi Sakamoto
2019-05-25 5:45 ` Takashi Sakamoto
2019-05-25 5:45 ` [alsa-devel] [PATCH][next] ALSA: firewire-lib: remove redu =?UTF-8?Q?ndant=09assignm Takashi Sakamoto
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.