From: Jamal Hadi Salim Subject: Re: [PATCH net-next 2/2] net: sched: sch_api: rearrange init handling Date: Tue, 5 Dec 2017 07:30:31 -0500 Message-ID: References: <20171204234000.20756-1-aring@mojatatu.com> <20171204234000.20756-3-aring@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: xiyou.wangcong@gmail.com, jiri@resnulli.us, netdev@vger.kernel.org, David Ahern To: Alexander Aring , davem@davemloft.net Return-path: Received: from mail-it0-f68.google.com ([209.85.214.68]:39939 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbdLEMad (ORCPT ); Tue, 5 Dec 2017 07:30:33 -0500 Received: by mail-it0-f68.google.com with SMTP id f190so1046404ita.5 for ; Tue, 05 Dec 2017 04:30:33 -0800 (PST) In-Reply-To: <20171204234000.20756-3-aring@mojatatu.com> Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On 17-12-04 06:40 PM, Alexander Aring wrote: > This patch fixes the following checkpatch error: > > ERROR: do not use assignment in if condition > > by rearranging the if condition to execute init callback only if init > callback exists. The whole setup afterwards is called in any case, > doesn't matter if init callback is set or not. This patch has the same > behaviour as before, just without assign err variable in if condition. > It also makes the code easier to read. > > Reviewed-by: Jamal Hadi Salim > Cc: David Ahern > Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim cheers, jamal