GCC4.6: Convert various empty macros to inline functions
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Fixes problems similar to the following ones:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]
--- common/usb.c | 4 ++-- common/usb_storage.c | 2 +- include/common.h | 4 ++-- include/i2c.h | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-)
V2: Squash warning in usb_storage.c
common/usb.c +2 -2
@@ -63,7 +63,7 @@#ifdef USB_DEBUG #define USB_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_PRINTF(fmt, args...) +static inline void USB_PRINTF (const char *fmt, ...) {}#endif #define USB_BUFSIZ 512
@@ -970,7 +970,7 @@ void usb_scan_devices(void)#ifdef USB_HUB_DEBUG #define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_HUB_PRINTF(fmt, args...) +static inline void USB_HUB_PRINTF (const char *fmt, ...) {}#endif
common/usb_storage.c +1 -1
@@ -63,7 +63,7 @@#ifdef USB_STOR_DEBUG #define USB_STOR_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_STOR_PRINTF(fmt, args...) +static inline void USB_STOR_PRINTF (const char *fmt, ...) {}#endif #include <scsi.h>
include/common.h +2 -2
@@ -120,8 +120,8 @@ typedef volatile unsigned char vu_char; #define debug(fmt,args...) printf (fmt ,##args) #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);#else -#define debug(fmt,args...) -#define debugX(level,fmt,args...) +static inline void debug (const char *fmt, ...) {} +static inline void debugX (int level,const char *fmt, ...) {}#endif /* DEBUG */ #ifdef DEBUG
include/i2c.h +4 -1
@@ -55,7 +55,10 @@#else #define CONFIG_SYS_MAX_I2C_BUS 1#define I2C_GET_BUS () 0 -#define I2C_SET_BUS (a) +static inline int I2C_SET_BUS (unsigned int bus) +{ +return 0 ; +}#endif /* define the I2C bus number for RTC and DTT if not already done */
Signature · 1 line
1.7.5.4
PATCH RESEND 2/7 GCC4.6: Remove unused "port" variable in cmd_usb.c
--- common/cmd_usb.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
common/cmd_usb.c +1 -2
@@ -281,7 +281,7 @@ static inline char *portspeed(int speed)void usb_show_tree_graph (struct usb_device *dev,char *pre) {int i, index; -int has_child, last_child, port; +int has_child, last_child; index =strlen (pre);printf (" %s" , pre);
@@ -300,7 +300,6 @@ void usb_show_tree_graph(struct usb_device *dev, char *pre)/* found our pointer, see if we have a * little sister */ - port = i;while (i++ < dev->parent->maxchild) {if (dev->parent->children[i] !=NULL ) {/* found a sister */
Signature · 1 line
1.7.5.4
PATCH RESEND 2/7 GCC4.6: Remove unused "port" variable in cmd_usb.c
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110925/67bba7a0/attachment.pgp
PATCH 3/7 GCC4.6: Squash warning in cmd_flash.c
In reply to Marek Vasutcmd_flash.c: In function ?do_protect?:
cmd_flash.c:474:6: warning: variable ?p? set but not used [-Wunused-but-set-variable]
--- common/cmd_flash.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
common/cmd_flash.c +6 -4
@@ -455,6 +455,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)int do_protect (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { +int rcode =0 ;#ifndef CONFIG_SYS_NO_FLASH flash_info_t *info;ulong bank;
@@ -465,24 +466,25 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])u8 dev_type, dev_num, pnum;#endif #endif /* CONFIG_SYS_NO_FLASH */ -#if !defined(CONFIG_SYS_NO_FLASH ) || defined(CONFIG_HAS_DATAFLASH ) -ulong addr_first, addr_last; -#endif #ifdef CONFIG_HAS_DATAFLASH int status;#endif +#if !defined(CONFIG_SYS_NO_FLASH ) || defined(CONFIG_HAS_DATAFLASH )int p; -int rcode =0 ; +ulong addr_first, addr_last; +#endif if (argc <3 )return cmd_usage (cmdtp); +#if !defined(CONFIG_SYS_NO_FLASH ) || defined(CONFIG_HAS_DATAFLASH )if (strcmp (argv[1 ],"off" ) ==0 ) p =0 ;else if (strcmp (argv[1 ],"on" ) ==0 ) p =1 ;else return cmd_usage (cmdtp); +#endif #ifdef CONFIG_HAS_DATAFLASH if ((strcmp (argv[2 ],"all" ) !=0 ) && (strcmp (argv[2 ],"bank" ) !=0 )) {
Signature · 1 line
1.7.5.4
Wolfgang Denk
AppliedPATCH 3/7 GCC4.6: Squash warning in cmd_flash.c
Dear Marek Vasut,
Quoted 8 lines · In message <[email protected]> you wrote:
cmd_flash.c: In function `do_protect?:
cmd_flash.c:474:6: warning: variable `p? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>--- common/cmd_flash.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 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 "It's when they say 2 + 2 = 5 that I begin to argue." - Eric Pepke
PATCH 4/7 GCC4.6: Squash warning in cmd_nvedit.c
In reply to Marek Vasutcmd_nvedit.c: In function ?do_env_edit?:
cmd_nvedit.c:463:6: warning: variable ?len? set but not used [-Wunused-but-set-variable]
--- common/cmd_nvedit.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
common/cmd_nvedit.c +1 -2
@@ -460,7 +460,6 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {char buffer[CONFIG_SYS_CBSIZE ];char *init_val; -int len;if (argc <2 )return cmd_usage (cmdtp);
@@ -468,7 +467,7 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])/* Set read buffer to initial value or empty sting */ init_val =getenv (argv[1 ]);if (init_val) - len =sprintf (buffer,"%s" , init_val); +sprintf (buffer,"%s" , init_val);else buffer[0 ] ='\0' ;
Signature · 1 line
1.7.5.4
PATCH 4/7 GCC4.6: Squash warning in cmd_nvedit.c
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110925/76862dce/attachment.pgp
PATCH 4/7 GCC4.6: Squash warning in cmd_nvedit.c
In reply to Marek Vasut-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110925/eb80e1ba/attachment.pgp
PATCH 4/7 GCC4.6: Squash warning in cmd_nvedit.c
In reply to Marek VasutQuoted 5 lines · Marek Vasut
cmd_nvedit.c: In function ?do_env_edit?:
cmd_nvedit.c:463:6: warning: variable ?len? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>
I need this also!
Quoted 33 lines
---
?common/cmd_nvedit.c | ? ?3 +--
?1 files changed, 1 insertions(+), 2 deletions(-)common/cmd_nvedit.c +0
-1@@ -460,7 +460,6 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ?{ ? ? ? ?char buffer[CONFIG_SYS_CBSIZE]; ? ? ? ?char *init_val; - ? ? ? int len; ? ? ? ?if (argc < 2) ? ? ? ? ? ? ? ?return cmd_usage(cmdtp);@@ -468,7 +467,7 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])? ? ? ?/* Set read buffer to initial value or empty sting */ ? ? ? ?init_val =
getenv(argv[1]);
? ? ? ?if (init_val)
- ? ? ? ? ? ? ? len =sprintf(buffer, "%s", init_val);
+ ? ? ? ? ? ? ?sprintf(buffer, "%s", init_val);
? ? ? ?else
? ? ? ? ? ? ? ?buffer[0] = '\0';--
1.7.5.4_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Wolfgang Denk
AppliedPATCH 4/7 GCC4.6: Squash warning in cmd_nvedit.c
In reply to Marek VasutDear Marek Vasut,
Quoted 8 lines · In message <[email protected]> you wrote:
cmd_nvedit.c: In function `do_env_edit?:
cmd_nvedit.c:463:6: warning: variable `len? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>--- common/cmd_nvedit.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 9 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
I don't care if you *ARE* on a bondage-and-discipline post-technical
system pawned off by the nation's largest oughta-be-illegal monopoly
who cannot escape the sins of their forefathers -- namely, using the
wrong slash for directories when the C language and its brethren use
it for something else that's very important.
-- Tom Christiansen in <[email protected]>PATCH 5/7 GCC4.6: Squash warnings in lcd.c
In reply to Marek Vasutlcd.c: In function ?lcd_drawchars?:
lcd.c:214:9: warning: variable ?off? set but not used [-Wunused-but-set-variable]lcd.c: In function ?lcd_display_bitmap?:
lcd.c:617:16: warning: variable ?compression? set but not used [-Wunused-but-set-variable]
--- common/lcd.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
common/lcd.c +5 -4
@@ -211,10 +211,13 @@ void lcd_printf(const char *fmt, ...)static void lcd_drawchars (ushort x,ushort y,uchar *str,int count) {uchar *dest; -ushort off, row; +ushort row; + +#if LCD_BPP ==LCD_MONOCHROME +ushort off = x * (1 <<LCD_BPP ) %8 ; +#endif dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 <<LCD_BPP ) /8 ); - off = x * (1 <<LCD_BPP ) %8 ;for (row=0 ; row <VIDEO_FONT_HEIGHT ; ++row, dest += lcd_line_length) {uchar *s = str;
@@ -614,7 +617,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)unsigned long width, height, byte_width;unsigned long pwidth = panel_info.vl_col;unsigned colors, bpix, bmp_bpix; -unsigned long compression;#if definedCONFIG_PXA250 || definedCONFIG_PXA27X || definedCONFIG_CPU_MONAHANS struct pxafb_info *fbi = &panel_info.pxa;#elif defined(CONFIG_MPC823 )
@@ -632,7 +634,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) height =le32_to_cpu (bmp->header.height); bmp_bpix =le16_to_cpu (bmp->header.bit_count); colors =1 << bmp_bpix; - compression =le32_to_cpu (bmp->header.compression); bpix =NBITS (panel_info.vl_bpix);
Signature · 1 line
1.7.5.4
Wolfgang Denk
AppliedPATCH 5/7 GCC4.6: Squash warnings in lcd.c
Dear Marek Vasut,
Quoted 11 lines · In message <[email protected]> you wrote:
lcd.c: In function `lcd_drawchars?:
lcd.c:214:9: warning: variable `off? set but not used [-Wunused-but-set-variable]lcd.c: In function `lcd_display_bitmap?:
lcd.c:617:16: warning: variable `compression? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>--- common/lcd.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
Applied, 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 "If God had wanted us to use the metric system, Jesus would have had 10 apostles."
PATCH 6/7 GCC4.6: Squash warnings in ipu_disp.c
In reply to Marek Vasutipu_disp.c: In function ?ipu_disp_set_global_alpha?:
ipu_disp.c:1237:11: warning: variable ?flow? set but not used [-Wunused-but-set-variable]ipu_disp.c: In function ?ipu_disp_set_color_key?:
ipu_disp.c:1302:16: warning: variable ?flow? set but not used [-Wunused-but-set-variable]
--- drivers/video/ipu_disp.c | 87 ++++++++++++++++++++------------------------- drivers/video/ipu_regs.h | 18 +++++----- 2 files changed, 48 insertions(+), 57 deletions(-)
drivers/video/ipu_disp.c +39 -48
@@ -399,29 +399,29 @@ void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,const int (*coeff)[5 ][3 ];if (dp_csc_param.mode >=0 ) { - reg =__raw_readl (DP_COM_CONF (dp)); + reg =__raw_readl (DP_COM_CONF ()); reg &= ~DP_COM_CONF_CSC_DEF_MASK ; reg |= dp_csc_param.mode; -__raw_writel (reg,DP_COM_CONF (dp)); +__raw_writel (reg,DP_COM_CONF ()); } coeff = dp_csc_param.coeff;if (coeff) {__raw_writel (mask_a ((*coeff)[0 ][0 ]) | - (mask_a ((*coeff)[0 ][1 ]) <<16 ),DP_CSC_A_0 (dp)); + (mask_a ((*coeff)[0 ][1 ]) <<16 ),DP_CSC_A_0 ());__raw_writel (mask_a ((*coeff)[0 ][2 ]) | - (mask_a ((*coeff)[1 ][0 ]) <<16 ),DP_CSC_A_1 (dp)); + (mask_a ((*coeff)[1 ][0 ]) <<16 ),DP_CSC_A_1 ());__raw_writel (mask_a ((*coeff)[1 ][1 ]) | - (mask_a ((*coeff)[1 ][2 ]) <<16 ),DP_CSC_A_2 (dp)); + (mask_a ((*coeff)[1 ][2 ]) <<16 ),DP_CSC_A_2 ());__raw_writel (mask_a ((*coeff)[2 ][0 ]) | - (mask_a ((*coeff)[2 ][1 ]) <<16 ),DP_CSC_A_3 (dp)); + (mask_a ((*coeff)[2 ][1 ]) <<16 ),DP_CSC_A_3 ());__raw_writel (mask_a ((*coeff)[2 ][2 ]) | (mask_b ((*coeff)[3 ][0 ]) <<16 ) | - ((*coeff)[4 ][0 ] <<30 ),DP_CSC_0 (dp)); + ((*coeff)[4 ][0 ] <<30 ),DP_CSC_0 ());__raw_writel (mask_b ((*coeff)[3 ][1 ]) | ((*coeff)[4 ][1 ] <<14 ) | (mask_b ((*coeff)[3 ][2 ]) <<16 ) | - ((*coeff)[4 ][2 ] <<30 ),DP_CSC_1 (dp)); + ((*coeff)[4 ][2 ] <<30 ),DP_CSC_1 ()); }if (srm_mode_update) {
@@ -481,7 +481,7 @@ int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt, }/* Transform color key from rgb to yuv if CSC is enabled */ - reg =__raw_readl (DP_COM_CONF (dp)); + reg =__raw_readl (DP_COM_CONF ()); if (color_key_4rgb && (reg & DP_COM_CONF_GWCKE) && (((fg_csc_type == RGB2YUV) && (bg_csc_type == YUV2YUV)) || ((fg_csc_type == YUV2YUV) && (bg_csc_type == RGB2YUV)) ||
@@ -489,7 +489,7 @@ int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt, ((fg_csc_type == YUV2RGB) && (bg_csc_type == YUV2RGB)))) {int red, green, blue;int y, u, v; -uint32_t color_key =__raw_readl (DP_GRAPH_WIND_CTRL (dp)) & +uint32_t color_key =__raw_readl (DP_GRAPH_WIND_CTRL ()) &0xFFFFFFL ; debug("_ipu_dp_init color key 0x%x need change to yuv fmt!\n",
@@ -504,8 +504,8 @@ int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt, v =rgb_to_yuv (2 , red, green, blue); color_key = (y <<16 ) | (u <<8 ) | v; - reg =__raw_readl (DP_GRAPH_WIND_CTRL (dp)) &0xFF000000L ; -__raw_writel (reg | color_key,DP_GRAPH_WIND_CTRL (dp)); + reg =__raw_readl (DP_GRAPH_WIND_CTRL ()) &0xFF000000L ; +__raw_writel (reg | color_key,DP_GRAPH_WIND_CTRL ()); color_key_4rgb =0 ; debug("_ipu_dp_init color key change to yuv fmt 0x%x!\n",
@@ -648,8 +648,8 @@ void ipu_dp_dc_enable(ipu_channel_t channel)if (channel ==MEM_FG_SYNC ) {/* Enable FG channel */ - reg =__raw_readl (DP_COM_CONF (DP_SYNC )); -__raw_writel (reg |DP_COM_CONF_FG_EN ,DP_COM_CONF (DP_SYNC )); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg |DP_COM_CONF_FG_EN ,DP_COM_CONF ()); reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;__raw_writel (reg,IPU_SRM_PRI2 );
@@ -692,13 +692,13 @@ void ipu_dp_dc_disable(ipu_channel_t channel, unsigned char swap)/* Disable FG channel */ dc_chan =5 ; - reg =__raw_readl (DP_COM_CONF (DP_SYNC )); + reg =__raw_readl (DP_COM_CONF ()); csc = reg &DP_COM_CONF_CSC_DEF_MASK ;if (csc ==DP_COM_CONF_CSC_DEF_FG ) reg &= ~DP_COM_CONF_CSC_DEF_MASK ; reg &= ~DP_COM_CONF_FG_EN ; -__raw_writel (reg,DP_COM_CONF (DP_SYNC )); +__raw_writel (reg,DP_COM_CONF ()); reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;__raw_writel (reg,IPU_SRM_PRI2 );
@@ -1234,17 +1234,12 @@ int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable, uint8_t alpha) {uint32_t reg; -uint32_t flow;unsigned char bg_chan; -if (channel ==MEM_BG_SYNC || channel ==MEM_FG_SYNC ) - flow =DP_SYNC ; -else if (channel ==MEM_BG_ASYNC0 || channel ==MEM_FG_ASYNC0 ) - flow =DP_ASYNC0 ; -else if (channel ==MEM_BG_ASYNC1 || channel ==MEM_FG_ASYNC1 ) - flow =DP_ASYNC1 ; -else +if (!((channel ==MEM_BG_SYNC || channel ==MEM_FG_SYNC ) || + (channel ==MEM_BG_ASYNC0 || channel ==MEM_FG_ASYNC0 ) || + (channel ==MEM_BG_ASYNC1 || channel ==MEM_FG_ASYNC1 )))return -EINVAL ; if (channel == MEM_BG_SYNC || channel == MEM_BG_ASYNC0 ||
@@ -1257,23 +1252,23 @@ int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable,clk_enable (g_ipu_clk);if (bg_chan) { - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg & ~DP_COM_CONF_GWSEL ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg & ~DP_COM_CONF_GWSEL ,DP_COM_CONF ()); }else { - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg |DP_COM_CONF_GWSEL ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg |DP_COM_CONF_GWSEL ,DP_COM_CONF ()); }if (enable) { - reg =__raw_readl (DP_GRAPH_WIND_CTRL (flow)) &0x00FFFFFFL ; + reg =__raw_readl (DP_GRAPH_WIND_CTRL ()) &0x00FFFFFFL ;__raw_writel (reg | ((uint32_t ) alpha <<24 ), -DP_GRAPH_WIND_CTRL (flow)); +DP_GRAPH_WIND_CTRL ()); - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg |DP_COM_CONF_GWAM ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg |DP_COM_CONF_GWAM ,DP_COM_CONF ()); }else { - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg & ~DP_COM_CONF_GWAM ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg & ~DP_COM_CONF_GWAM ,DP_COM_CONF ()); } reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;
@@ -1299,17 +1294,13 @@ int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable,int32_t ipu_disp_set_color_key (ipu_channel_t channel,unsigned char enable,uint32_t color_key) { -uint32_t reg, flow; +uint32_t reg;int y, u, v;int red, green, blue; -if (channel ==MEM_BG_SYNC || channel ==MEM_FG_SYNC ) - flow =DP_SYNC ; -else if (channel ==MEM_BG_ASYNC0 || channel ==MEM_FG_ASYNC0 ) - flow =DP_ASYNC0 ; -else if (channel ==MEM_BG_ASYNC1 || channel ==MEM_FG_ASYNC1 ) - flow =DP_ASYNC1 ; -else +if (!((channel ==MEM_BG_SYNC || channel ==MEM_FG_SYNC ) || + (channel ==MEM_BG_ASYNC0 || channel ==MEM_FG_ASYNC0 ) || + (channel ==MEM_BG_ASYNC1 || channel ==MEM_FG_ASYNC1 )))return -EINVAL ;if (!g_ipu_clk_enabled)
@@ -1339,14 +1330,14 @@ int32_t ipu_disp_set_color_key(ipu_channel_t channel, unsigned char enable, }if (enable) { - reg =__raw_readl (DP_GRAPH_WIND_CTRL (flow)) &0xFF000000L ; -__raw_writel (reg | color_key,DP_GRAPH_WIND_CTRL (flow)); + reg =__raw_readl (DP_GRAPH_WIND_CTRL ()) &0xFF000000L ; +__raw_writel (reg | color_key,DP_GRAPH_WIND_CTRL ()); - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg |DP_COM_CONF_GWCKE ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg |DP_COM_CONF_GWCKE ,DP_COM_CONF ()); }else { - reg =__raw_readl (DP_COM_CONF (flow)); -__raw_writel (reg & ~DP_COM_CONF_GWCKE ,DP_COM_CONF (flow)); + reg =__raw_readl (DP_COM_CONF ()); +__raw_writel (reg & ~DP_COM_CONF_GWCKE ,DP_COM_CONF ()); } reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;
drivers/video/ipu_regs.h +9 -9
@@ -402,15 +402,15 @@ static inline struct ipu_dc_ch *dc_ch_offset(int ch)#define DP_REG ((struct ipu_dp *)(IPU_CTRL_BASE_ADDR + \ IPU_DP_REG_BASE)) -#define DP_COM_CONF (flow) (&DP_REG->com_conf_sync) -#define DP_GRAPH_WIND_CTRL (flow) (&DP_REG->graph_wind_ctrl_sync) -#define DP_CSC_A_0 (flow) (&DP_REG->csca_sync[0]) -#define DP_CSC_A_1 (flow) (&DP_REG->csca_sync[1]) -#define DP_CSC_A_2 (flow) (&DP_REG->csca_sync[2]) -#define DP_CSC_A_3 (flow) (&DP_REG->csca_sync[3]) - -#define DP_CSC_0 (flow) (&DP_REG->csc_sync[0]) -#define DP_CSC_1 (flow) (&DP_REG->csc_sync[1]) +#define DP_COM_CONF () (&DP_REG->com_conf_sync) +#define DP_GRAPH_WIND_CTRL () (&DP_REG->graph_wind_ctrl_sync) +#define DP_CSC_A_0 () (&DP_REG->csca_sync[0]) +#define DP_CSC_A_1 () (&DP_REG->csca_sync[1]) +#define DP_CSC_A_2 () (&DP_REG->csca_sync[2]) +#define DP_CSC_A_3 () (&DP_REG->csca_sync[3]) + +#define DP_CSC_0 () (&DP_REG->csc_sync[0]) +#define DP_CSC_1 () (&DP_REG->csc_sync[1])/* DC template opcodes */ #define WROD (lf) (0x18 | (lf << 1))
Signature · 1 line
1.7.5.4
Wolfgang Denk
AppliedPATCH 6/7 GCC4.6: Squash warnings in ipu_disp.c
Dear Marek Vasut,
Quoted 7 lines · In message <[email protected]> you wrote:
ipu_disp.c: In function `ipu_disp_set_global_alpha?:
ipu_disp.c:1237:11: warning: variable `flow? set but not used [-Wunused-but-set-variable]ipu_disp.c: In function `ipu_disp_set_color_key?:
ipu_disp.c:1302:16: warning: variable `flow? set but not used [-Wunused-but-set-variable]
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- drivers/video/ipu_disp.c | 87 ++++++++++++++++++++------------------------- drivers/video/ipu_regs.h | 18 +++++----- 2 files changed, 48 insertions(+), 57 deletions(-)
Applied, 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 Conquest is easy. Control is not. -- Kirk, "Mirror, Mirror", stardate unknown
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
In reply to Marek Vasutcmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]
The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
--- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
common/cmd_mem.c +4 -4
@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])int do_mem_loop (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -ulong addr, length, i, junk; +ulong addr, length, i;int size;volatile uint *longp;volatile ushort *shortp;
@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; i = length;while (i-- >0 ) - junk = *longp++; + *longp++; } }if (size ==2 ) {
@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; i = length;while (i-- >0 ) - junk = *shortp++; + *shortp++; } }for (;;) { cp = (u_char *)addr; i = length;while (i-- >0 ) - junk = *cp++; + *cp++; } }
Signature · 1 line
1.7.5.4
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 6 lines · On Sunday, September 25, 2011 20:26:06 Marek Vasut wrote:
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
i think the stores to a var were added to avoid a gcc warning, but if newer versions don't warn anymore, should be fine.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110925/a1e9facd/attachment.pgp
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Dear Mike Frysinger,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines
The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
i think the stores to a var were added to avoid a gcc warning, but if newer versions don't warn anymore, should be fine.
Obviously we have to check if older tools still accept this.
Marek, which tool chains did you use for testing?
Best regards,
Wolfgang Denk
Signature · 7 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
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is a nanocentury.
-- Tom Duff, Bell LabsPATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 11 lines · Wolfgang Denk
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines
The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
i think the stores to a var were added to avoid a gcc warning, but if newer versions don't warn anymore, should be fine.
Obviously we have to check if older tools still accept this.
Hi,
as I was never completely sure about this file from the begining, I'm all for it.
Btw. who's supposed to merge the rest of the series anyway ?
Quoted 2 lines
Marek, which tool chains did you use for testing?
Hand-built gcc4.6.0+debian patches and gcc4.4.6+debian patches:
arm-linux-gnueabi-gcc-4.4 (Debian 4.4.6-7) 4.4.6 arm-linux-gnueabi-gcc-4.6 (Debian 4.6.0-14) 4.6.1 20110616 (prerelease)
There was someone on the irc who (unsuccessfully) tried to compile uboot with gcc 2.xx recently. Maybe we should impose some lower bound for compiler version, though I guess 4.4 is too high. Suggestions ?
Cheers
Quoted 4 lines
Best regards,
Wolfgang Denk
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 19 lines · On Monday, September 26, 2011 05:03:46 Marek Vasut wrote:
Quoted 8 lines · Wolfgang Denk
Quoted 5 lines · Mike Frysinger
Quoted 2 lines
The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
i think the stores to a var were added to avoid a gcc warning, but if newer versions don't warn anymore, should be fine.
Obviously we have to check if older tools still accept this.
Hi,
as I was never completely sure about this file from the begining, I'm all for it.
Btw. who's supposed to merge the rest of the series anyway ?
Quoted 1 line
Marek, which tool chains did you use for testing?
Quoted 8 lines
Hand-built gcc4.6.0+debian patches and gcc4.4.6+debian patches:
arm-linux-gnueabi-gcc-4.4 (Debian 4.4.6-7) 4.4.6 arm-linux-gnueabi-gcc-4.6 (Debian 4.6.0-14) 4.6.1 20110616 (prerelease)
There was someone on the irc who (unsuccessfully) tried to compile uboot with gcc 2.xx recently. Maybe we should impose some lower bound for compiler version, though I guess 4.4 is too high. Suggestions ?
i think gcc-3.x has been broken for a while but no one has noticed
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110926/9b986100/attachment.pgp
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 22 lines · Mike Frysinger
Quoted 21 lines · On Monday, September 26, 2011 05:03:46 Marek Vasut wrote:
Quoted 8 lines · Wolfgang Denk
Quoted 5 lines · Mike Frysinger
Quoted 2 lines
The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
i think the stores to a var were added to avoid a gcc warning, but if newer versions don't warn anymore, should be fine.
Obviously we have to check if older tools still accept this.
Hi,
as I was never completely sure about this file from the begining, I'm all for it.
Btw. who's supposed to merge the rest of the series anyway ?
Quoted 1 line
Marek, which tool chains did you use for testing?
Hand-built gcc4.6.0+debian patches and gcc4.4.6+debian patches:
Quoted 8 lines
Quoted 6 lines
arm-linux-gnueabi-gcc-4.4 (Debian 4.4.6-7) 4.4.6 arm-linux-gnueabi-gcc-4.6 (Debian 4.6.0-14) 4.6.1 20110616 (prerelease)
There was someone on the irc who (unsuccessfully) tried to compile uboot with gcc 2.xx recently. Maybe we should impose some lower bound for compiler version, though I guess 4.4 is too high. Suggestions ?
i think gcc-3.x has been broken for a while but no one has noticed
I guess we should go the kernel way -- make it 4.2 and be done with it.
Quoted 1 line
-mike
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Dear Marek Vasut,
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines
i think gcc-3.x has been broken for a while but no one has noticed
I guess we should go the kernel way -- make it 4.2 and be done with it.
You are off by one major version. The kernel README says:
Make sure you have at least gcc 3.2 available.
Note that this will NOT build any half-way recent U-Boot version.
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
I'm a programmer: I don't buy software, I write it.
-- Tom ChristiansenPATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 5 lines · Wolfgang Denk
Dear Marek Vasut,
Quoted 2 lines · In message <[email protected]> you wrote:
Quoted 1 line
i think gcc-3.x has been broken for a while but no one has noticed
Quoted 7 lines
Quoted 1 line
I guess we should go the kernel way -- make it 4.2 and be done with it.
You are off by one major version. The kernel README says:
Make sure you have at least gcc 3.2 available.
Note that this will NOT build any half-way recent U-Boot version.
It might have been my imagination then ... but 4.2 sounded quite logical to me, sorry for confusion.
Anyway, is there still anyone using 3.x ? If there isn't any such users, we should simply discard it, add gcc version check and set the lower bound to some not-too-buggy version of gcc4.
Best regards,
Marek Vasut
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Dear Marek Vasut,
Quoted 4 lines · In message <[email protected]> you wrote:
Anyway, is there still anyone using 3.x ? If there isn't any such users, we should simply discard it, add gcc version check and set the lower bound to some not-too-buggy version of gcc4.
To be honest: yes, there are users. We recently had customers where we had to dig out ELDK 2.1.0 (gcc 2.95) to build thir code.
But obviously these don't use any recent code either.
Best regards,
Wolfgang Denk
Signature · 4 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 Save yourself! Reboot in 5 seconds!
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
In reply to Marek VasutQuoted 9 lines · On Monday, September 26, 2011 14:29:24 Marek Vasut wrote:
Quoted 8 lines · Wolfgang Denk
Quoted 3 lines · Marek Vasut
Quoted 1 line
i think gcc-3.x has been broken for a while but no one has noticed
I guess we should go the kernel way -- make it 4.2 and be done with it.
You are off by one major version. The kernel README says:
Make sure you have at least gcc 3.2 available.
Quoted 8 lines
Quoted 1 line
Note that this will NOT build any half-way recent U-Boot version.
It might have been my imagination then ... but 4.2 sounded quite logical to me, sorry for confusion.
Anyway, is there still anyone using 3.x ? If there isn't any such users, we should simply discard it, add gcc version check and set the lower bound to some not-too-buggy version of gcc4.
we had someone post a fix for using gcc-3.x in current master
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110926/0d5b6468/attachment.pgp
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
In reply to Marek VasutHi Marek,
Quoted 40 lines · Marek Vasut
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>---
?common/cmd_mem.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +3
-3@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ?int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ?{ - ? ? ? ulong ? addr, length, i, junk; + ? ? ? ulong ? addr, length, i; ? ? ? ?int ? ? size; ? ? ? ?volatile uint ? *longp; ? ? ? ?volatile ushort *shortp;@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ? ? ? ? ? ? ? ? ? ? ? ?longp = (uint *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *longp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *longp++; ? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?if (size == 2) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ? ? ? ? ? ? ? ? ? ? ? ?shortp = (ushort *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *shortp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *shortp++;
common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?for (;;) { ? ? ? ? ? ? ? ?cp = (u_char *)addr; ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? junk = *cp++; + ? ? ? ? ? ? ? ? ? ? ? *cp++; ? ? ? ?} ?}
I checked the ARM assembler output and it looks fine.
Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
Regards,
Simon
Quoted 9 lines
common/cmd_mem.c +0
-1--1.7.5.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 57 lines · Simon Glass
Hi Marek,
Quoted 41 lines · Marek Vasut
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>--- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +1
-1@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])int do_mem_loop (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -ulong addr, length, i, junk; +ulong addr, length, i;int size;volatile uint *longp;volatile ushort *shortp;common/cmd_mem.c +2
-2@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; i = length;while (i-- >0 ) - junk = *longp++; + *longp++; } }if (size ==2 ) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; i = length;while (i-- >0 ) - junk = *shortp++; + *shortp++;common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1} }for (;;) { cp = (u_char *)addr; i = length;while (i-- >0 ) - junk = *cp++; + *cp++; } }I checked the ARM assembler output and it looks fine.
Quoted 4 lines
Acked-by Simon Glass <[email protected]>Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
The loop below depends on that ... ?
Quoted 11 lines
Regards,
SimonQuoted 7 lines
common/cmd_mem.c +0
-1--1.7.5.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Hi Merek,
Quoted 58 lines · Marek Vasut
Quoted 57 lines · Simon Glass
Hi Marek,
Quoted 41 lines · Marek Vasut
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>---
?common/cmd_mem.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +0
-0@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])?int
do_mem_loop(cmd_tbl_t*cmdtp, int flag, int argc, char * const argv[]) {
- ? ? ? ulong ? addr, length, i, junk;
+ ? ? ? ulong ? addr, length, i;
? ? ? ?int ? ? size;
? ? ? ?volatile uint ? *longp;
? ? ? ?volatile ushort *shortp;common/cmd_mem.c +2
-2@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *longp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *longp++; ? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?if (size == 2) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *shortp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *shortp++;common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?for (;;) { ? ? ? ? ? ? ? ?cp = (u_char *)addr; ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? junk = *cp++; + ? ? ? ? ? ? ? ? ? ? ? *cp++; ? ? ? ?} ?}I checked the ARM assembler output and it looks fine.
Quoted 6 lines
Quoted 4 lines
Acked-by Simon Glass <[email protected]>Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
The loop below depends on that ... ?
Which loop? It doesn't look like the value of i is used?
Regards,
Simon
Quoted 13 lines
Quoted 12 lines
Regards,
SimonQuoted 7 lines
common/cmd_mem.c +0
-1--1.7.5.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 61 lines · Simon Glass
Hi Merek,
Quoted 58 lines · Marek Vasut
Quoted 57 lines · Simon Glass
Hi Marek,
Quoted 41 lines · Marek Vasut
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>--- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +1
-1@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])int do_mem_loop (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -ulong addr, length, i, junk; +ulong addr, length, i;int size;volatile uint *longp;volatile ushort *shortp;common/cmd_mem.c +2
-2@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; i = length;while (i-- >0 ) - junk = *longp++; + *longp++; } }if (size ==2 ) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; i = length;while (i-- >0 ) - junk = *shortp++; + *shortp++;common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1} }for (;;) { cp = (u_char *)addr; i = length;while (i-- >0 ) - junk = *cp++; + *cp++; } }I checked the ARM assembler output and it looks fine.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Acked-by Simon Glass <[email protected]>Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
The loop below depends on that ... ?
Which loop? It doesn't look like the value of i is used?
i = length;
while (i-- > 0)
This loop
Quoted 14 lines
Regards,
SimonQuoted 10 lines
Quoted 10 lines
Regards,
SimonQuoted 7 lines
common/cmd_mem.c +0
-1--1.7.5.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Hi Marek,
Quoted 67 lines · Marek Vasut
Quoted 66 lines · Simon Glass
Hi Merek,
Quoted 63 lines · Marek Vasut
Quoted 61 lines · Simon Glass
Hi Marek,
Quoted 41 lines · Marek Vasut
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>---
?common/cmd_mem.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +0
-0@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])?int
do_mem_loop(cmd_tbl_t*cmdtp, int flag, int argc, char * const argv[]) {
- ? ? ? ulong ? addr, length, i, junk;
+ ? ? ? ulong ? addr, length, i;
? ? ? ?int ? ? size;
? ? ? ?volatile uint ? *longp;
? ? ? ?volatile ushort *shortp;common/cmd_mem.c +2
-2@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *longp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *longp++; ? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?if (size == 2) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; ? ? ? ? ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? junk = *shortp++; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *shortp++;common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1? ? ? ? ? ? ? ?} ? ? ? ?} ? ? ? ?for (;;) { ? ? ? ? ? ? ? ?cp = (u_char *)addr; ? ? ? ? ? ? ? ?i = length; ? ? ? ? ? ? ? ?while (i-- > 0) - ? ? ? ? ? ? ? ? ? ? ? junk = *cp++; + ? ? ? ? ? ? ? ? ? ? ? *cp++; ? ? ? ?} ?}I checked the ARM assembler output and it looks fine.
Acked-by Simon Glass <[email protected]>Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
The loop below depends on that ... ?
Which loop? It doesn't look like the value of i is used?
i = length;
while (i-- > 0)This loop
The assignment to i I was referring to is here:
if (length == 1) {
if (size == 4) {
longp = (uint *)addr;
for (;;)
i = *longp;
^^^ this line
}
if (size == 2) {
shortp = (ushort *)addr;
for (;;)
i = *shortp;
^^^ this line
}
cp = (u_char *)addr;
for (;;)
i = *cp;
^^^ this line
}I was wondering if we need to assign to i? The output code appears unchanged with my compiler if the 'i =' is removed.
Regards,
Simon
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Quoted 7 lines · Simon Glass
Hi Marek,
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Simon Glass
Hi Merek,
On Mon, Sep 26, 2011 at 11:24 AM, Marek Vasut <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines · Simon Glass
Quoted 3 lines
Hi Marek,
On Sun, Sep 25, 2011 at 5:26 PM, Marek Vasut <[email protected]>
Quoted 92 lines · wrote:
Quoted 59 lines
Quoted 59 lines
Quoted 59 lines
Quoted 58 lines
Quoted 41 lines
cmd_mem.c: In function ?do_mem_loop?:
cmd_mem.c:474:25: warning: variable ?junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>--- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)common/cmd_mem.c +1
-1@@ -471,7 +471,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - ulong addr, length, i, junk; + ulong addr, length, i;int size;volatile uint *longp;volatile ushort *shortp;common/cmd_mem.c +2
-2@@ -518,7 +518,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) longp = (uint *)addr; i = length;while (i-- >0 ) - junk = *longp++; + *longp++; } }if (size ==2 ) {@@ -526,14 +526,14 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) shortp = (ushort *)addr; i = length;while (i-- >0 ) - junk = *shortp++; + *shortp++;common/cmd_mem.c int do_mem_loop (cmd_tbl_t *cmdtp, int flag, · line 538
Quoted 10 lines
common/cmd_mem.c +1
-1} }for (;;) { cp = (u_char *)addr; i = length;while (i-- >0 ) - junk = *cp++; + *cp++; } }I checked the ARM assembler output and it looks fine.
Acked-by Simon Glass <[email protected]>Re the 'length == 1' case (above your patch) site, it is assigning to 'i' here. Could/should we remove that assignment also?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
The loop below depends on that ... ?
Which loop? It doesn't look like the value of i is used?
i = length;
while (i-- > 0)This loop
The assignment to i I was referring to is here:
if (length == 1) { if (size == 4) { longp = (uint *)addr; for (;;) i = *longp; ^^^ this line } if (size == 2) { shortp = (ushort *)addr; for (;;) i = *shortp; ^^^ this line } cp = (u_char *)addr; for (;;) i = *cp; ^^^ this line }
Quoted 2 lines
I was wondering if we need to assign to i? The output code appears unchanged with my compiler if the 'i =' is removed.
Oh, right ... this can be removed. That code seems quite legacy and in a urgent need of cleanup. Shall we wrap this change into this patch or do a subsequent one ?
Cheers
Quoted 3 lines
Regards,
Simon
PATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
Hi Marek,
Quoted 26 lines · Marek Vasut
Quoted 25 lines · Simon Glass
Hi Marek,
The assignment to i I was referring to is here:
? ? ? if (length == 1) {
? ? ? ? ? ? ? if (size == 4) {
? ? ? ? ? ? ? ? ? ? ? longp = (uint *)addr;
? ? ? ? ? ? ? ? ? ? ? for (;;)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? i = *longp;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^^^ this line? ? ? ? ? ? ? }
? ? ? ? ? ? ? if (size == 2) {
? ? ? ? ? ? ? ? ? ? ? shortp = (ushort *)addr;
? ? ? ? ? ? ? ? ? ? ? for (;;)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? i = *shortp;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^^^ this line? ? ? ? ? ? ? }
? ? ? ? ? ? ? cp = (u_char*)addr;
? ? ? ? ? ? ? for (;;)
? ? ? ? ? ? ? ? ? ? ? i = *cp;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^^^ this line
Quoted 8 lines
Quoted 4 lines
? ? ? }
I was wondering if we need to assign to i? The output code appears unchanged with my compiler if the 'i =' is removed.
Oh, right ... this can be removed. That code seems quite legacy and in a urgent need of cleanup. Shall we wrap this change into this patch or do a subsequent one ?
I'm sure you know better than me, but it feels like a separate commit if only because your commit msg is about GCC 4.6 warnings.
Regards,
Simon
Quoted 2 lines
Cheers
Wolfgang Denk
AppliedPATCH 7/7 GCC4.6: Squash warning in cmd_mem.c
In reply to Marek VasutDear Marek Vasut,
Quoted 11 lines · In message <[email protected]> you wrote:
cmd_mem.c: In function `do_mem_loop?:
cmd_mem.c:474:25: warning: variable `junk? set but not used [-Wunused-but-set-variable]The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated.
Signed-off-by Marek Vasut <[email protected]>--- common/cmd_mem.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
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 "... freedom ... is a worship word..." "It is our worship word too." -- Cloud William and Kirk, "The Omega Glory", stardate unknown
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Marek VasutQuoted 5 lines · Marek Vasut
Fixes problems similar to the following ones:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]
Your commit log does not match your patch.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 8 lines · Fabio Estevam
Quoted 5 lines · Marek Vasut
Fixes problems similar to the following ones:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]Your commit log does not match your patch.
"Fixes problems similar to the following ones" ... why not ?
Cheers
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Marek Vasut,
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Your commit log does not match your patch.
"Fixes problems similar to the following ones" ... why not ?
Please show _exactly_ which problems the patch fixes.
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 Always borrow money from a pessimist; they don't expect to be paid back.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Marek Vasut-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110925/030fba51/attachment.pgp
PATCH v3 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Marek VasutFix the following gcc4.6 problems:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]asix.c: In function ?asix_init?:
asix.c:317:6: warning: variable ?rx_ctl? set but not used [-Wunused-but-set-variable]usb.c: In function ?usb_parse_config?:
usb.c:331:17: warning: variable ?ch? set but not used [-Wunused-but-set-variable]usb.c: In function ?usb_hub_port_connect_change?:
usb.c:1123:29: warning: variable ?portchange? set but not used [-Wunused-but-set-variable]usb.c: In function ?usb_hub_configure?:
usb.c:1183:25: warning: variable ?hubsts? set but not used [-Wunused-but-set-variable]usb_storage.c: In function ?usb_stor_CB_reset?:
usb_storage.c:466:6: warning: variable ?result? set but not used [-Wunused-but-set-variable]
--- common/usb.c | 4 ++-- common/usb_storage.c | 2 +- include/common.h | 4 ++-- include/i2c.h | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-)
V2: Squash warning in usb_storage.c
V3: update diff description
common/usb.c +2 -2
@@ -63,7 +63,7 @@#ifdef USB_DEBUG #define USB_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_PRINTF(fmt, args...) +static inline void USB_PRINTF (const char *fmt, ...) {}#endif #define USB_BUFSIZ 512
@@ -970,7 +970,7 @@ void usb_scan_devices(void)#ifdef USB_HUB_DEBUG #define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_HUB_PRINTF(fmt, args...) +static inline void USB_HUB_PRINTF (const char *fmt, ...) {}#endif
common/usb_storage.c +1 -1
@@ -63,7 +63,7 @@#ifdef USB_STOR_DEBUG #define USB_STOR_PRINTF(fmt, args...) printf(fmt , ##args)#else -#define USB_STOR_PRINTF(fmt, args...) +static inline void USB_STOR_PRINTF (const char *fmt, ...) {}#endif #include <scsi.h>
include/common.h +2 -2
@@ -120,8 +120,8 @@ typedef volatile unsigned char vu_char; #define debug(fmt,args...) printf (fmt ,##args) #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);#else -#define debug(fmt,args...) -#define debugX(level,fmt,args...) +static inline void debug (const char *fmt, ...) {} +static inline void debugX (int level,const char *fmt, ...) {}#endif /* DEBUG */ #ifdef DEBUG
include/i2c.h +4 -1
@@ -55,7 +55,10 @@#else #define CONFIG_SYS_MAX_I2C_BUS 1#define I2C_GET_BUS () 0 -#define I2C_SET_BUS (a) +static inline int I2C_SET_BUS (unsigned int bus) +{ +return 0 ; +}#endif /* define the I2C bus number for RTC and DTT if not already done */
Signature · 1 line
1.7.5.4
Wolfgang Denk
AppliedPATCH v3 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Marek Vasut,
Quoted 21 lines · In message <[email protected]> you wrote:
Fix the following gcc4.6 problems:
cmd_date.c: In function `do_date?:
cmd_date.c:50:6: warning: variable `old_bus? set but not used [-Wunused-but-set-variable]asix.c: In function `asix_init?:
asix.c:317:6: warning: variable `rx_ctl? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_parse_config?:
usb.c:331:17: warning: variable `ch? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_hub_port_connect_change?:
usb.c:1123:29: warning: variable `portchange? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_hub_configure?:
usb.c:1183:25: warning: variable `hubsts? set but not used [-Wunused-but-set-variable]usb_storage.c: In function `usb_stor_CB_reset?:
usb_storage.c:466:6: warning: variable `result? set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Signed-off-by Marek Vasut <[email protected]>--- common/usb.c | 4 ++-- common/usb_storage.c | 2 +- include/common.h | 4 ++-- include/i2c.h | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-)
Applied, 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 Life would be so much easier if we could just look at the source code. -- Dave Olson
PATCH v3 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Marik,
Quoted 21 lines · In message <[email protected]> you wrote:
Fix the following gcc4.6 problems:
cmd_date.c: In function `do_date?:
cmd_date.c:50:6: warning: variable `old_bus? set but not used [-Wunused-but-set-variable]asix.c: In function `asix_init?:
asix.c:317:6: warning: variable `rx_ctl? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_parse_config?:
usb.c:331:17: warning: variable `ch? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_hub_port_connect_change?:
usb.c:1123:29: warning: variable `portchange? set but not used [-Wunused-but-set-variable]usb.c: In function `usb_hub_configure?:
usb.c:1183:25: warning: variable `hubsts? set but not used [-Wunused-but-set-variable]usb_storage.c: In function `usb_stor_CB_reset?:
usb_storage.c:466:6: warning: variable `result? set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Signed-off-by Marek Vasut <[email protected]>--- common/usb.c | 4 ++-- common/usb_storage.c | 2 +- include/common.h | 4 ++-- include/i2c.h | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-)
Unforstunately this patch breaks a number of boards.
Did you by chance forget to run MAKEALL on it? :-(
Example:
./MAKEALL TQM823L
Configuring for TQM823L board...tqm8xx_pcmcia.c: In function 'pcmcia_voltage_set':
tqm8xx_pcmcia.c:265: error: 'pcmp' undeclared (first use in this function) tqm8xx_pcmcia.c:265: error: (Each undeclared identifier is reported only once tqm8xx_pcmcia.c:265: error: for each function it appears in.) make[1]: *** [/work/wd/tmp-ppc/drivers/pcmcia/tqm8xx_pcmcia.o] Error 1
make: *** [/work/wd/tmp-ppc/drivers/pcmcia/libpcmcia.o] Error 2
make: *** Waiting for unfinished jobs....
ppc_6xx-size: '/work/wd/tmp-ppc/u-boot': No such file
...60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac is the first bad commit commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac
Author: Marek Vasut <[email protected]> Date: Mon Sep 26 19:36:19 2011 +0200
GCC4.6: Convert various empty macros to inline functions
Please fix.
Thanks.
Best regards,
Wolfgang Denk
Signature · 7 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 word "fit", as I understand it, means "appropriate to a purpose",
and I would say the body of the Dean is supremely appropriate to the
purpose of sitting around all day and eating big heavy meals.
- Terry Pratchett, _Moving Pictures_PATCH v3 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 2 lines · Wolfgang Denk
Dear Marek,
[...]
Quoted 2 lines
Please fix.
Hi Wolfgang,
I have to admit I didn't test ppc boards. But by looking at the TQM pcmcia driver, the problem is in the driver itself. That's where I suspect it should be fixed.
Can you share the list of broken boards you detected please ?
Thanks!
Cheers
PATCH v3 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 7 lines · Marek Vasut
Quoted 1 line · Wolfgang Denk
Dear Marek,
[...]
Quoted 1 line
Please fix.
Quoted 7 lines
Hi Wolfgang,
I have to admit I didn't test ppc boards. But by looking at the TQM pcmcia driver, the problem is in the driver itself. That's where I suspect it should be fixed.
Can you share the list of broken boards you detected please ?
Hi,
I'm running the compile tests for powerpc arch right now and I noticed many problems of this form:
Configuring for PCIPPC2 board...interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:38: warning: implicit declaration of function 'GTREGREAD' interrupts.c:38: error: 'LOW_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:38: error: (Each undeclared identifier is reported only once interrupts.c:38: error: for each function it appears in.) interrupts.c:39: error: 'HIGH_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:41: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:42: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:43: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first use in this function)
interrupts.c:45: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:46: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
interrupts.c:47: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first use in this function)
make[1]: *** [interrupts.o] Error 1
make: *** [arch/powerpc/cpu/74xx_7xx/lib74xx_7xx.o] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-size: './u-boot': No such file
This seems like noone actually tested compiling those boards with DEBUG enabled ... ever. Anyway, there seems to be an easy fix, add the following into the config file:
#ifndef __ASSEMBLY__
#include <galileo/core.h>
#endif
There is a catch I don't quite understand though, that is, some boards include board/Marvell/include/mv_gen_reg.h instead. Which should be included in those config files? Is there some way to tell please?
=========================================
As for the tqm-pcmcia problem, removing the #ifdef DEBUG fixed the problem with no growth in the u-boot.bin size. Though u-boot (elf binary) grew a bit (tested with ELDK4.2, gcc 4.2.2):
With no gcc4.6 patches and unfixed:
Configuring for TQM823L board...
text data bss dec hex filename
260523 13960 25704 300187 4949b ./u-boot
--------------------- SUMMARY ---------------------------- Boards compiled: 1
----------------------------------------------------------
[u-boot]$ ls -la u-boot.bin
-rwxrwxr-x 1 user user 274568 Oct 3 00:10 u-boot.bin
With gcc4.6 patches and removed #ifdef DEBUG:
Configuring for TQM823L board...
text data bss dec hex filename
260547 13960 25704 300211 494b3 ./u-boot
--------------------- SUMMARY ---------------------------- Boards compiled: 1
----------------------------------------------------------
[u-boot]$ ls -la u-boot.bin
-rwxrwxr-x 1 user user 274568 Oct 3 00:11 u-boot.bin
Cheers
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Marek VasutQuoted 8 lines · Marek Vasut
Fixes problems similar to the following ones:
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>---
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Marek Vasut,
Quoted 7 lines · In message <[email protected]> you wrote:
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
OK, I'm waiting for your confirmation then.
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 No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 8 lines · Wolfgang Denk
Dear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
Quoted 4 lines
Quoted 2 lines
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
OK, I'm waiting for your confirmation then.
Building like never before :-( Good so far, I know I screwed very badly this time.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Wolfgang Denk
Dear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
OK, I'm waiting for your confirmation then.
Building like never before :-( Good so far, I know I screwed very badly this time.
I was compiling like there was no tomorrow:
* BMW board builds with some warnings (unrelated)
* MPC8360ERDK, MPC8360ERDK_33, MPC8360ERDK_66, socrates, TQM8548_BE doesn't build (mtd related issues)
Configuring for MPC8360ERDK board...
fsl_upm.c:151: error: static declaration of 'nand_read_buf' follows non-static declaration/home/marex/u-boot/include/nand.h:139: error: previous declaration of 'nand_read_buf' was here
make[1]: *** [fsl_upm.o] Error 1
make: *** [drivers/mtd/nand/libnand.o] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
powerpc-linux-size: './u-boot': No such file
NOTE: This can be fixed by the patch Message-Id: <1317682569-4896-1-git-send- [email protected]> and Message-Id: <1317682569-4896-3-git-send-email- [email protected]>
* P1011RDB and variants:cmd_sf.c: In function 'do_spi_flash':
cmd_sf.c:164: warning: 'skipped' may be used uninitialized in this function cmd_sf.c:164: note: 'skipped' was declared here
NOTE: Patch Message-Id: <[email protected]> should fix the problem.
* mpq101 board:
Configuring for mpq101 board...
powerpc-linux-ld: section .bootpg [fffff000 -> fffff22f] overlaps section .data [ffffe258 -> fffffe1b]
powerpc-linux-ld: u-boot: section .bootpg lma 0xfffff000 overlaps previous sections
powerpc-linux-ld: u-boot: section .u_boot_cmd lma 0xfffffe1c overlaps previous sections
powerpc-linux-ld: u-boot: section .resetvec lma 0xfffffffc overlaps previous sections
powerpc-linux-ld: u-boot: section .ppcenv lma 0xfffc0000 overlaps previous sections
make: *** [u-boot] Error 1
powerpc-linux-size: './u-boot': No such file
I'll re-run the tests with the reverted GCC4.6 debug() patch and the three patches I submitted (Referenced in this mail) and reply in the morning.
Cheers
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Wolfgang DenkQuoted 8 lines · Wolfgang Denk
Dear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
Quoted 5 lines
Quoted 2 lines
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
OK, I'm waiting for your confirmation then.
I can confirm revert of this patch does fix the build issues on PPC architecture. I'll continue the investigation as for how this can be fixed without growing the code.
Cheers
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Wolfgang Denk
Dear Marek Vasut,
Quoted 7 lines · In message <[email protected]> you wrote:
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
Quoted 7 lines
Quoted 1 line
OK, I'm waiting for your confirmation then.
I can confirm revert of this patch does fix the build issues on PPC architecture. I'll continue the investigation as for how this can be fixed without growing the code.
Cheers
Please revert the "GCC4.6: Convert various empty macros to inline functions". Please consider this a final confirmation.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Marek Vasut,
Quoted 3 lines · In message <[email protected]> you wrote:
Please revert the "GCC4.6: Convert various empty macros to inline functions". Please consider this a final confirmation.
Thanks, reverted.
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 War is never imperative. -- McCoy, "Balance of Terror", stardate 1709.2
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
In reply to Marek VasutQuoted 11 lines · On Tuesday 04 October 2011 15:06:43 Marek Vasut wrote:
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Wolfgang Denk
Quoted 7 lines · Marek Vasut
Wolfgang, can you please revert this patch ? It should get the PPCs building again, but I feel like it's more like hiding errors. As a temporary solution (until I come up with something better), this should work.
I'll give a final confirmation that this fixes the problem after I do build on all PPC and ARM boards, but TQM823L builds fine.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
OK, I'm waiting for your confirmation then.
I can confirm revert of this patch does fix the build issues on PPC architecture. I'll continue the investigation as for how this can be fixed without growing the code.
Please revert the "GCC4.6: Convert various empty macros to inline functions". Please consider this a final confirmation.
to be clear, we will want this back eventually :)
it's finding legit bugs ... it noticed some DEBUG code of mine in the Blackfin SPI driver had rotted.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111004/b99c7890/attachment.pgp
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Please revert the "GCC4.6: Convert various empty macros to inline functions". Please consider this a final confirmation.
to be clear, we will want this back eventually :)
Agreed.
But in a form that 1) does not break building of boards and 2) does not inclrease code size for boards that don't even have DEBUG defined.
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 While money can't buy happiness, it certainly lets you choose your own form of misery.
PATCH v2 1/7 GCC4.6: Convert various empty macros to inline functions
Quoted 6 lines · Wolfgang Denk
Dear Mike Frysinger,
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Please revert the "GCC4.6: Convert various empty macros to inline functions". Please consider this a final confirmation.
Quoted 7 lines
Quoted 1 line
to be clear, we will want this back eventually :)
Agreed.
But in a form that 1) does not break building of boards and 2) does not inclrease code size for boards that don't even have DEBUG defined.
Agreed, I'll keep digging into it. And it's true it found some bugs.
Cheers