All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Chen Feng <puck.chen@hisilicon.com>
Cc: lee.jones@linaro.org, linux-kernel@vger.kernel.org,
	lgirdwood@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, xuwei5@hisilicon.com, puck.chen@aliyun.com,
	yudongbin@hisilicon.com, saberlily.xia@hisilicon.com,
	suzhuangluan@hisilicon.com, kong.kongxinwei@hisilicon.com,
	xuyiping@hisilicon.com, z.liuxinliang@hisilicon.com,
	weidong2@hisilicon.com, w.f@huawei.com, qijiwen@hisilicon.com,
	peter.panshilin@hisilicon.com, dan.zhao@hisilicon.com,
	linuxarm@huawei.com
Subject: Re: [PATCH v3 4/5] regulator: add regulator driver of hi655x PMIC
Date: Wed, 16 Dec 2015 19:16:48 +0000	[thread overview]
Message-ID: <20151216191648.GP5727@sirena.org.uk> (raw)
In-Reply-To: <1450184056-79851-5-git-send-email-puck.chen@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]

On Tue, Dec 15, 2015 at 08:54:15PM +0800, Chen Feng wrote:

> +config REGULATOR_HI655X
> +	tristate "Hisilicon HI655X PMIC regulators support"
> +	depends on ARCH_HISI
> +	depends on MFD_HI655X_PMIC && OF
> +	help
> +	  This driver provides support for the voltage regulators of the
> +	  Hisilicon Hi655x PMIC device.
> +

On the previous version of this patch I said:

| For both of these we should have an || COMPILE_TEST and there's no need
| for either to be bool I can see, they should be tristate.

I see you have made this a tristate which is good but you've not enabled
COMPILE_TEST or indicated why - there may be a very good reason for
doing this but nobody has said what it is.  Please don't ignore review
comments, people are generally making them for a reason and are likely
to have the same concerns if issues remain unaddressed.  Having to
repeat the same comments can get repetitive and make people question the
value of time spent reviewing.  If you disagree with the review comments
that's fine but you need to reply and discuss your concerns so that the
reviewer can understand your decisions.

> +static int hi655x_is_enabled(struct regulator_dev *rdev)
> +{
> +	unsigned int value = 0;
> +
> +	struct hi655x_regulator *regulator = rdev_get_drvdata(rdev);
> +	struct hi655x_regulator_ctrl_regs *ctrl_regs = &regulator->ctrl_regs;

The style here is not what we normally do - normally the struct lookups
would be first, then any other variables and there wouldn't be any blank
lines in the variable declarations.  The same applies to quite a few
functions.

> +static int hi655x_set_voltage(struct regulator_dev *rdev,
> +				int min_uV, int max_uV, unsigned *selector)
> +{

As I commented on the previous version of this driver:

| Use the standard helpers, including one of the map_voltage()s and
| set_voltage_sel_regmap(), don't open code them.

You need to at least split the map and set_voltage_sel operations.

I've stopped reviewing here.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-12-16 19:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 12:54 [PATCH v3 0/5] Add Support for Hi6220 PMIC Hi6553 MFD Core Chen Feng
2015-12-15 12:54 ` [PATCH v3 1/5] doc: bindings: Add document for mfd hi665x PMIC Chen Feng
2015-12-15 12:54 ` [PATCH v3 2/5] doc: bindings: Document for hi655x regulator driver Chen Feng
2015-12-15 12:54 ` [PATCH v3 3/5] mfd: hi655x: Add hi665x pmic driver Chen Feng
2015-12-15 13:29   ` [PATCH] mfd: hi655x: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-12-15 13:29   ` [PATCH v3 3/5] mfd: hi655x: Add hi665x pmic driver kbuild test robot
2015-12-15 12:54 ` [PATCH v3 4/5] regulator: add regulator driver of hi655x PMIC Chen Feng
2015-12-16 19:16   ` Mark Brown [this message]
2015-12-17  3:18     ` chenfeng
2015-12-15 12:54 ` [PATCH v3 5/5] hisilicon/dts: Add hi655x pmic dts node Chen Feng
2015-12-17  3:27   ` chenfeng
2015-12-18 17:58     ` Mark Brown
2015-12-21  3:01       ` chenfeng
2015-12-21  6:20         ` chenfeng
2015-12-23  0:46           ` Mark Brown
2015-12-24  2:43             ` chenfeng
2015-12-22 16:08         ` 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=20151216191648.GP5727@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=dan.zhao@hisilicon.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=peter.panshilin@hisilicon.com \
    --cc=puck.chen@aliyun.com \
    --cc=puck.chen@hisilicon.com \
    --cc=qijiwen@hisilicon.com \
    --cc=robh+dt@kernel.org \
    --cc=saberlily.xia@hisilicon.com \
    --cc=suzhuangluan@hisilicon.com \
    --cc=w.f@huawei.com \
    --cc=weidong2@hisilicon.com \
    --cc=xuwei5@hisilicon.com \
    --cc=xuyiping@hisilicon.com \
    --cc=yudongbin@hisilicon.com \
    --cc=z.liuxinliang@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.