public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: cy_huang <u0084500@gmail.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, cy_huang@richtek.com
Subject: [PATCH] regulator: rtq2134: Fix coding style
Date: Fri, 30 Jul 2021 20:32:06 +0800	[thread overview]
Message-ID: <1627648326-5026-1-git-send-email-u0084500@gmail.com> (raw)

From: ChiYuan Huang <cy_huang@richtek.com>

Add empty space and put constant number to the right side for 'if' judgement.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
 drivers/regulator/rtq2134-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/rtq2134-regulator.c b/drivers/regulator/rtq2134-regulator.c
index e09419c..f21e3f8 100644
--- a/drivers/regulator/rtq2134-regulator.c
+++ b/drivers/regulator/rtq2134-regulator.c
@@ -311,7 +311,7 @@ static const struct rtq2134_regulator_desc rtq2134_regulator_descs[] = {
 
 static bool rtq2134_is_accissible_reg(struct device *dev, unsigned int reg)
 {
-	if (RTQ2134_REG_IO_CHIPNAME <= reg && reg <= RTQ2134_REG_BUCK3_SLEWCTRL)
+	if (reg >= RTQ2134_REG_IO_CHIPNAME && reg <= RTQ2134_REG_BUCK3_SLEWCTRL)
 		return true;
 	return false;
 }
@@ -329,7 +329,7 @@ static int rtq2134_probe(struct i2c_client *i2c)
 {
 	struct regmap *regmap;
 	struct regulator_dev *rdev;
-	struct regulator_config regulator_cfg= {};
+	struct regulator_config regulator_cfg = {};
 	int i;
 
 	regmap = devm_regmap_init_i2c(i2c, &rtq2134_regmap_config);
-- 
2.7.4


             reply	other threads:[~2021-07-30 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 12:32 cy_huang [this message]
2021-07-30 19:03 ` [PATCH] regulator: rtq2134: Fix coding style Mark Brown

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=1627648326-5026-1-git-send-email-u0084500@gmail.com \
    --to=u0084500@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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