[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7j7d3ygupaprtryygxlpyjezd6naaaevrnzrpybxe7twcvuhbm@fzmswsfql37r>
Date: Thu, 25 Apr 2024 08:08:26 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Xilin Wu <wuxilin123@...il.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Junhao Xie <bigfoot@...ssfun.cn>, Neil Armstrong <neil.armstrong@...aro.org>,
Jessica Zhang <quic_jesszhan@...cinc.com>, Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>, Tengfei Fan <quic_tengfan@...cinc.com>,
Molly Sophia <mollysophia379@...il.com>, linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 02/10] pwm: Add SI-EN SN3112 PWM support
Hello,
On Wed, Apr 24, 2024 at 04:55:26PM +0100, Bryan O'Donoghue wrote:
> On 24/04/2024 16:29, Xilin Wu via B4 Relay wrote:
> > +#include <linux/i2c.h>
> > +#include <linux/module.h>
> > +#include <linux/mutex.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/pwm.h>
> > +#include <linux/regmap.h>
> > +#include <linux/delay.h>
> > +#include <linux/gpio/consumer.h>
> > +#include <linux/regulator/consumer.h>
>
> Includes should be alphabetised
Also check if you need them all. (E.g. I wonder about delay.h)
> > + dev_dbg(priv->pdev, "request regmap_write 0x%x 0x%x\n", reg, val);
> > + err = regmap_write(priv->regmap, reg, val);
> > + if (err)
> > + dev_warn_ratelimited(
> > + priv->pdev,
> > + "regmap_write to register 0x%x failed: %pe\n", reg,
> > + ERR_PTR(err));
>
> Multi-line should be encapsulated in {}
>
> if (err) {
> stuff
> goes here
> }
In my eyes a single state doesn't need {} even when spanning multiple
lines.
> > + return err;
> > +}
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists