[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200617181433.4aeee30c@kicinski-fedora-PC1C0HJN>
Date: Wed, 17 Jun 2020 18:14:33 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Gaurav Singh <gaurav1086@...il.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
netdev@...r.kernel.org (open list:TC subsystem),
linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH] [net/sched]: Remove redundant condition in qdisc_graft
On Wed, 17 Jun 2020 20:55:26 -0400 Gaurav Singh wrote:
> parent cannot be NULL here since its in the else part
> of the if (parent == NULL) condition. Remove the extra
> check on parent pointer.
>
> Signed-off-by: Gaurav Singh <gaurav1086@...il.com>
Change seems legit, but it obviously doesn't build...
> net/sched/sch_api.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
> index 9a3449b56bd6..8c92d00c5c8e 100644
> --- a/net/sched/sch_api.c
> +++ b/net/sched/sch_api.c
> @@ -1094,7 +1094,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
>
> /* Only support running class lockless if parent is lockless */
> if (new && (new->flags & TCQ_F_NOLOCK) &&
> - parent && !(parent->flags & TCQ_F_NOLOCK))
> + && !(parent->flags & TCQ_F_NOLOCK))
> qdisc_clear_nolock(new);
>
> if (!cops || !cops->graft)
Powered by blists - more mailing lists