Re: [RFC PATCH 2/2] Add Dialog DA9030 battery charger driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anton Vorontsov
Date: Thursday, December 18, 2008 - 1:55 pm

Hi all,

On Thu, Dec 18, 2008 at 01:36:28PM +0200, Mike Rapoport wrote:
[...]

Samuel, as it depends on the MFD part, feel free to merge it into your
tree.

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>


Mike,

Thanks for the patch, looks really good. Few comments down below.

[...]

The code should explicitly include all the needed headers.

#include <linux/kernel.h> (for container_of, sprintf, ...)
#include <linux/init.h> (initcalls)
#include <linux/types.h> (uint8_t)
#include <linux/device.h> (struct device)
#include <linux/workqueue.h> (delayedwork)

^^^ This is the only real comment. All the rest are nitpicks,
which you can freely ignore if you like.


In kernel we can use bool type, and true/false constants.


(1)


I'd put an empty line here, or remove empty line at (1). Just for
consistency.


= 0 isn't necessary here.


I'd write it as:

if (charger->is_on)
	return;
the-rest;

Saves one indent level.


One semicolon is enough.


I would suggest using canonical-style comments:

/*
 * Not a big deal though, I'm
 * just nitpicking. ;-)
 */

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 2/2] Add Dialog DA9030 battery charger driver, Mike Rapoport, (Wed Dec 17, 12:56 am)
Re: [RFC PATCH 2/2] Add Dialog DA9030 battery charger driver, Anton Vorontsov, (Thu Dec 18, 1:55 pm)