linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: Mark Brown <broonie@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Andy Shevchenko <andy@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	James Cameron <quozl@laptop.org>,
	Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Eric Miao <eric.y.miao@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Daniel Mack <daniel@zonque.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	platform-driver-x86@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 06/17] Platform: OLPC: Add XO-1.75 EC driver
Date: Sun, 2 Dec 2018 15:13:28 -0800	[thread overview]
Message-ID: <20181202231328.GB23087@wrath> (raw)
In-Reply-To: <20181116162403.49854-7-lkundrak@v3.sk>

On Fri, Nov 16, 2018 at 05:23:52PM +0100, Lubomir Rintel wrote:
> It's based off the driver from the OLPC kernel sources. Somewhat
> modernized and cleaned up, for better or worse.
> 
> Modified to plug into the olpc-ec driver infrastructure (so that battery
> interface and debugfs could be reused) and the SPI slave framework.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> 

Hi Lubomir,

You asked for some tips on how to incorporate the changes in a patch
series like this.

Keep in mind that each patch should create an independent small
functional change. This makes it easier to review the patch and verify
that what you said you were going to do matches what the patch does. For
example, if you separate out the style, whitespace, ordering of
declarations into an initial first patch, then all that noise is removed
when the reviewer goes to check to implementation of one of the features
below.

This is a large patch, and should most certainly be broken up into
several smaller patches. Do cleanups first, followed by functional
changes. This ordering ensure that when a "git blame" is used in the
future to understand why a given line is what it is, the first hit will
be a functional change, and not a cleanup.

> ---
> Changes since v1:
> - Cosmetic style changes; whitespace, ordering of declarations and
>   #includes, remoted extra comas from sentinels

Please make this a separate change, possibly more than one, depending on
how many of these there are. This will reduce the size of the subsequent
patches, making them easier to review.

> - Count the terminating NUL in LOG_BUF_SIZE
> - Make olpc_xo175_ec_is_valid_cmd() return -EINVAL instead of -1
>   on error
> - Spell keyboard/touchpad in full for CHAN_KEYBOARD/TOUCHPAD messages
> - Use a #define for PM wakeup processing time
> - Log a message on unknown event
> - Escape logging payload with %*pE
> - Replace an open-coded min()
> - Correct an error code on short read
> - replaced PM callback #ifdefs with __maybe_unusedm SET_RUNTIME_PM_OPS
>   and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
> - dev_get_drvdata() instead of a round-trip through platform device
> - s/unsigned char x/u8 x/ in olpc_xo175_ec_resume()
> - Use GENMASK() instead of 0xffff for the event mask
> - Replace cmd tx/resp rx buffers with structures
> - Turned suspend hint arguments into a struct, and tidied up the comment

Just from these comments, each of these could be a separate patch. You
can group related things together, or those that change the same line or
function for example. Order them with cleanups / non-functional-changes
first, followed by functional changes.

> 
> Basically all of the above is based on the review by Andy Shevchenko.

Andy, what was your intent for Lubomir here? From the above, this looks
like it should be several patches to me.

Thanks,

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2018-12-02 23:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 16:23 [PATCH v2 0/17] Add support for OLPC XO 1.75 Embedded Controller Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 01/17] power: supply: olpc_battery: correct the temperature units Lubomir Rintel
2018-12-05 21:05   ` Sebastian Reichel
2018-11-16 16:23 ` [PATCH v2 02/17] dt-bindings: olpc,xo1.75-ec: Add OLPC XO-1.75 EC bindings Lubomir Rintel
2018-11-17 16:03   ` Rob Herring
2018-11-16 16:23 ` [PATCH v2 03/17] Platform: OLPC: Remove an unused include Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 04/17] Revert "platform/olpc: Make ec explicitly non-modular" Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 05/17] Platform: OLPC: Move OLPC config symbol out of x86 tree Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 06/17] Platform: OLPC: Add XO-1.75 EC driver Lubomir Rintel
2018-12-02 23:13   ` Darren Hart [this message]
2018-12-03  7:54     ` Andy Shevchenko
2018-11-16 16:23 ` [PATCH v2 07/17] Platform: OLPC: Avoid a warning if the EC didn't register yet Lubomir Rintel
2018-12-02 23:15   ` Darren Hart
2018-11-16 16:23 ` [PATCH v2 08/17] Platform: OLPC: Move EC-specific functionality out from x86 Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 09/17] Platform: OLPC: Use BIT() and GENMASK() for event masks Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 10/17] Platform: OLPC: add a regulator for the DCON Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 11/17] dt-bindings: olpc_battery: Add XO-1.5 battery Lubomir Rintel
2018-12-05 20:53   ` Sebastian Reichel
2018-11-16 16:23 ` [PATCH v2 12/17] x86, olpc: Use a correct version when making up a battery node Lubomir Rintel
2018-11-16 16:23 ` [PATCH v2 13/17] power: supply: olpc_battery: Use DT to get battery version Lubomir Rintel
2018-12-02 23:24   ` Darren Hart
2018-12-05 20:54   ` Sebastian Reichel
2019-01-07 18:25     ` Lubomir Rintel
2018-11-16 16:24 ` [PATCH v2 14/17] power: supply: olpc_battery: Move priv data to a struct Lubomir Rintel
2018-12-05 20:57   ` Sebastian Reichel
2018-11-16 16:24 ` [PATCH v2 15/17] power: supply: olpc_battery: Use devm_power_supply_register() Lubomir Rintel
2018-12-05 20:58   ` Sebastian Reichel
2018-11-16 16:24 ` [PATCH v2 16/17] power: supply: olpc_battery: Avoid using platform_info Lubomir Rintel
2018-12-05 20:59   ` Sebastian Reichel
2018-11-16 16:24 ` [PATCH v2 17/17] power: supply: olpc_battery: Add OLPC XO 1.75 support Lubomir Rintel
2018-12-02 23:34   ` Darren Hart
2019-01-07 18:02     ` Lubomir Rintel

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=20181202231328.GB23087@wrath \
    --to=dvhart@infradead.org \
    --cc=andy@infradead.org \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eric.y.miao@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=mark.rutland@arm.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=quozl@laptop.org \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=sre@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;
as well as URLs for NNTP newsgroup(s).