Fix printf() format issues with sizeof_t types by using %zu
Subsystems (5)
PATCH 1/1 Fix printf() format issues with sizeof_t types by using %zu
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Signed-off-by Wolfgang Denk <[email protected]>
--- common/lcd.c | 2 +- cpu/mpc8xx/video.c | 4 ++-- drivers/serial/usbtty.c | 4 ++-- fs/jffs2/jffs2_1pass.c | 10 ++++++---- fs/jffs2/jffs2_nand_1pass.c | 10 ++++++---- lib_m68k/board.c | 4 ++-- lib_mips/board.c | 4 ++-- lib_ppc/board.c | 4 ++-- net/bootp.c | 2 +- 9 files changed, 24 insertions(+), 20 deletions(-)
common/lcd.c +1 -1
@@ -539,7 +539,7 @@ void bitmap_plot (int x, int y)debug ("Logo: width %d height %d colors %d cmap %d\n" ,BMP_LOGO_WIDTH ,BMP_LOGO_HEIGHT ,BMP_LOGO_COLORS , -sizeof (bmp_logo_palette)/(sizeof (ushort))); + (int )(sizeof (bmp_logo_palette)/(sizeof (ushort)))); bmap = &bmp_logo_bitmap[0 ]; fb = (uchar *)(lcd_base + y * lcd_line_length + x);
cpu/mpc8xx/video.c +2 -2
@@ -833,10 +833,10 @@ static void video_encoder_init (void)puts ("[VIDEO ENCODER] Configuring the encoder...\n" ); -printf ("Sending %d bytes (@ %08lX) to I2C 0x%X:\n " , +printf ("Sending %zu bytes (@ %08lX) to I2C 0x%lX:\n " ,sizeof (video_encoder_data), (ulong )video_encoder_data, -VIDEO_I2C_ADDR ); + (ulong )VIDEO_I2C_ADDR );for (i=0 ; i<sizeof (video_encoder_data); ++i) {printf (" %02X" , video_encoder_data[i]); }
drivers/serial/usbtty.c +2 -2
@@ -529,8 +529,8 @@ int drv_usbtty_init (void) } snlen =strlen (sn);if (snlen >sizeof (serial_number) -1 ) { -printf ("Warning: serial number %s is too long (%d > %d)\n" , - sn, snlen,sizeof (serial_number) -1 ); +printf ("Warning: serial number %s is too long (%d > %lu)\n" , + sn, snlen, (ulong)(sizeof (serial_number) -1 )); snlen =sizeof (serial_number) -1 ; }memcpy (serial_number, sn, snlen);
fs/jffs2/jffs2_1pass.c +6 -4
@@ -1213,16 +1213,18 @@ jffs2_1pass_build_lists(struct part_info * part) }else if (node->nodetype ==JFFS2_NODETYPE_CLEANMARKER ) {if (node->totlen !=sizeof (struct jffs2_unknown_node ))printf ("OOPS Cleanmarker has bad size " -"%d != %u\n" , node->totlen, +"%d != %zu\n" , + node->totlen,sizeof (struct jffs2_unknown_node )); }else if (node->nodetype ==JFFS2_NODETYPE_PADDING ) {if (node->totlen <sizeof (struct jffs2_unknown_node ))printf ("OOPS Padding has bad size " -"%d < %u\n" , node->totlen, +"%d < %zu\n" , + node->totlen,sizeof (struct jffs2_unknown_node )); }else { -printf ("Unknown node type: %x len %d " -"offset 0x%x\n" , node->nodetype, +printf ("Unknown node type: %x len %d offset 0x%x\n" , + node->nodetype, node->totlen, offset); } offset += ((node->totlen +3 ) & ~3 );
fs/jffs2/jffs2_nand_1pass.c +6 -4
@@ -864,16 +864,18 @@ jffs2_1pass_build_lists(struct part_info * part) }else if (node->nodetype ==JFFS2_NODETYPE_CLEANMARKER ) {if (node->totlen !=sizeof (struct jffs2_unknown_node ))printf ("OOPS Cleanmarker has bad size " -"%d != %d\n" , node->totlen, +"%d != %zu\n" , + node->totlen,sizeof (struct jffs2_unknown_node )); }else if (node->nodetype ==JFFS2_NODETYPE_PADDING ) {if (node->totlen <sizeof (struct jffs2_unknown_node ))printf ("OOPS Padding has bad size " -"%d < %d\n" , node->totlen, +"%d < %zu\n" , + node->totlen,sizeof (struct jffs2_unknown_node )); }else { -printf ("Unknown node type: %x len %d " -"offset 0x%x\n" , node->nodetype, +printf ("Unknown node type: %x len %d offset 0x%x\n" , + node->nodetype, node->totlen, offset); } offset += ((node->totlen +3 ) & ~3 );
lib_m68k/board.c +2 -2
@@ -347,11 +347,11 @@ board_init_f (ulong bootflag) addr_sp -=sizeof (bd_t); bd = (bd_t *) addr_sp; gd->bd = bd; -debug ("Reserving %d Bytes for Board Info at: %08lx\n" , +debug ("Reserving %zu Bytes for Board Info at: %08lx\n" ,sizeof (bd_t), addr_sp); addr_sp -=sizeof (gd_t); id = (gd_t *) addr_sp; -debug ("Reserving %d Bytes for Global Data at: %08lx\n" , +debug ("Reserving %zu Bytes for Global Data at: %08lx\n" ,sizeof (gd_t), addr_sp);/* Reserve memory for boot params. */
lib_mips/board.c +2 -2
@@ -242,12 +242,12 @@ void board_init_f(ulong bootflag) addr_sp -=sizeof (bd_t); bd = (bd_t *)addr_sp; gd->bd = bd; -debug ("Reserving %d Bytes for Board Info at: %08lx\n" , +debug ("Reserving %zu Bytes for Board Info at: %08lx\n" ,sizeof (bd_t), addr_sp); addr_sp -=sizeof (gd_t); id = (gd_t *)addr_sp; -debug ("Reserving %d Bytes for Global Data at: %08lx\n" , +debug ("Reserving %zu Bytes for Global Data at: %08lx\n" ,sizeof (gd_t), addr_sp);/* Reserve memory for boot params.
lib_ppc/board.c +2 -2
@@ -524,11 +524,11 @@ void board_init_f (ulong bootflag) addr_sp -=sizeof (bd_t); bd = (bd_t *) addr_sp; gd->bd = bd; -debug ("Reserving %d Bytes for Board Info at: %08lx\n" , +debug ("Reserving %zu Bytes for Board Info at: %08lx\n" ,sizeof (bd_t), addr_sp); addr_sp -=sizeof (gd_t); id = (gd_t *) addr_sp; -debug ("Reserving %d Bytes for Global Data at: %08lx\n" , +debug ("Reserving %zu Bytes for Global Data at: %08lx\n" ,sizeof (gd_t), addr_sp);/*
net/bootp.c +1 -1
@@ -313,7 +313,7 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)Bootp_t *bp;char *s; -debug ("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%d)\n" , +debug ("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)\n" , src, dest, len,sizeof (Bootp_t)); bp = (Bootp_t *)pkt;
Signature · 1 line
1.5.6.1
PATCH 1/1 AmigaOneG3SE: remove dead and incomplete files
Signed-off-by Wolfgang Denk <[email protected]>
--- board/MAI/menu/menu.c | 66 -------------------- board/MAI/menu/menu.h | 162 ------------------------------------------------- 2 files changed, 0 insertions(+), 228 deletions(-) delete mode 100644 board/MAI/menu/menu.c delete mode 100644 board/MAI/menu/menu.h
board/MAI/menu/menu.c deleted +0 -66
@@ -1,66 +0,0 @@ -#include "menu.h" - -#define SINGLE_BOX 0 -#define DOUBLE_BOX 1 - -void video_draw_box (int style,int attr,char *title,int separate,int x,int y,int w,int h); -void video_draw_text (int x,int y,int attr,char *text); -void video_save_rect (int x,int y,int w,int h,void *save_area,int clearchar,int clearattr); -void video_restore_rect (int x,int y,int w,int h,void *save_area); -int video_rows (void ); -int video_cols (void ); - -#define MAX_MENU_OPTIONS 200 - -typedef struct -{ -int used;/* flag if this entry is used */ -int entry_x;/* Character column of the menu entry */ -int entry_y;/* Character line of the entry */ -int option_x;/* Character colum of the option (entry is same) */ -}option_data_t ; - -option_data_t odata[MAX_MENU_OPTIONS ]; - -int normal_attr =0x0F ; -int select_attr =0x2F ; -int disabled_attr =0x07 ; - -menu_t *root_menu; - -int menu_init (menu_t *root) -{ -char *s; -int i; - - s =getenv ("menu_normal" ); -if (s) normal_attr =atoi (s); - - s =getenv ("menu_select" ); -if (s) select_attr =atoi (s); - - s =getenv ("menu_disabled" ); -if (s) disabled_attr =atoi (s); - -for (i=0 ; i<MAX_MENU_OPTIONS ; i++) odata[i].used =0 ; - - root_menu = root; -} - -option_data_t *menu_alloc_odata (void ) -{ -int i; -for (int i=0 ; i<MAX_MENU_OPTIONS ; i++) - { -if (odata[i].used ==0 )return &odata[i]; - } -return NULL ; -} - -void menu_free_odata (option_data_t *odata) -{ - odata->used =0 ; -} - -void menu_layout (menu_t *menu) -{
board/MAI/menu/menu.h deleted +0 -162
162 lines not on this page · raw message
Signature · 1 line
1.5.6.1
PATCH 1/1 Code cleanup: fix old style assignment ambiguities like "=-" etc.
Signed-off-by Wolfgang Denk <[email protected]>
--- board/BuS/EB+MCF-EV123/cfm_flash.c | 2 +- board/BuS/EB+MCF-EV123/flash.c | 2 +- board/MAI/AmigaOneG3SE/ps2kbd.c | 4 ++-- board/MAI/AmigaOneG3SE/usb_uhci.c | 8 ++++---- board/esd/cpci750/sdram_init.c | 4 ++-- board/evb64260/eth.c | 4 ++-- board/evb64260/mpsc.c | 2 +- board/ml2/flash.c | 6 +++--- board/mpl/common/common_util.c | 12 ++++++------ board/mpl/common/flash.c | 2 +- board/mpl/common/kbd.c | 2 +- board/mpl/common/usb_uhci.c | 4 ++-- board/tqc/tqm5200/cmd_stk52xx.c | 8 ++++---- common/cmd_fdc.c | 4 ++-- common/cmd_flash.c | 6 +++--- common/cmd_fpga.c | 8 ++++---- common/cmd_scsi.c | 2 +- common/cmd_usb.c | 2 +- common/devices.c | 2 +- common/flash.c | 2 +- common/hush.c | 6 +++--- common/lcd.c | 2 +- common/usb.c | 6 +++--- common/usb_kbd.c | 4 ++-- common/usb_storage.c | 6 +++--- cpu/ppc4xx/40x_spd_sdram.c | 6 +++--- drivers/block/sym53c8xx.c | 2 +- drivers/input/pc_keyb.c | 2 +- drivers/pci/fsl_pci_init.c | 4 ++-- tools/updater/cmd_flash.c | 4 ++-- tools/updater/flash.c | 2 +- 31 files changed, 65 insertions(+), 65 deletions(-)
board/BuS/EB+MCF-EV123/cfm_flash.c +1 -1
@@ -173,7 +173,7 @@ int cfm_flash_write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cn dest =cmf_backdoor_address (addr);while ((cnt>=4 ) && (rc ==ERR_OK )) { - data =*((volatile u32 *) src); + data = *((volatile u32 *) src); *(volatile u32 *) dest = data;MCFCFM_CMD =MCFCFM_CMD_PGM ;MCFCFM_USTAT =MCFCFM_USTAT_CBEIF ;
board/BuS/EB+MCF-EV123/flash.c +1 -1
@@ -348,7 +348,7 @@ int amd_flash_write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt dest = addr;while ((cnt>=2 ) && (rc ==ERR_OK )) { - data =*((volatile u16 *) src); + data = *((volatile u16 *) src); rc=amd_write_word (info,dest,data); src +=2 ; dest +=2 ;
board/MAI/AmigaOneG3SE/ps2kbd.c +2 -2
@@ -229,7 +229,7 @@ int drv_isa_kbd_init (void)device_t kbddev ;char *stdinname =getenv ("stdin" ); -if (isa_kbd_init ()==-1 ) +if (isa_kbd_init () ==-1 )return -1 ;memset (&kbddev,0 ,sizeof (kbddev));strcpy (kbddev.name,DEVNAME );
@@ -515,7 +515,7 @@ int kbd_read_data(void)int val;unsigned char status; - val=-1 ; + val =-1 ; status =kbd_read_status ();if (status &KBD_STAT_OBF ) { val =kbd_read_input ();
board/MAI/AmigaOneG3SE/usb_uhci.c +4 -4
@@ -518,7 +518,7 @@ void usb_check_int_chain(void)uhci_td_t *td,*prevtd;for (i=0 ;i<8 ;i++) { - prevtd=&td_int[i];/* the first previous td is the skeleton td */ + prevtd = &td_int[i];/* the first previous td is the skeleton td */ link=swap_32 (td_int[i].link) &0xfffffff0 ;/* next in chain */ td=(uhci_td_t *)link;/* assign it */ /* all interrupt TDs are finally linked to the td_int[0].
@@ -595,7 +595,7 @@ int usb_lowlevel_init(void) busdevfunc=pci_find_device (USB_UHCI_VEND_ID ,USB_UHCI_DEV_ID ,0 );/* get PCI Device ID */ -if (busdevfunc==-1 ) { +if (busdevfunc ==-1 ) {printf ("Error USB UHCI (%04X,%04X) not found\n" ,USB_UHCI_VEND_ID ,USB_UHCI_DEV_ID );return -1 ; }
@@ -642,12 +642,12 @@ int usb_lowlevel_init(void)*/ int usb_lowlevel_stop (void ) { -if (irqvec==-1 ) +if (irqvec ==-1 )return 1 ;irq_free_handler (irqvec);irq_free_handler (0 );reset_hc (); - irqvec=-1 ; + irqvec =-1 ;return 0 ; }
board/esd/cpci750/sdram_init.c +2 -2
@@ -1570,8 +1570,8 @@ dram_size(long int *base, long int maxsize)for (cnt =STARTVAL /sizeof (long ); cnt < maxsize/sizeof (long ); cnt <<=1 ) { addr = base + cnt;/* pointer arith! */ - save1=*addr;/* save contents of addr */ - save2=*b;/* save contents of base */ + save1 = *addr;/* save contents of addr */ + save2 = *b;/* save contents of base */ *addr=cnt;/* write cnt to addr */ *b=0 ;/* put null@base */
board/evb64260/eth.c +2 -2
@@ -163,7 +163,7 @@ gt6426x_eth_receive(struct eth_dev_s *p,unsigned int icr)int eth_len=0 ;char *eth_data; -eth0_rx_desc_single *rx=&p->eth_rx_desc[(p->rdn)]; +eth0_rx_desc_single *rx = &p->eth_rx_desc[(p->rdn)];INVALIDATE_DCACHE ((unsigned int )rx,(unsigned int )(rx+1 ));
@@ -252,7 +252,7 @@ gt6426x_eth_transmit(void *v, volatile char *p, unsigned int s)#ifdef DEBUG unsigned int old_command_stat,old_psr;#endif -eth0_tx_desc_single *tx=&dev->eth_tx_desc[dev->tdn]; +eth0_tx_desc_single *tx = &dev->eth_tx_desc[dev->tdn];/* wait for tx to be ready */ INVALIDATE_DCACHE ((unsigned int )tx,(unsigned int )(tx+1 ));
board/evb64260/mpsc.c +1 -1
@@ -259,7 +259,7 @@ char mpsc_getchar (void)int mpsc_test_char (void ) { -volatile unsigned int *p=&rx_desc_base[rx_desc_index*8 ]; +volatile unsigned int *p = &rx_desc_base[rx_desc_index*8 ];INVALIDATE_DCACHE (&p[1 ], &p[2 ]);
board/ml2/flash.c +3 -3
@@ -222,7 +222,7 @@ static int write_word (flash_info_t *info, ulong dest, unsigned long long data)unsigned long long result;int rc =ERR_OK ; - result=*addr; + result = *addr;if ((result & data) != data)return ERR_NOT_ERASED ;
@@ -234,7 +234,7 @@ static int write_word (flash_info_t *info, ulong dest, unsigned long long data)eieio ();do { - result=*addr; + result = *addr; }while (~result &BIT_BUSY ); *addr=CMD_READ_ARRAY ;
@@ -275,7 +275,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) { }while (cnt>=8 ) { - data=*((unsigned long long *)src); + data = *((unsigned long long *)src);if ((rc =write_word (info, wp, data)) !=0 )return rc; src+=8 ;
board/mpl/common/common_util.c +6 -6
@@ -357,8 +357,8 @@ void copy_old_env(ulong size)unsigned off;uchar *name, *value; - name=&name_buf[0 ]; - value=&value_buf[0 ]; + name = &name_buf[0 ]; + value = &value_buf[0 ]; len=size; off =sizeof (long );while (len > off) {
@@ -377,8 +377,8 @@ void copy_old_env(ulong size)if (c =='\0' )break ; }while (len > off); - name=&name_buf[0 ]; - value=&value_buf[0 ]; + name = &name_buf[0 ]; + value = &value_buf[0 ];if (strncmp ((char *)name,"baudrate" ,8 )!=0 ) {setenv ((char *)name,(char *)value); }
@@ -636,12 +636,12 @@ void video_get_info_str (int line_number, char *info) ++s;break ; } - buf[i++]=*s; + buf[i++] = *s; }sprintf (&buf[i]," SN " ); i+=4 ;for (; s < e; ++s) { - buf[i++]=*s; + buf[i++] = *s; } buf[i++]=0 ; }
board/mpl/common/flash.c +1 -1
@@ -160,7 +160,7 @@ unsigned long flash_init (void)unsigned long size_b1,flashcr,size_reg;int mode;extern char version_string; -char *p=&version_string; +char *p = &version_string;/* Since we are relocated, we can set-up the CS finally */ setup_cs_reloc ();
board/mpl/common/kbd.c +1 -1
@@ -475,7 +475,7 @@ int kbd_read_data(void)int val;unsigned char status; - val=-1 ; + val =-1 ; status =kbd_read_status ();if (status &KBD_STAT_OBF ) { val =kbd_read_input ();
board/mpl/common/usb_uhci.c +2 -2
@@ -536,7 +536,7 @@ void usb_check_int_chain(void)uhci_td_t *td,*prevtd;for (i=0 ;i<8 ;i++) { - prevtd=&td_int[i];/* the first previous td is the skeleton td */ + prevtd = &td_int[i];/* the first previous td is the skeleton td */ link=swap_32 (td_int[i].link) &0xfffffff0 ;/* next in chain */ td=(uhci_td_t *)link;/* assign it */ /* all interrupt TDs are finally linked to the td_int[0].
@@ -638,7 +638,7 @@ int usb_lowlevel_stop(void)return 1 ;irq_free_handler (irqvec);reset_hc (); - irqvec=-1 ; + irqvec =-1 ;return 0 ; }
board/tqc/tqm5200/cmd_stk52xx.c +4 -4
@@ -192,10 +192,10 @@ static int i2s_play_wave(unsigned long addr, unsigned long len) psc->command = (PSC_RX_ENABLE |PSC_TX_ENABLE );for (i =0 ;i < (len /4 ); i++) { - swapped[3 ]=*wave_file++; - swapped[2 ]=*wave_file++; - swapped[1 ]=*wave_file++; - swapped[0 ]=*wave_file++; + swapped[3 ] = *wave_file++; + swapped[2 ] = *wave_file++; + swapped[1 ] = *wave_file++; + swapped[0 ] = *wave_file++; psc->psc_buffer_32 = *((unsigned long *)swapped);while (psc->tfnum >400 ) {if (ctrlc ())
common/cmd_fdc.c +2 -2
@@ -512,7 +512,7 @@ int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCTif (readblk>blocks)/* is end within 1st track */ readblk=blocks;/* yes, correct it */ PRINTF ("we read %ld blocks start %ld\n" ,readblk,pCMD->blnr); - bufferw=&buffer[0 ];/* setup working buffer */ + bufferw = &buffer[0 ];/* setup working buffer */ do { retryrw: len=sect_size * readblk;
@@ -566,7 +566,7 @@ retryrw:* we need to get the results */ fdc_terminate (pCMD); offset+=(sect_size*readblk);/* set up buffer pointer */ - bufferw=&buffer[offset]; + bufferw = &buffer[offset]; pCMD->blnr+=readblk;/* update current block nr */ blocks-=readblk;/* update blocks */ if (blocks==0 )
common/cmd_flash.c +3 -3
@@ -210,7 +210,7 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last, s_last [bank] =-1 ;/* last sector to erase */ } -for (bank=0 ,info=&flash_info[0 ]; +for (bank=0 ,info = &flash_info[0 ]; (bank <CFG_MAX_FLASH_BANKS ) && (addr_first <= addr_last); ++bank, ++info) {ulong b_end;
@@ -427,7 +427,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) s_first, s_last, &planned );if (planned && (rcode ==0 )) { -for (bank=0 ,info=&flash_info[0 ]; +for (bank=0 ,info = &flash_info[0 ]; (bank <CFG_MAX_FLASH_BANKS ) && (rcode ==0 ); ++bank, ++info) {if (s_first[bank]>=0 ) {
@@ -651,7 +651,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last) protected =0 ;if (planned && (rcode ==0 )) { -for (bank=0 ,info=&flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) { +for (bank=0 ,info = &flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) {if (info->flash_id ==FLASH_UNKNOWN ) {continue ; }
common/cmd_fpga.c +4 -4
@@ -85,7 +85,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) length = (*dataptr <<8 ) + *(dataptr+1 ); dataptr+=2 ;for (i=0 ;i<length;i++) - buffer[i]=*dataptr++; + buffer[i] = *dataptr++;printf (" design filename = \"%s\"\n" , buffer);
@@ -99,7 +99,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) length = (*dataptr <<8 ) + *(dataptr+1 ); dataptr+=2 ;for (i=0 ;i<length;i++) - buffer[i]=*dataptr++; + buffer[i] = *dataptr++;printf (" part number = \"%s\"\n" , buffer);/* get date (identifier, length, string) */
@@ -112,7 +112,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) length = (*dataptr <<8 ) + *(dataptr+1 ); dataptr+=2 ;for (i=0 ;i<length;i++) - buffer[i]=*dataptr++; + buffer[i] = *dataptr++;printf (" date = \"%s\"\n" , buffer);/* get time (identifier, length, string) */
@@ -124,7 +124,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) length = (*dataptr <<8 ) + *(dataptr+1 ); dataptr+=2 ;for (i=0 ;i<length;i++) - buffer[i]=*dataptr++; + buffer[i] = *dataptr++;printf (" time = \"%s\"\n" , buffer);/* get fpga data length (identifier, length) */
common/cmd_scsi.c +1 -1
@@ -171,7 +171,7 @@ removable:if (scsi_max_devs>0 ) scsi_curr_dev=0 ;else - scsi_curr_dev=-1 ; + scsi_curr_dev =-1 ; }
common/cmd_usb.c +1 -1
@@ -32,7 +32,7 @@#include <usb.h> #ifdef CONFIG_USB_STORAGE -static int usb_stor_curr_dev=-1 ;/* current device */ +static int usb_stor_curr_dev =-1 ;/* current device */ #endif /* some display routines (info command) */
common/devices.c +1 -1
@@ -125,7 +125,7 @@ int device_deregister(char *devname)device_t *dev =NULL ;char temp_names[3 ][8 ]; - dev_index=-1 ; + dev_index =-1 ;for (i=1 ; i<=ListNumItems (devlist); i++) { dev =ListGetPtrToItem (devlist, i);if (strcmp (dev->name,devname)==0 ) {
common/flash.c +1 -1
@@ -104,7 +104,7 @@ addr2info (ulong addr)flash_info_t *info;int i; -for (i=0 , info=&flash_info[0 ]; i<CFG_MAX_FLASH_BANKS ; ++i, ++info) { +for (i=0 , info = &flash_info[0 ]; i<CFG_MAX_FLASH_BANKS ; ++i, ++info) { if (info->flash_id != FLASH_UNKNOWN && addr >= info->start[0] &&/* WARNING - The '- 1' is needed if the flash
common/hush.c +3 -3
@@ -953,7 +953,7 @@ static int b_adduint(o_string *o, unsigned int i)static int static_get (struct in_str *i) { -int ch=*i->p++; +int ch = *i->p++;if (ch=='\0' )return EOF ;return ch; }
@@ -1104,7 +1104,7 @@ static int file_get(struct in_str *i) ch =0 ;/* If there is data waiting, eat it up */ if (i->p && *i->p) { - ch=*i->p++; + ch = *i->p++; }else {/* need to double check i->file because we might be doing something * more complicated by now, like sourcing or substituting. */
@@ -1121,7 +1121,7 @@ static int file_get(struct in_str *i) i->__promptme =0 ;#endif if (i->p && *i->p) { - ch=*i->p++; + ch = *i->p++; } #ifndef __U_BOOT__ }else {
common/lcd.c +1 -1
@@ -728,7 +728,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)WATCHDOG_RESET (); for (j = 0; j < width ; j++)#if defined(CONFIG_PXA250 ) - *(fb++)=*(bmap++); + *(fb++) = *(bmap++);#elif defined(CONFIG_MPC823 ) || defined(CONFIG_MCC200 ) *(fb++)=255 -*(bmap++);#endif
common/usb.c +3 -3
@@ -252,7 +252,7 @@ int usb_set_maxpacket(struct usb_device *dev)for (i=0 ; i<dev->config.bNumInterfaces;i++) {for (ii=0 ; ii<dev->config.if_desc[i].bNumEndpoints; ii++) { - ep=&dev->config.if_desc[i].ep_desc[ii]; + ep = &dev->config.if_desc[i].ep_desc[ii]; b=ep->bEndpointAddress &USB_ENDPOINT_NUMBER_MASK ;if ((ep->bmAttributes &USB_ENDPOINT_XFERTYPE_MASK )==USB_ENDPOINT_XFER_CONTROL ) {/* Control => bidirectional */
@@ -627,7 +627,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)if (size <=0 || !buf || !index)return -1 ; buf[0 ] =0 ; - tbuf=&mybuf[0 ]; + tbuf = &mybuf[0 ];/* get langid for strings if it's not yet known */ if (!dev->have_langid) {
@@ -857,7 +857,7 @@ void usb_scan_devices(void)/* first make all devices unknown */ for (i=0 ;i<USB_MAX_DEVICE ;i++) {memset (&usb_dev[i],0 ,sizeof (struct usb_device )); - usb_dev[i].devnum=-1 ; + usb_dev[i].devnum =-1 ; } dev_index=0 ;/* device 0 is always present (root hub, so let it analyze) */
common/usb_kbd.c +2 -2
@@ -730,8 +730,8 @@ static int usb_kbd_get_hid_desc(struct usb_device *dev)return -1 ; }printf (" report descriptor (size %u, read %d)\n" , len, index); - start=&buffer[0 ]; - end=&buffer[len]; + start = &buffer[0 ]; + end = &buffer[len]; i=0 ; do { index=fetch_item(start,end,&item);
common/usb_storage.c +3 -3
@@ -731,7 +731,7 @@ int usb_stor_CB_transport(ccb *srb, struct us_data *us)ccb reqsrb;int retry,notready; - psrb=&reqsrb; + psrb = &reqsrb; status=USB_STOR_TRANSPORT_GOOD ; retry=0 ; notready=0 ;
@@ -776,7 +776,7 @@ do_retry: psrb->cmd[1 ]=srb->lun<<5 ; psrb->cmd[4 ]=18 ; psrb->datalen=18 ; - psrb->pdata=&srb->sense_buf[0 ]; + psrb->pdata = &srb->sense_buf[0 ]; psrb->cmdlen=12 ;/* issue the command */ result=usb_stor_CB_comdat (psrb,us);
@@ -858,7 +858,7 @@ static int usb_request_sense(ccb *srb,struct us_data *ss) srb->cmd[1 ]=srb->lun<<5 ; srb->cmd[4 ]=18 ; srb->datalen=18 ; - srb->pdata=&srb->sense_buf[0 ]; + srb->pdata = &srb->sense_buf[0 ]; srb->cmdlen=12 ; ss->transport (srb,ss);USB_STOR_PRINTF ("Request Sense returned %02X %02X %02X\n" ,srb->sense_buf[2 ],srb->sense_buf[12 ],srb->sense_buf[13 ]);
cpu/ppc4xx/40x_spd_sdram.c +3 -3
@@ -126,9 +126,9 @@ long int spd_sdram(int(read_spd)(uint addr))int sdram0_pmit=0x07c00000 ;#ifndef CONFIG_405EP /* not on PPC405EP */ -int sdram0_besr0=-1 ; -int sdram0_besr1=-1 ; -int sdram0_eccesr=-1 ; +int sdram0_besr0 =-1 ; +int sdram0_besr1 =-1 ; +int sdram0_eccesr =-1 ;#endif int sdram0_ecccfg;
drivers/block/sym53c8xx.c +1 -1
@@ -784,7 +784,7 @@ retry: pccb->msgout[0 ]=SCSI_IDENTIFY ; transbytes=pccb->trans_bytes; tmpptr=pccb->pdata; - pccb->pdata=&pccb->sense_buf[0 ]; + pccb->pdata = &pccb->sense_buf[0 ]; datalen=pccb->datalen; pccb->datalen=14 ; tmpstat=pccb->status;
drivers/input/pc_keyb.c +1 -1
@@ -64,7 +64,7 @@ static int kbd_read_data(void)int val;unsigned char status; - val=-1 ; + val =-1 ; status =kbd_read_status ();if (status &KBD_STAT_OBF ) { val =kbd_read_input ();
drivers/pci/fsl_pci_init.c +2 -2
@@ -59,8 +59,8 @@ fsl_pci_init(struct pci_controller *hose)pci_dev_t dev =PCI_BDF (busno,0 ,0 );/* Initialize ATMU registers based on hose regions and flags */ -volatile pot_t *po=&pci->pot[1 ];/* skip 0 */ -volatile pit_t *pi=&pci->pit[0 ];/* ranges from: 3 to 1 */ +volatile pot_t *po = &pci->pot[1 ];/* skip 0 */ +volatile pit_t *pi = &pci->pit[0 ];/* ranges from: 3 to 1 */ #ifdef DEBUG int neg_link_w;
tools/updater/cmd_flash.c +2 -2
@@ -187,7 +187,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) erased =0 ; -for (bank=0 ,info=&flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) { +for (bank=0 ,info = &flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) {ulong b_end;int sect;
@@ -366,7 +366,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last) protected =0 ; -for (bank=0 ,info=&flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) { +for (bank=0 ,info = &flash_info[0 ]; bank <CFG_MAX_FLASH_BANKS ; ++bank, ++info) {ulong b_end;int sect;
tools/updater/flash.c +1 -1
@@ -93,7 +93,7 @@ addr2info (ulong addr)flash_info_t *info;int i; -for (i=0 , info=&flash_info[0 ]; i<CFG_MAX_FLASH_BANKS ; ++i, ++info) { +for (i=0 , info = &flash_info[0 ]; i<CFG_MAX_FLASH_BANKS ; ++i, ++info) { if (info->flash_id != FLASH_UNKNOWN && addr >= info->start[0] &&/* WARNING - The '- 1' is needed if the flash
Signature · 1 line
1.5.6.1
PATCH 1/1 EB+MCF-EV123 board: fix syntx error
Signed-off-by Wolfgang Denk <[email protected]>
--- board/BuS/EB+MCF-EV123/EB+MCF-EV123.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +1 -1
@@ -51,7 +51,7 @@ phys_size_t initdram (int board_type)MCFSDRAMC_DACR0 =MCFSDRAMC_DACR_BASE (CFG_SDRAM_BASE0 ) |MCFSDRAMC_DACR_CASL (1 ) |MCFSDRAMC_DACR_CBM (3 ) - | MCFSDRAMC_DACR_PS_16); + |MCFSDRAMC_DACR_PS_16 ;MCFSDRAMC_DMR0 =MCFSDRAMC_DMR_BAM_16M |MCFSDRAMC_DMR_V ;
Signature · 1 line
1.5.6.1
PATCH 1/1 EB+MCF-EV123 board: fix coding style (alingment)
Signed-off-by Wolfgang Denk <[email protected]>
--- board/BuS/EB+MCF-EV123/EB+MCF-EV123.c | 86 ++++++++++++++++---------------- 1 files changed, 43 insertions(+), 43 deletions(-)
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +43 -43
@@ -41,51 +41,51 @@ int checkboard (void)phys_size_t initdram (int board_type) { -int size,i; +int size, i; size =0 ; -MCFSDRAMC_DCR =MCFSDRAMC_DCR_RTIM_6 - |MCFSDRAMC_DCR_RC ((15 *CFG_CLK )>>4 ); -#ifdef CFG_SDRAM_BASE0 - -MCFSDRAMC_DACR0 =MCFSDRAMC_DACR_BASE (CFG_SDRAM_BASE0 ) - |MCFSDRAMC_DACR_CASL (1 ) - |MCFSDRAMC_DACR_CBM (3 ) - |MCFSDRAMC_DACR_PS_16 ; - -MCFSDRAMC_DMR0 =MCFSDRAMC_DMR_BAM_16M - |MCFSDRAMC_DMR_V ; - -MCFSDRAMC_DACR0 |=MCFSDRAMC_DACR_IP ; - - *(unsigned short *)(CFG_SDRAM_BASE0 ) =0xA5A5 ; -MCFSDRAMC_DACR0 |=MCFSDRAMC_DACR_RE ; -for (i=0 ; i <2000 ; i++) - asm(" nop" ); -mbar_writeLong (MCFSDRAMC_DACR0 ,mbar_readLong (MCFSDRAMC_DACR0 ) - |MCFSDRAMC_DACR_IMRS ); - *(unsigned int *)(CFG_SDRAM_BASE0 +0x220 ) =0xA5A5 ; - size +=CFG_SDRAM_SIZE *1024 *1024 ; -#endif -#ifdef CFG_SDRAM_BASE1 -MCFSDRAMC_DACR1 =MCFSDRAMC_DACR_BASE (CFG_SDRAM_BASE1 ) - |MCFSDRAMC_DACR_CASL (1 ) - |MCFSDRAMC_DACR_CBM (3 ) - |MCFSDRAMC_DACR_PS_16 ; - -MCFSDRAMC_DMR1 =MCFSDRAMC_DMR_BAM_16M - |MCFSDRAMC_DMR_V ; - -MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_IP ; - - *(unsigned short *)(CFG_SDRAM_BASE1 ) =0xA5A5 ; -MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_RE ; -for (i=0 ; i <2000 ; i++) - asm(" nop" ); -MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_IMRS ; - *(unsigned int *)(CFG_SDRAM_BASE1 +0x220 ) =0xA5A5 ; - size +=CFG_SDRAM_SIZE1 *1024 *1024 ; -#endif +MCFSDRAMC_DCR =MCFSDRAMC_DCR_RTIM_6 + |MCFSDRAMC_DCR_RC ((15 *CFG_CLK ) >>4 ); +#ifdef CFG_SDRAM_BASE0 + +MCFSDRAMC_DACR0 =MCFSDRAMC_DACR_BASE (CFG_SDRAM_BASE0 ) + |MCFSDRAMC_DACR_CASL (1 ) + |MCFSDRAMC_DACR_CBM (3 ) + |MCFSDRAMC_DACR_PS_16 ; + +MCFSDRAMC_DMR0 =MCFSDRAMC_DMR_BAM_16M |MCFSDRAMC_DMR_V ; + +MCFSDRAMC_DACR0 |=MCFSDRAMC_DACR_IP ; + + *(unsigned short *) (CFG_SDRAM_BASE0 ) =0xA5A5 ; +MCFSDRAMC_DACR0 |=MCFSDRAMC_DACR_RE ; +for (i =0 ; i <2000 ; i++) + asm (" nop" ); +mbar_writeLong (MCFSDRAMC_DACR0 , +mbar_readLong (MCFSDRAMC_DACR0 ) |MCFSDRAMC_DACR_IMRS ); + *(unsigned int *) (CFG_SDRAM_BASE0 +0x220 ) =0xA5A5 ; + size +=CFG_SDRAM_SIZE *1024 *1024 ; +#endif +#ifdef CFG_SDRAM_BASE1 +MCFSDRAMC_DACR1 =MCFSDRAMC_DACR_BASE (CFG_SDRAM_BASE1 ) + |MCFSDRAMC_DACR_CASL (1 ) + |MCFSDRAMC_DACR_CBM (3 ) + |MCFSDRAMC_DACR_PS_16 ; + +MCFSDRAMC_DMR1 =MCFSDRAMC_DMR_BAM_16M |MCFSDRAMC_DMR_V ; + +MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_IP ; + + *(unsigned short *) (CFG_SDRAM_BASE1 ) =0xA5A5 ; +MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_RE ; + +for (i =0 ; i <2000 ; i++) + asm (" nop" ); + +MCFSDRAMC_DACR1 |=MCFSDRAMC_DACR_IMRS ; + *(unsigned int *) (CFG_SDRAM_BASE1 +0x220 ) =0xA5A5 ; + size +=CFG_SDRAM_SIZE1 *1024 *1024 ; +#endif return size; }
Signature · 1 line
1.5.6.1
PATCH 1/1 elppc board: fix syntax error.
Signed-off-by Wolfgang Denk <[email protected]>
--- board/eltec/elppc/eepro100_srom.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/eltec/elppc/eepro100_srom.c +1 -1
@@ -96,7 +96,7 @@ void eepro100_srom_load (unsigned short *destination)for (count=0 ; count <0x40 ; count++) { - *destination++ = read_eeprom (struct eth_device*)&onboard_dev, + *destination++ =read_eeprom ((struct eth_device *)&onboard_dev, count,EE_ADDR_BITS );#ifdef DEBUG printf ("%04x " , *(destination -1 ));
Signature · 1 line
1.5.6.1
PATCH 1/1 elppc board: Coding style cleanup.
Signed-off-by Wolfgang Denk <[email protected]>
--- board/eltec/elppc/eepro100_srom.c | 99 +++++++++++++++++++------------------ 1 files changed, 50 insertions(+), 49 deletions(-)
board/eltec/elppc/eepro100_srom.c +50 -49
@@ -31,82 +31,83 @@#include <net.h> #include "srom.h" -extern int eepro100_write_eeprom (struct eth_device * dev, -int location,int addr_len,unsigned short data); +extern int eepro100_write_eeprom (struct eth_device *dev, +int location,int addr_len, +unsigned short data);/*----------------------------------------------------------------------------*/ unsigned short eepro100_srom_checksum (unsigned short *sromdata) { -unsigned short sum =0 ; -unsigned int i; - -for (i =0 ; i < (EE_SIZE -1 ); i++) - { - sum += sromdata[i]; - } -return (EE_CHECKSUM - sum); +unsigned short sum =0 ; +unsigned int i; + +for (i =0 ; i < (EE_SIZE -1 ); i++) { + sum += sromdata[i]; + } +return (EE_CHECKSUM - sum); }/*----------------------------------------------------------------------------*/ int eepro100_srom_store (unsigned short *source) { -int count; -struct eth_device onboard_dev; - -/* get onboard network iobase */ -pci_read_config_dword (PCI_BDF (0 ,0x10 ,0 ),PCI_BASE_ADDRESS_0 , - (unsigned int *)&onboard_dev.iobase); - onboard_dev.iobase &= ~0xf ; - - source[63 ] =eepro100_srom_checksum (source); - -for (count=0 ; count <EE_SIZE ; count++) - { -if (eepro100_write_eeprom ((struct eth_device *)&onboard_dev, - count,EE_ADDR_BITS ,SROM_SHORT (source)) ==-1 ) -return -1 ; - source++; - } -return 0 ; +int count; +struct eth_device onboard_dev; + +/* get onboard network iobase */ +pci_read_config_dword (PCI_BDF (0 ,0x10 ,0 ),PCI_BASE_ADDRESS_0 , + (unsigned int *) &onboard_dev.iobase); + onboard_dev.iobase &= ~0xf ; + + source[63 ] =eepro100_srom_checksum (source); + +for (count =0 ; count <EE_SIZE ; count++) { +if (eepro100_write_eeprom ((struct eth_device *) &onboard_dev, + count,EE_ADDR_BITS , +SROM_SHORT (source)) ==-1 ) { +return -1 ; + } + source++; + } +return 0 ; }/*----------------------------------------------------------------------------*/ #ifdef EEPRO100_SROM_CHECK -extern int read_eeprom (struct eth_device * dev,int location,int addr_len); +extern int read_eeprom (struct eth_device *dev,int location,int addr_len);void eepro100_srom_load (unsigned short *destination) { -int count; -struct eth_device onboard_dev; +int count; +struct eth_device onboard_dev; +#ifdef DEBUG -int lr =0 ; -printf ("eepro100_srom_download:\n" ); +int lr =0 ; + +printf ("eepro100_srom_download:\n" );#endif -/* get onboard network iobase */ -pci_read_config_dword (PCI_BDF (0 ,0x10 ,0 ),PCI_BASE_ADDRESS_0 , - &onboard_dev.iobase); - onboard_dev.iobase &= ~0xf ; +/* get onboard network iobase */ +pci_read_config_dword (PCI_BDF (0 ,0x10 ,0 ),PCI_BASE_ADDRESS_0 , + &onboard_dev.iobase); + onboard_dev.iobase &= ~0xf ; -memset (destination,0x65 ,128 ); +memset (destination,0x65 ,128 ); -for (count=0 ; count <0x40 ; count++) - { - *destination++ =read_eeprom ((struct eth_device *)&onboard_dev, - count,EE_ADDR_BITS ); +for (count =0 ; count <0x40 ; count++) { + *destination++ =read_eeprom ((struct eth_device *) &onboard_dev, + count,EE_ADDR_BITS );#ifdef DEBUG -printf ("%04x " , *(destination -1 )); -if (lr++ ==7 ) - { -printf ("\n" ); - lr =0 ; - } +printf ("%04x " , *(destination -1 )); +if (lr++ ==7 ) { +printf ("\n" ); + lr =0 ; + }#endif - } + } }#endif /* EEPRO100_SROM_CHECK */
Signature · 1 line
1.5.6.1
PATCH 1/1 cpu/i386/serial.c: Fix syntax errors
Signed-off-by Wolfgang Denk <[email protected]>
--- cpu/i386/serial.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
cpu/i386/serial.c +2 -2
@@ -413,8 +413,8 @@ void kgdb_serial_init(void)* Init onboard 16550 UART */ outb (0x80 ,UART1_BASE +UART_LCR );/* set DLAB bit */ - outb(bdiv & 0xff), UART1_BASE + UART_DLL); /* set divisor for 9600 baud */ - outb(bdiv >> 8), UART1_BASE + UART_DLM); /* set divisor for 9600 baud */ +outb ((bdiv &0xff ),UART1_BASE +UART_DLL );/* set divisor for 9600 baud */ +outb ((bdiv >>8 ),UART1_BASE +UART_DLM );/* set divisor for 9600 baud */ outb (0x03 ,UART1_BASE +UART_LCR );/* line control 8 bits no parity */ outb (0x00 ,UART1_BASE +UART_FCR );/* disable FIFO */ outb (0x00 ,UART1_BASE +UART_MCR );/* no modem control DTR RTS */
Signature · 1 line
1.5.6.1
PATCH 1/1 Fix coding style; make code better parsable by external tools
Signed-off-by Wolfgang Denk <[email protected]>
--- board/snmc/qs850/qs850.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-)
board/snmc/qs850/qs850.c +9 -8
@@ -86,6 +86,13 @@ const uint sdram_table[] =* * Always return 1 */ +#if defined(CONFIG_QS850 ) +#define BOARD_IDENTITY "QS850" +#elif defined(CONFIG_QS823 ) +#define BOARD_IDENTITY "QS823" +#else +#define BOARD_IDENTITY "QS???" +#endif int checkboard (void ) {
@@ -96,14 +103,8 @@ int checkboard (void) i =getenv_r ("serial#" , buf,sizeof (buf)); s = (i>0 ) ? buf :NULL ; -#ifdef CONFIG_QS850 -if (!s ||strncmp (s,"QS850" ,5 )) { -puts ("### No HW ID - assuming QS850" ); -#endif -#ifdef CONFIG_QS823 -if (!s ||strncmp (s,"QS823" ,5 )) { -puts ("### No HW ID - assuming QS823" ); -#endif +if (!s ||strncmp (s,BOARD_IDENTITY ,5 )) { +puts ("### No HW ID - assuming " BOARD_IDENTITY ); }else {for (e=s; *e; ++e) {if (*e ==' ' )
Signature · 1 line
1.5.6.1