From: Markus Elfring Date: Wed, 24 Jul 2019 09:30:16 +0000 Subject: Re: [PATCH v4 3/3] coccinelle: Add script to check for platform_get_irq() excessive prints Message-Id: List-Id: References: <20190723181624.203864-4-swboyd@chromium.org> In-Reply-To: <20190723181624.203864-4-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Stephen Boyd , cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org, Masahiro Yamada , Michal Marek , Nicolas Palix Cc: Rob Herring , Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, Javier Martinez Canillas , Andrzej Hajda , Andy Shevchenko , Mark Brown , Russell King , Marek Szyprowski I would prefer to concentrate the usage of SmPL disjunctions on changing implementation details so that the specification of duplicate code can be avoided. > +( > +platform_get_irq(E, ...) > +| > +platform_get_irq_byname(E, ...) > +); Function names: +(platform_get_irq +|platform_get_irq_byname +)(E, ...); > +if ( \( ret < 0 \| ret <= 0 \) ) Comparison operators: +if (ret \( < \| <= \) 0) > +if (ret != -EPROBE_DEFER) Is it appropriate to treat this error code check as optional by the shown transformation approach? Can this case distinction be omitted? Regards, Markus