I2C: Fix CodingStyle issues in soft_i2c.c
PATCH 1/1 I2C: Fix CodingStyle issues in soft_i2c.c
--- drivers/i2c/soft_i2c.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
drivers/i2c/soft_i2c.c +12 -12
@@ -93,10 +93,10 @@ static uchar read_byte (int);*/ static void send_reset (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 int j;
@@ -125,10 +125,10 @@ static void send_reset(void)*/ static void send_start (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
@@ -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;
Signature · 5 lines
1.5.6.1 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Wolfgang Denk
NAKPATCH 1/1 I2C: Fix CodingStyle issues in soft_i2c.c
Dear Heiko Schocher,
Quoted 10 lines · In message <[email protected]> you wrote:
Signed-off-by Heiko Schocher <[email protected]>--- drivers/i2c/soft_i2c.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)drivers/i2c/soft_i2c.c +0
-0
drivers/i2c/soft_i2c.c static uchar read_byte (int); · line 96
Quoted 5 lines
drivers/i2c/soft_i2c.c +1
-1@@ -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.
drivers/i2c/soft_i2c.c static uchar read_byte (int); · line 97
Quoted 2 lines
drivers/i2c/soft_i2c.c +1
-1-#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.
Quoted 52 lines
drivers/i2c/soft_i2c.c +2
-2-#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
drivers/i2c/soft_i2c.c +6
-6@@ -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)
drivers/i2c/soft_i2c.c int i2c_set_bus_speed(unsigned int speed) · line 299
Quoted 10 lines
drivers/i2c/soft_i2c.c +2
-2{ -#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
Signature · 6 lines
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.
PATCH 1/1 I2C: Fix CodingStyle issues in soft_i2c.c
In reply to Heiko SchocherDear Heiko,
Quoted 3 lines · In message <[email protected]> you wrote:
Signed-off-by Heiko Schocher <[email protected]>--- drivers/i2c/soft_i2c.c | 24 ++++++++++++------------
...
drivers/i2c/soft_i2c.c static uchar read_byte (int); · line 101
Quoted 3 lines
drivers/i2c/soft_i2c.c +1
-0+#if defined(CONFIG_8xx) && !defined(CONFIG_MGSUVD )volatile immap_t *immr = (immap_t *)CFG_IMMR ;#endif
I cannot find any feedback from you fro my comment about this non-coding style change. We don't want to add such board specific code in global files.
Can you please update and resubmit this patch? Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 Es gibt immer genug fuer die Beduerfnisse aller, aber niemals genug fuer die Gier einzelner. -- Ghandi