[U-Boot] [PATCH] ARM: OMAP: I2C coding style clean up
Wolfgang Denk
wd at denx.de
Sun Nov 9 20:35:30 CET 2008
Dear dirk.behme at googlemail.com,
In message <4916ed9e.1d255e0a.7af6.ffffe30d at mx.google.com> you wrote:
> Subject: [PATCH] ARM: OMAP: I2C coding style clean up
>
> From: Dirk Behme <dirk.behme at gmail.com>
>
> Clean up coding style and read/write macro usage as requested by Wolfgang Denk and Jean-Christophe PLAGNIOL-VILLARD.
>
> Signed-off-by: Dirk Behme <dirk.behme at gmail.com>
>
> ---
>
> Note: Patch is against U-Boot master commit 1378174a1351c0285736863a665ab758fe8d5f71 "Merge branch 'master' of /home/wd/git/u-boot/custodians"
>
> drivers/i2c/omap24xx_i2c.c | 250 ++++++++++++++++++++++-----------------------
> 1 files changed, 126 insertions(+), 124 deletions(-)
NAK.
> Index: u-boot-main/drivers/i2c/omap24xx_i2c.c
> ===================================================================
> --- u-boot-main.orig/drivers/i2c/omap24xx_i2c.c
> +++ u-boot-main/drivers/i2c/omap24xx_i2c.c
> @@ -25,67 +25,64 @@
> #include <asm/arch/i2c.h>
> #include <asm/io.h>
>
> -#define inw(a) __raw_readw(a)
> -#define outw(a,v) __raw_writew(a,v)
> -
> -static void wait_for_bb (void);
> -static u16 wait_for_pin (void);
> +static void wait_for_bb(void);
> +static u16 wait_for_pin(void);
> static void flush_fifo(void);
>
> -void i2c_init (int speed, int slaveadd)
> +void i2c_init(int speed, int slaveadd)
> {
> u16 scl;
>
> - outw(0x2, I2C_SYSC); /* for ES2 after soft reset */
> + writew(0x2, I2C_SYSC); /* for ES2 after soft reset */
NAK. You are mixing two different, unrelated things here: converting
the code from in*/out*() to read*/write*() in one thing (= one
patch), but the coding style cleanup is another, unrelated change (=
separate patch, if you really find worth changing this - as far as I
can see the file is consistent in the use of whitespace, so I don't
see an urgency here).
But if you decide for the clean up, then please clean up spelling
errors, too, like here:
/* have to read to clear intrrupt */
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The faster I go, the behinder I get. -- Lewis Carroll
More information about the U-Boot
mailing list