* [PATCH][net-next] net_sched: remove redundant assignment to ret
@ 2017-09-29 14:01 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-09-29 14:01 UTC (permalink / raw)
To: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment of -EINVAL to variable ret is redundant as it
is being overwritten on the following error exit paths or
to the return value from the following call to basic_set_parms.
Fix this up by removing it. Cleans up clang warning message:
net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/sched/cls_basic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index cfeb6f158566..700b345b07f9 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -182,7 +182,6 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
if (err < 0)
goto errout;
- err = -EINVAL;
if (handle) {
fnew->handle = handle;
if (!fold) {
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH][net-next] net_sched: remove redundant assignment to ret
@ 2017-09-29 14:01 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-09-29 14:01 UTC (permalink / raw)
To: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment of -EINVAL to variable ret is redundant as it
is being overwritten on the following error exit paths or
to the return value from the following call to basic_set_parms.
Fix this up by removing it. Cleans up clang warning message:
net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/sched/cls_basic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index cfeb6f158566..700b345b07f9 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -182,7 +182,6 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
if (err < 0)
goto errout;
- err = -EINVAL;
if (handle) {
fnew->handle = handle;
if (!fold) {
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][net-next] net_sched: remove redundant assignment to ret
2017-09-29 14:01 ` Colin King
@ 2017-09-29 17:35 ` Cong Wang
-1 siblings, 0 replies; 6+ messages in thread
From: Cong Wang @ 2017-09-29 17:35 UTC (permalink / raw)
To: Colin King
Cc: Jamal Hadi Salim, Jiri Pirko, David S . Miller,
Linux Kernel Network Developers, kernel-janitors, LKML
On Fri, Sep 29, 2017 at 7:01 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of -EINVAL to variable ret is redundant as it
> is being overwritten on the following error exit paths or
> to the return value from the following call to basic_set_parms.
> Fix this up by removing it. Cleans up clang warning message:
>
> net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: 1d8134fea2eb ("net_sched: use idr to allocate basic filter handles")
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][net-next] net_sched: remove redundant assignment to ret
@ 2017-09-29 17:35 ` Cong Wang
0 siblings, 0 replies; 6+ messages in thread
From: Cong Wang @ 2017-09-29 17:35 UTC (permalink / raw)
To: Colin King
Cc: Jamal Hadi Salim, Jiri Pirko, David S . Miller,
Linux Kernel Network Developers, kernel-janitors, LKML
On Fri, Sep 29, 2017 at 7:01 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of -EINVAL to variable ret is redundant as it
> is being overwritten on the following error exit paths or
> to the return value from the following call to basic_set_parms.
> Fix this up by removing it. Cleans up clang warning message:
>
> net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: 1d8134fea2eb ("net_sched: use idr to allocate basic filter handles")
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][net-next] net_sched: remove redundant assignment to ret
2017-09-29 14:01 ` Colin King
@ 2017-10-01 3:08 ` David Miller
-1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-10-01 3:08 UTC (permalink / raw)
To: colin.king
Cc: jhs, xiyou.wangcong, jiri, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Fri, 29 Sep 2017 15:01:16 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of -EINVAL to variable ret is redundant as it
> is being overwritten on the following error exit paths or
> to the return value from the following call to basic_set_parms.
> Fix this up by removing it. Cleans up clang warning message:
>
> net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][net-next] net_sched: remove redundant assignment to ret
@ 2017-10-01 3:08 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-10-01 3:08 UTC (permalink / raw)
To: colin.king
Cc: jhs, xiyou.wangcong, jiri, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Fri, 29 Sep 2017 15:01:16 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of -EINVAL to variable ret is redundant as it
> is being overwritten on the following error exit paths or
> to the return value from the following call to basic_set_parms.
> Fix this up by removing it. Cleans up clang warning message:
>
> net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-10-01 3:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-29 14:01 [PATCH][net-next] net_sched: remove redundant assignment to ret Colin King
2017-09-29 14:01 ` Colin King
2017-09-29 17:35 ` Cong Wang
2017-09-29 17:35 ` Cong Wang
2017-10-01 3:08 ` David Miller
2017-10-01 3:08 ` David Miller
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.