All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] Support for Enermax DigiFanless 550W PSU
Date: Mon, 17 Aug 2015 01:13:23 +0000	[thread overview]
Message-ID: <55D13533.8080502@roeck-us.net> (raw)
In-Reply-To: <CAF=9fWv3JY_ejXwa9Z93YYnbEOXQjgt-xh60nT4GySwMY7b-yA@mail.gmail.com>

On 08/16/2015 03:56 PM, Frank Schaefer wrote:
> This driver supports the embedded monitoring (trade name "ZDPMS") in
> the Enermax EDF550AWN power supply.
>
> Signed-off-by: Frank Schaefer <kelledin@gmail.com>
>

Patches sent as attachments are hard to reply to. Please follow guidelines in
Documentation/SubmittingPatches.

checkpatch reports
	total: 141 errors, 418 warnings, 986 lines checked
which is really a bit on the high side, even though many of those are whitespace
errors. Please fix.

As a hwmon driver, I would prefer for the driver to reside in driver/hwmon.
Other than that, a few generic comments.
- Please no unnecessary value/null piointer checks. Static functions should not
   need any; public functions such as show or store functions neither.
   For each value check you'll have to explain why it is needed.
- In hwmon we use the standard multi-line comment style.
- Please use standard error return codes. Specifically, -1 is not a standard error
   return code.
- -ENOSYS means system call not supported, nothing else. But checkpatch will tell you
   that as well.
- Please use devm_kzalloc().
- Please no warning or error messages in sensor read or write code. Returning an error to user
   space is sufficient.
- Please no ZDPMS_ATTR macros. The savings are not enough to warrant the extra complexity.

This is just a start; with that many coding style violations this code is really difficult
to review.

Thanks,
Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2015-08-17  1:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-16 22:56 [lm-sensors] [PATCH] Support for Enermax DigiFanless 550W PSU Frank Schaefer
2015-08-17  1:13 ` Guenter Roeck [this message]
2015-08-17  3:57 ` Frank Schaefer
2015-08-17  6:11 ` Guenter Roeck

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=55D13533.8080502@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=lm-sensors@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 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.