[RFC linux v2 2/2] drivers/hwmon: Isolate bus transfer protocol

Joel Stanley joel at jms.id.au
Wed Oct 12 16:21:28 AEDT 2016


Hey Eddie,

On Wed, Oct 12, 2016 at 8:42 AM,  <eajames.ibm at gmail.com> wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> - Copy i2c related code into occ_i2c.c and simplify.
> - Copy common platform code into occ.c; more functions can be placed here
>   later.
> - Change core functions to accept OCC driver data parameter instead of
>   device pointer.

As a general rule, if you find yourself writing a series of bullet
points in a commit message, then that commit should be split up into
one patch for each bullet point. This list is a good example of such a
case.

I had a brief read of the patch, and I noticed many of the comments
are descriptions of what some very straightforward code is doing. I
think you can drop the comments in this case; consider adding another
patch that removes such comments.

Cheers,

Joel

> Signed-off-by: Edward A. James <eajames at us.ibm.com>
> ---
>  drivers/hwmon/occ/Makefile     |   2 +-
>  drivers/hwmon/occ/occ.c        | 127 +++++++++++++++
>  drivers/hwmon/occ/occ.h        |  47 ++++++
>  drivers/hwmon/occ/occ_i2c.c    | 150 ++++++++++++++++++
>  drivers/hwmon/occ/power8_occ.c | 343 +++++++++--------------------------------
>  drivers/hwmon/occ/power8_occ.h |  25 +++
>  6 files changed, 422 insertions(+), 272 deletions(-)
>  create mode 100644 drivers/hwmon/occ/occ.c
>  create mode 100644 drivers/hwmon/occ/occ.h
>  create mode 100644 drivers/hwmon/occ/occ_i2c.c
>  create mode 100644 drivers/hwmon/occ/power8_occ.h
>


More information about the openbmc mailing list