From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Xilin Wu <wuxilin123@gmail.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Junhao Xie <bigfoot@classfun.cn>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Sam Ravnborg <sam@ravnborg.org>,
David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Tengfei Fan <quic_tengfan@quicinc.com>,
Molly Sophia <mollysophia379@gmail.com>,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 02/10] pwm: Add SI-EN SN3112 PWM support
Date: Thu, 25 Apr 2024 08:08:26 +0200 [thread overview]
Message-ID: <7j7d3ygupaprtryygxlpyjezd6naaaevrnzrpybxe7twcvuhbm@fzmswsfql37r> (raw)
In-Reply-To: <17d36836-67cb-4d5a-a8b4-ecf1517a0020@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]
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/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-04-25 6:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 15:29 [PATCH 00/10] AYN Odin 2 support Xilin Wu via B4 Relay
2024-04-24 15:29 ` [PATCH 01/10] dt-bindings: pwm: Add SI-EN SN3112 PWM support Xilin Wu via B4 Relay
2024-04-25 6:04 ` Uwe Kleine-König
2024-04-24 15:29 ` [PATCH 02/10] " Xilin Wu via B4 Relay
2024-04-24 15:55 ` Bryan O'Donoghue
2024-04-24 19:09 ` BigfootACA
2024-04-25 6:08 ` Uwe Kleine-König [this message]
2024-04-24 19:37 ` Konrad Dybcio
2024-04-25 0:57 ` Junhao Xie
2024-04-25 7:57 ` Neil Armstrong
2024-04-25 6:14 ` Uwe Kleine-König
2024-04-25 6:02 ` Uwe Kleine-König
2024-04-25 7:03 ` Junhao Xie
2024-04-24 15:29 ` [PATCH 03/10] dt-bindings: display: panel: Add Synaptics TD4328 Xilin Wu via B4 Relay
2024-04-25 16:11 ` Rob Herring
2024-04-28 3:25 ` Xilin Wu
2024-04-24 15:29 ` [PATCH 04/10] drm/panel: Add driver for Synaptics TD4328 LCD panel Xilin Wu via B4 Relay
2024-04-24 15:58 ` Bryan O'Donoghue
2024-04-28 3:29 ` Xilin Wu
2024-04-24 15:29 ` [PATCH 05/10] arm64: dts: qcom: pmk8550: Add PWM controller Xilin Wu via B4 Relay
2024-04-24 19:38 ` Konrad Dybcio
2024-04-24 15:29 ` [PATCH 06/10] arm64: dts: qcom: sm8550: Add UART15 Xilin Wu via B4 Relay
2024-04-24 23:39 ` Dmitry Baryshkov
2024-04-24 15:29 ` [PATCH 07/10] arm64: dts: qcom: sm8550: Update EAS properties Xilin Wu via B4 Relay
2024-04-24 22:45 ` Bryan O'Donoghue
2024-04-28 3:43 ` Xilin Wu
2024-04-24 15:29 ` [PATCH 08/10] dt-bindings: vendor-prefixes: Add AYN Technologies Xilin Wu via B4 Relay
2024-04-25 16:13 ` Rob Herring
2024-04-28 3:44 ` Xilin Wu
2024-04-24 15:29 ` [PATCH 09/10] dt-bindings: arm: qcom: Add AYN Odin 2 Xilin Wu via B4 Relay
2024-04-24 15:43 ` Bryan O'Donoghue
2024-04-24 15:29 ` [PATCH 10/10] arm64: dts: " Xilin Wu via B4 Relay
2024-04-25 6:28 ` Krzysztof Kozlowski
2024-04-28 3:54 ` Xilin Wu
2024-04-30 10:26 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7j7d3ygupaprtryygxlpyjezd6naaaevrnzrpybxe7twcvuhbm@fzmswsfql37r \
--to=u.kleine-koenig@pengutronix.de \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=bigfoot@classfun.cn \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mollysophia379@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=quic_tengfan@quicinc.com \
--cc=robh@kernel.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
--cc=wuxilin123@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).