From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 29 Sep 2008 11:12:24 +0200 Subject: [U-Boot] [PATCH] I2C: Fix CodingStyle issues in soft_i2c.c In-Reply-To: <48E08A58.5060000@denx.de> References: <48E08A58.5060000@denx.de> Message-ID: <20080929091224.7B705248CD@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Heiko Schocher, In message <48E08A58.5060000@denx.de> you wrote: > Signed-off-by: Heiko Schocher > --- > drivers/i2c/soft_i2c.c | 24 ++++++++++++------------ > 1 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c > index f426bbb..bda0aaf 100644 > --- a/drivers/i2c/soft_i2c.c > +++ b/drivers/i2c/soft_i2c.c > @@ -93,10 +93,10 @@ static uchar read_byte (int); > */ > static void send_reset(void) > { > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) Why are you changing this? There is no reason to do that. > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) This is NOT a CodingStyle issue. Please do not try to sneak in such changes under another subject. Also, please avoid board specific code in global files. > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) > volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT); > #endif > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) > volatile immap_t *immr = (immap_t *)CFG_IMMR; > #endif > > @@ -147,10 +147,10 @@ static void send_start(void) > */ > static void send_stop(void) > { > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) > volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT); > #endif > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) > volatile immap_t *immr = (immap_t *)CFG_IMMR; > #endif > > @@ -172,10 +172,10 @@ static void send_stop(void) > */ > static void send_ack(int ack) > { > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) > volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT); > #endif > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) > volatile immap_t *immr = (immap_t *)CFG_IMMR; > #endif > > @@ -197,10 +197,10 @@ static void send_ack(int ack) > */ > static int write_byte(uchar data) > { > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) > volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT); > #endif > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) > volatile immap_t *immr = (immap_t *)CFG_IMMR; > #endif > int j; > @@ -290,10 +290,10 @@ int i2c_set_bus_speed(unsigned int speed) > */ > static uchar read_byte(int ack) > { > -#ifdef CONFIG_MPC8260 > +#if defined(CONFIG_MPC8260) > volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT); > #endif > -#ifdef CONFIG_8xx > +#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD) > volatile immap_t *immr = (immap_t *)CFG_IMMR; > #endif > int data; > -- NAK. I will not accept this patch. 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 years of peak mental activity are undoubtedly between the ages of four and eighteen. At four we know all the questions, at eighteen all the answers.