All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: LM Sensors <sensors@stimpy.netroedge.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH][I2C] Marvell mv64xxx i2c driver
Date: Thu, 19 May 2005 06:25:33 +0000	[thread overview]
Message-ID: <20050126224231.GA4874@kroah.com> (raw)
In-Reply-To: <41F81227.6070101@mvista.com>

On Wed, Jan 26, 2005 at 02:56:55PM -0700, Mark A. Greer wrote:
> +#include <linux/config.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/sched.h>
> +#include <linux/init.h>
> +#include <linux/pci.h>
> +#include <linux/wait.h>
> +#include <linux/spinlock.h>
> +#include <asm/io.h>
> +#include <asm/ocp.h>
> +#include <linux/i2c.h>
> +#include <linux/interrupt.h>
> +#include <linux/delay.h>
> +#include <linux/mv643xx.h>
> +#include "i2c-mv64xxx.h"

Please put <asm/ after <linux/

> +static inline void
> +mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)
> +{
> +	pr_debug("mv64xxx_i2c_fsm: ENTER--state: %d, status: 0x%x\n",
> +		drv_data->state, status);

You have a lot of pr_debug and other printk() for stuff in this driver.
Please use dev_dbg(), dev_err() and friends instead.  That way you get a
consistant message, that points to the exact device that is causing the
message.

> +static inline void
> +mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data,
> +	struct i2c_msg *msg)

You have some big inline functions here.  Should they really be inline?
We aren't really worried about speed here, right?  Size is probably a
bigger issue.

> diff -Nru a/drivers/i2c/busses/i2c-mv64xxx.h b/drivers/i2c/busses/i2c-mv64xxx.h
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/drivers/i2c/busses/i2c-mv64xxx.h	2005-01-26 14:49:22 -07:00

Is this header file really needed?  Does any other file other than this
single driver ever include it?  If not, please just put it into the
driver itself.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: LM Sensors <sensors@stimpy.netroedge.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][I2C] Marvell mv64xxx i2c driver
Date: Wed, 26 Jan 2005 14:42:31 -0800	[thread overview]
Message-ID: <20050126224231.GA4874@kroah.com> (raw)
In-Reply-To: <41F81227.6070101@mvista.com>

On Wed, Jan 26, 2005 at 02:56:55PM -0700, Mark A. Greer wrote:
> +#include <linux/config.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/sched.h>
> +#include <linux/init.h>
> +#include <linux/pci.h>
> +#include <linux/wait.h>
> +#include <linux/spinlock.h>
> +#include <asm/io.h>
> +#include <asm/ocp.h>
> +#include <linux/i2c.h>
> +#include <linux/interrupt.h>
> +#include <linux/delay.h>
> +#include <linux/mv643xx.h>
> +#include "i2c-mv64xxx.h"

Please put <asm/ after <linux/

> +static inline void
> +mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)
> +{
> +	pr_debug("mv64xxx_i2c_fsm: ENTER--state: %d, status: 0x%x\n",
> +		drv_data->state, status);

You have a lot of pr_debug and other printk() for stuff in this driver.
Please use dev_dbg(), dev_err() and friends instead.  That way you get a
consistant message, that points to the exact device that is causing the
message.

> +static inline void
> +mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data,
> +	struct i2c_msg *msg)

You have some big inline functions here.  Should they really be inline?
We aren't really worried about speed here, right?  Size is probably a
bigger issue.

> diff -Nru a/drivers/i2c/busses/i2c-mv64xxx.h b/drivers/i2c/busses/i2c-mv64xxx.h
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/drivers/i2c/busses/i2c-mv64xxx.h	2005-01-26 14:49:22 -07:00

Is this header file really needed?  Does any other file other than this
single driver ever include it?  If not, please just put it into the
driver itself.

thanks,

greg k-h

  reply	other threads:[~2005-05-19  6:25 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26  1:26 [PATCH][I2C] Marvell mv64xxx i2c driver Mark A. Greer
2005-05-19  6:25 ` Mark A. Greer
2005-01-26 19:56 ` Jean Delvare
2005-05-19  6:25   ` Jean Delvare
2005-01-26 20:33   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
2005-01-26 21:56   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
2005-01-26 22:42     ` Greg KH [this message]
2005-05-19  6:25       ` Greg KH
2005-01-26 23:59       ` Mark A. Greer
2005-05-19  6:25         ` Mark A. Greer
2005-01-31 18:25 ` Greg KH
2005-05-19  6:25   ` Greg KH
2005-01-31 18:41   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
2005-02-01  0:46     ` Greg KH
2005-05-19  6:25       ` Greg KH
2005-02-01 17:54       ` Mark A. Greer
2005-05-19  6:25         ` Mark A. Greer
2005-05-19  6:25 ` Alexey Dobriyan
2005-02-03 19:12   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
2005-02-04  0:38     ` Alexey Dobriyan
2005-05-19  6:25       ` Alexey Dobriyan
2005-02-04  0:04       ` Mark A. Greer
2005-05-19  6:25         ` Mark A. Greer
2005-02-04  9:45         ` Jean Delvare
2005-05-19  6:25           ` Jean Delvare
2005-02-06 14:36           ` Jean Delvare
2005-05-19  6:25             ` Jean Delvare
2005-05-19  6:25 ` Alexey Dobriyan
2005-02-02  1:27   ` Greg KH
2005-05-19  6:25     ` Greg KH
2005-02-02 17:26   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
  -- strict thread matches above, loose matches on Subject: below --
2005-01-26  1:29 Mark A. Greer
2005-02-08 23:27 Mark A. Greer
2005-05-19  6:25 ` Mark A. Greer
2005-02-09  0:01 ` Bartlomiej Zolnierkiewicz
2005-05-19  6:25   ` Bartlomiej Zolnierkiewicz
2005-02-09  0:32   ` Mark A. Greer
2005-05-19  6:25     ` Mark A. Greer
2005-02-09  1:24     ` Bartlomiej Zolnierkiewicz
2005-05-19  6:25       ` Bartlomiej Zolnierkiewicz
2005-02-09 21:33       ` Mark A. Greer
2005-05-19  6:25         ` Mark A. Greer
2005-02-17 22:25         ` Greg KH
2005-05-19  6:25           ` Greg KH

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=20050126224231.GA4874@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgreer@mvista.com \
    --cc=sensors@stimpy.netroedge.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.