diff options
author | Wolfgang Denk <wd@denx.de> | 2008-07-14 15:19:07 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-07-14 15:19:07 +0200 |
commit | d0ff51ba5d0309dbe9e25ea54f8a0285a6d5db90 (patch) | |
tree | f751c45fa698dd14edd985b80ae16ad521768457 /common | |
parent | d7854223c5c85b5849fbf422cc8ac0efef461c37 (diff) |
Code cleanup: fix old style assignment ambiguities like "=-" etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_fdc.c | 4 | ||||
-rw-r--r-- | common/cmd_flash.c | 6 | ||||
-rw-r--r-- | common/cmd_fpga.c | 8 | ||||
-rw-r--r-- | common/cmd_scsi.c | 2 | ||||
-rw-r--r-- | common/cmd_usb.c | 2 | ||||
-rw-r--r-- | common/devices.c | 2 | ||||
-rw-r--r-- | common/flash.c | 2 | ||||
-rw-r--r-- | common/hush.c | 6 | ||||
-rw-r--r-- | common/lcd.c | 2 | ||||
-rw-r--r-- | common/usb.c | 6 | ||||
-rw-r--r-- | common/usb_kbd.c | 4 | ||||
-rw-r--r-- | common/usb_storage.c | 6 |
12 files changed, 25 insertions, 25 deletions
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index e4fbf29a221..8493defe934 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -512,7 +512,7 @@ int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT if(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) diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 9bd8074bfb3..a7f66ddbfad 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -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; } diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index 9141dcce921..dcbbc993dd2 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -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) */ diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index e648f7d6014..f3574650ce8 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -171,7 +171,7 @@ removable: if(scsi_max_devs>0) scsi_curr_dev=0; else - scsi_curr_dev=-1; + scsi_curr_dev = -1; } diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 30caa98ea73..c62ca9769cb 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -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) */ diff --git a/common/devices.c b/common/devices.c index ddf8f8ee2d9..9cc963ac204 100644 --- a/common/devices.c +++ b/common/devices.c @@ -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) { diff --git a/common/flash.c b/common/flash.c index 888ff9c67c6..fe39d55ef67 100644 --- a/common/flash.c +++ b/common/flash.c @@ -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 diff --git a/common/hush.c b/common/hush.c index b43f6185acf..75c18ce8ae0 100644 --- a/common/hush.c +++ b/common/hush.c @@ -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 { diff --git a/common/lcd.c b/common/lcd.c index 04ef4e38771..eec1f53b0a7 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -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 diff --git a/common/usb.c b/common/usb.c index a0107dca537..a45d113a74f 100644 --- a/common/usb.c +++ b/common/usb.c @@ -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) */ diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 1e79208d7ce..c8764952ecc 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -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); diff --git a/common/usb_storage.c b/common/usb_storage.c index 3e113b4084e..d8fbb69a369 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -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]); |