OMAP3: Use I2C file coding style
Subject: [PATCH-OMAP3] OMAP3: Use I2C file coding style
From: Dirk Behme <[email protected]>
Use file coding style for inx/outx instead of global coding style.
---
Note: There was an additional review comment about this file:
-- cut --
Review
Quoted 4 lines
(quoted diff) +2
-0+#define inb(a) __raw_readb(a) +#define outb(a, v) __raw_writeb(a, v) #define inw(a) __raw_readw(a) #define outw(a,v) __raw_writew(a,v)
This 4 macro is supposed to be defined in io.h
-- cut --
In ARM's io.h there are already inx/outx macros, but with different syntax. The correct fix for omap24xx_i2c.c will be to replace all inx/outx by readx/writex macros and remove above defines. But this can't be done on OMAP3 branch, as it would conflict with "no general coding style clean up in OMAP3 patches, only OMAP3 related changes, please". Thus, we have to do code style changes for this file at mainline once OMAP3 is merged. Until then we have to stay with consistent local style.
drivers/i2c/omap24xx_i2c.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/omap24xx_i2c.c +5 -5
@@ -115,7 +115,7 @@ static int i2c_read_byte (u8 devaddr, u8 status =wait_for_pin ();if (status &I2C_STAT_RRDY ) {#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) - *value =inb (I2C_DATA ); + *value =inb (I2C_DATA );#else *value =inw (I2C_DATA );#endif
@@ -161,13 +161,13 @@ static int i2c_write_byte (u8 devaddr, uif (status &I2C_STAT_XRDY ) {#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX )/* send out 1 byte */ -outb (regoffset,I2C_DATA ); -outw (I2C_STAT_XRDY ,I2C_STAT ); +outb (regoffset,I2C_DATA ); +outw (I2C_STAT_XRDY ,I2C_STAT ); status =wait_for_pin ();if ((status &I2C_STAT_XRDY )) {/* send out next 1 byte */ -outb (value,I2C_DATA ); -outw (I2C_STAT_XRDY ,I2C_STAT ); +outb (value,I2C_DATA ); +outw (I2C_STAT_XRDY ,I2C_STAT ); }else { i2c_error =1 ; }
Quoted 21 lines · dirk.behme at googlemail.com
Subject: [PATCH-OMAP3] OMAP3: Use I2C file coding style
From: Dirk Behme <[email protected]>
Use file coding style for inx/outx instead of global coding style.
Signed-off-by Dirk Behme <[email protected]>---
Note: There was an additional review comment about this file:
-- cut --
Review
Quoted 4 lines
(quoted diff) +2
-0+#define inb(a) __raw_readb(a) +#define outb(a, v) __raw_writeb(a, v) #define inw(a) __raw_readw(a) #define outw(a,v) __raw_writew(a,v)This 4 macro is supposed to be defined in
io.h
-- cut --
Quoted 1 line
In ARM's
io.hthere are already inx/outx macros, but with different syntax. The correct fix foromap24xx_i2c.cwill be to replace all inx/outx by readx/writex macros and remove above defines. But this can't be done on OMAP3 branch, as it would conflict with "no general coding style clean up in OMAP3 patches, only OMAP3 related changes, please". Thus, we have to do code style changes for this file at mainline once OMAP3 is merged. Until then we have to stay with consistent local style.
I desagree,
This fix is supposed to be done before appling of the OMAP3 patch set not after.
please do not add code which need to fix just after.
NB : applied to the omap3 branch
Best Regards,
J.
Quoted 27 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 22 lines · dirk.behme at googlemail.com
Subject: [PATCH-OMAP3] OMAP3: Use I2C file coding style
From: Dirk Behme <[email protected]>
Use file coding style for inx/outx instead of global coding style.
Signed-off-by Dirk Behme <[email protected]>---
Note: There was an additional review comment about this file:
-- cut --
Quoted 4 lines
(quoted diff) +2
-0+#define inb(a) __raw_readb(a) +#define outb(a, v) __raw_writeb(a, v)#define inw(a)
__raw_readw(a)
#defineoutw(a,v)__raw_writew(a,v)This 4 macro is supposed to be defined in
io.h
-- cut --Quoted 1 line
In ARM's
io.hthere are already inx/outx macros, but with different syntax. The correct fix foromap24xx_i2c.cwill be to replace all inx/outx by readx/writex macros and remove above defines. But this can't be done on OMAP3 branch, as it would conflict with "no general coding style clean up in OMAP3 patches, only OMAP3 related changes, please". Thus, we have to do code style changes for this file at mainline once OMAP3 is merged. Until then we have to stay with consistent local style.
Quoted 6 lines
I desagree,
This fix is supposed to be done before appling of the OMAP3 patch set not after.
please do not add code which need to fix just after.
Sorry if I misunderstand something here, but it seems to me that this conflicts with
http://lists.denx.de/pipermail/u-boot/2008-November/042975.html
"It is more important to use a consistent style in a single source file, indeed."
?
Additionally, do you (you == all maintainers and reviewers at this list) accecpt/want to have general (non-OMAP3) coding style clean up in OMAP3 patch set? If yes, once we send the resulting OMAP3 patch series from u-boot-arm/omap3 for final merge to U-Boot list again, we will get
http://lists.denx.de/pipermail/u-boot/2008-October/042464.html
again. It was my understanding not to do this.
It would be really nice if you could give some more details how you like to have things done right (and not only a more or less limited "NACK" ;) ). I will do this then, but please give me some clear direction to go.
Many thanks for your help
Dirk
Quoted 38 lines · Dirk Behme
Quoted 27 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 22 lines · dirk.behme at googlemail.com
Subject: [PATCH-OMAP3] OMAP3: Use I2C file coding style
From: Dirk Behme <[email protected]>
Use file coding style for inx/outx instead of global coding style.
Signed-off-by Dirk Behme <[email protected]>---
Note: There was an additional review comment about this file:
-- cut --
Quoted 4 lines
(quoted diff) +2
-0+#define inb(a) __raw_readb(a) +#define outb(a, v) __raw_writeb(a, v)#define inw(a)
__raw_readw(a)
#defineoutw(a,v)__raw_writew(a,v)This 4 macro is supposed to be defined in
io.h
-- cut --Quoted 1 line
In ARM's
io.hthere are already inx/outx macros, but with different syntax. The correct fix foromap24xx_i2c.cwill be to replace all inx/outx by readx/writex macros and remove above defines. But this can't be done on OMAP3 branch, as it would conflict with "no general coding style clean up in OMAP3 patches, only OMAP3 related changes, please". Thus, we have to do code style changes for this file at mainline once OMAP3 is merged. Until then we have to stay with consistent local style.Quoted 6 lines
I desagree,
This fix is supposed to be done before appling of the OMAP3 patch set not after.
please do not add code which need to fix just after.
Sorry if I misunderstand something here, but it seems to me that this conflicts with
Quoted 6 lines
http://lists.denx.de/pipermail/u-boot/2008-November/042975.html
"It is more important to use a consistent style in a single source file, indeed."
?
As I said this fix need be done on the master branch before merge of the omap3 branch.
Quoted 5 lines
Additionally, do you (you == all maintainers and reviewers at this list) accecpt/want to have general (non-OMAP3) coding style clean up in OMAP3 patch set? If yes, once we send the resulting OMAP3 patch series from u-boot-arm/omap3 for final merge to U-Boot list again, we will get
you are right no general fix in the omap3 branch only omap fix.
Best Regards,
J.