Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742146 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-09-29 16:10 +0200 |
| Last post | 2017-10-01 05:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH][net-next] net_sched: remove redundant assignment to ret Colin King <colin.king@canonical.com> - 2017-09-29 16:10 +0200
Re: [PATCH][net-next] net_sched: remove redundant assignment to ret Cong Wang <xiyou.wangcong@gmail.com> - 2017-09-29 19:40 +0200
Re: [PATCH][net-next] net_sched: remove redundant assignment to ret David Miller <davem@davemloft.net> - 2017-10-01 05:10 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-09-29 16:10 +0200 |
| Subject | [PATCH][net-next] net_sched: remove redundant assignment to ret |
| Message-ID | <uv49k-7bh-35@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-09-29 19:40 +0200 |
| Message-ID | <uv7qy-Nr-15@gated-at.bofh.it> |
| In reply to | #1742146 |
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>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-10-01 05:10 +0200 |
| Message-ID | <uvCNI-4V8-5@gated-at.bofh.it> |
| In reply to | #1742146 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web