From: Stephen Boyd Date: Wed, 24 Jul 2019 18:21:54 +0000 Subject: Re: [PATCH v4 3/3] coccinelle: Add script to check for platform_get_irq() excessive prints Message-Id: <5d38a1c3.1c69fb81.2b26a.b585@mx.google.com> List-Id: References: <20190723181624.203864-4-swboyd@chromium.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Markus Elfring , Masahiro Yamada , Michal Marek , Nicolas Palix , cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org 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 Quoting Markus Elfring (2019-07-24 02:30:16) > 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) > Thanks. Will fold the above two in. > > > +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? I don't know what you mean here. Do you want me to drop this part so that EPROBE_DEFER checks don't get removed?