staging: ft1000: Get rid of PUCHAR typedef.
PATCH 1/9 staging: ft1000: Get rid of PUCHAR typedef.
PUCHAR typedef was replaces by u8 *.
--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 4 +- .../staging/ft1000/ft1000-usb/ft1000_download.c | 44 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 40 +++++++++--------- drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 6 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 11 ++--- 5 files changed, 52 insertions(+), 53 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +2 -2
@@ -623,10 +623,10 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,memcpy (get_stat_data.eui64, info->eui64,EUISZ );if (info->ProgConStat !=0xFF ) { -ft1000_read_dpram16 (ft1000dev,FT1000_MAG_DSP_LED , (PUCHAR )&ledStat,FT1000_MAG_DSP_LED_INDX ); +ft1000_read_dpram16 (ft1000dev,FT1000_MAG_DSP_LED , (u8 *)&ledStat,FT1000_MAG_DSP_LED_INDX ); get_stat_data.LedStat =ntohs (ledStat);DEBUG ("FT1000:ft1000_ChIoctl: LedStat = 0x%x\n" , get_stat_data.LedStat); -ft1000_read_dpram16 (ft1000dev,FT1000_MAG_DSP_CON_STATE , (PUCHAR )&conStat,FT1000_MAG_DSP_CON_STATE_INDX ); +ft1000_read_dpram16 (ft1000dev,FT1000_MAG_DSP_CON_STATE , (u8 *)&conStat,FT1000_MAG_DSP_CON_STATE_INDX ); get_stat_data.ConStat =ntohs (conStat);DEBUG ("FT1000:ft1000_ChIoctl: ConStat = 0x%x\n" , get_stat_data.ConStat); }
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +22 -22
154 lines not on this page · raw message
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +20 -20
@@ -196,7 +196,7 @@ u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRe// //--------------------------------------------------------------------------- -u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,USHORT cnt) +u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt) {u16 ret =STATUS_SUCCESS ;
@@ -235,7 +235,7 @@ u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, PUCHAR buf// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,USHORT cnt) +u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt) {u16 ret =STATUS_SUCCESS ;
@@ -272,7 +272,7 @@ u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, PUCHAR bu// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,u8 highlow) +u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,u8 highlow) {u16 ret =STATUS_SUCCESS ;
@@ -365,7 +365,7 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va// Notes: // //--------------------------------------------------------------------------- -u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer) +u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer) {UCHAR buf[16 ];USHORT pos;
@@ -414,14 +414,14 @@ u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, PUCHAR// Notes: // //--------------------------------------------------------------------------- -u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer) +u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer) {USHORT pos1;USHORT pos2;USHORT i;UCHAR buf[32 ];UCHAR resultbuffer[32 ]; -PUCHAR pdata; +u8 *pdata;u16 ret =STATUS_SUCCESS ;//DEBUG("fix_ft1000_write_dpram32: Entered:\n");
@@ -445,7 +445,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, PUCHAreturn ret; } - ret =ft1000_read_dpram32 (ft1000dev, pos1, (PUCHAR )&resultbuffer[0 ],16 ); + ret =ft1000_read_dpram32 (ft1000dev, pos1, (u8 *)&resultbuffer[0 ],16 );if (ret ==STATUS_SUCCESS ) { buffer = pdata;
@@ -460,8 +460,8 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, PUCHAif (ret ==STATUS_FAILURE ) { - ret =ft1000_write_dpram32 (ft1000dev, pos1, (PUCHAR )&tempbuffer[0 ],16 ); - ret =ft1000_read_dpram32 (ft1000dev, pos1, (PUCHAR )&resultbuffer[0 ],16 ); + ret =ft1000_write_dpram32 (ft1000dev, pos1, (u8 *)&tempbuffer[0 ],16 ); + ret =ft1000_read_dpram32 (ft1000dev, pos1, (u8 *)&resultbuffer[0 ],16 );if (ret ==STATUS_SUCCESS ) { buffer = pdata;
@@ -621,7 +621,7 @@ int dsp_reload(struct ft1000_device *ft1000dev) status =ft1000_write_register (ft1000dev,HOST_INTF_BE ,FT1000_REG_SUP_CTRL );// Let's check for FEFE - status =ft1000_read_dpram32 (ft1000dev,FT1000_MAG_DPRAM_FEFE_INDX , (PUCHAR )&templong,4 ); + status =ft1000_read_dpram32 (ft1000dev,FT1000_MAG_DPRAM_FEFE_INDX , (u8 *)&templong,4 );DEBUG ("templong (fefe) = 0x%8x\n" , templong);// call codeloader
@@ -1485,7 +1485,7 @@ static BOOLEAN ft1000_receive_cmd (struct ft1000_device *dev, u16 *pbuffer, intint i;u16 tempword; - ret =ft1000_read_dpram16 (dev,FT1000_MAG_PH_LEN , (PUCHAR )&size,FT1000_MAG_PH_LEN_INDX ); + ret =ft1000_read_dpram16 (dev,FT1000_MAG_PH_LEN , (u8 *)&size,FT1000_MAG_PH_LEN_INDX ); size =ntohs (size) +PSEUDOSZ ;if (size > maxsz) {DEBUG ("FT1000:ft1000_receive_cmd:Invalid command length = %d\n" , size);
@@ -1596,7 +1596,7 @@ static int ft1000_dsp_prov(void *arg) TempShortBuf[1 ] =htons (len);memcpy (&TempShortBuf[2 ], ppseudo_hdr, len); - status =ft1000_write_dpram32 (dev,0 , (PUCHAR )&TempShortBuf[0 ], (unsigned short )(len+2 )); + status =ft1000_write_dpram32 (dev,0 , (u8 *)&TempShortBuf[0 ], (unsigned short )(len+2 )); status =ft1000_write_register (dev,FT1000_DB_DPRAM_TX ,FT1000_REG_DOORBELL );list_del (&ptr->list);
@@ -1815,7 +1815,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { } info->DSPInfoBlk[10 ] =0x7200 ; info->DSPInfoBlk[11 ] =htons (info->DSPInfoBlklen); - status =ft1000_write_dpram32 (dev,0 , (PUCHAR )&info->DSPInfoBlk[0 ], (unsigned short )(info->DSPInfoBlklen+22 )); + status =ft1000_write_dpram32 (dev,0 , (u8 *)&info->DSPInfoBlk[0 ], (unsigned short )(info->DSPInfoBlklen+22 )); status =ft1000_write_register (dev,FT1000_DB_DPRAM_TX ,FT1000_REG_DOORBELL ); info->DrvMsgPend =0 ;
@@ -1930,14 +1930,14 @@ int ft1000_poll(void* dev_id) {if (tempword &FT1000_DB_DPRAM_RX ) {//DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type: FT1000_DB_DPRAM_RX\n"); - status =ft1000_read_dpram16 (dev,0x200 , (PUCHAR )&data,0 ); + status =ft1000_read_dpram16 (dev,0x200 , (u8 *)&data,0 );//DEBUG("ft1000_poll:FT1000_DB_DPRAM_RX:ft1000_read_dpram16:size = 0x%x\n", data); size =ntohs (data) +16 +2 ;//wai if (size %4 ) { modulo =4 - (size %4 ); size = size + modulo; } - status =ft1000_read_dpram16 (dev,0x201 , (PUCHAR )&portid,1 ); + status =ft1000_read_dpram16 (dev,0x201 , (u8 *)&portid,1 ); portid &=0xff ;//DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type: FT1000_DB_DPRAM_RX : portid 0x%x\n", portid);
@@ -2072,7 +2072,7 @@ int ft1000_poll(void* dev_id) { status =ft1000_write_register (dev,FT1000_ASIC_RESET_REQ ,FT1000_REG_DOORBELL ); status =ft1000_write_register (dev,HOST_INTF_BE ,FT1000_REG_SUP_CTRL );// copy dsp session record from Adapter block - status =ft1000_write_dpram32 (dev,0 , (PUCHAR )&info->DSPSess.Rec[0 ],1024 ); + status =ft1000_write_dpram32 (dev,0 , (u8 *)&info->DSPSess.Rec[0 ],1024 );// Program WMARK register status =ft1000_write_register (dev,0x600 ,FT1000_REG_MAG_WATERMARK );// ring doorbell to tell DSP that ASIC is out of reset
@@ -2086,10 +2086,10 @@ int ft1000_poll(void* dev_id) {if (info->fAppMsgPend ==0 ) {// Reset ASIC and DSP - status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER0 , (PUCHAR )&(info->DSP_TIME[0 ]),FT1000_MAG_DSP_TIMER0_INDX ); - status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER1 , (PUCHAR )&(info->DSP_TIME[1 ]),FT1000_MAG_DSP_TIMER1_INDX ); - status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER2 , (PUCHAR )&(info->DSP_TIME[2 ]),FT1000_MAG_DSP_TIMER2_INDX ); - status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER3 , (PUCHAR )&(info->DSP_TIME[3 ]),FT1000_MAG_DSP_TIMER3_INDX ); + status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER0 , (u8 *)&(info->DSP_TIME[0 ]),FT1000_MAG_DSP_TIMER0_INDX ); + status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER1 , (u8 *)&(info->DSP_TIME[1 ]),FT1000_MAG_DSP_TIMER1_INDX ); + status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER2 , (u8 *)&(info->DSP_TIME[2 ]),FT1000_MAG_DSP_TIMER2_INDX ); + status =ft1000_read_dpram16 (dev,FT1000_MAG_DSP_TIMER3 , (u8 *)&(info->DSP_TIME[3 ]),FT1000_MAG_DSP_TIMER3_INDX ); info->CardReady =0 ; info->DrvErrNum =DSP_CONDRESET_INFO ;DEBUG ("ft1000_hw:DSP conditional reset requested\n" );
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +3 -3
@@ -39,7 +39,7 @@u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx, -PUCHAR buffer,u8 highlow); +u8 *buffer,u8 highlow); static int
@@ -77,11 +77,11 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,if (info->ProgConStat !=0xFF ) {ft1000_read_dpram16 (info->pFt1000Dev,FT1000_MAG_DSP_LED , - (PUCHAR ) & ledStat,FT1000_MAG_DSP_LED_INDX ); + (u8 *)&ledStat,FT1000_MAG_DSP_LED_INDX ); info->LedStat =ntohs (ledStat);ft1000_read_dpram16 (info->pFt1000Dev,FT1000_MAG_DSP_CON_STATE , - (PUCHAR ) & conStat,FT1000_MAG_DSP_CON_STATE_INDX ); + (u8 *)&conStat,FT1000_MAG_DSP_CON_STATE_INDX ); info->ConStat =ntohs (conStat);do_gettimeofday (&tv); delta = (tv.tv_sec - info->ConTm);
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +5 -6
@@ -104,7 +104,6 @@ struct prov_record {#define BOOLEAN u8#define PULONG u32 *#define PUSHORT u16 * -#define PUCHAR u8 *#define PCHAR u8 *#define UINT u32
@@ -565,12 +564,12 @@ struct dpram_blk {u16 ft1000_read_register (struct ft1000_device *ft1000dev,u16 * Data,u16 nRegIndx);u16 ft1000_write_register (struct ft1000_device *ft1000dev,USHORT value,u16 nRegIndx); -u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,USHORT cnt); -u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,USHORT cnt); -u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer,u8 highlow); +u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt); +u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt); +u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,u8 highlow);u16 ft1000_write_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,USHORT value,u8 highlow); -u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer); -u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,PUCHAR buffer); +u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer); +u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer);extern void *pFileStart;extern size_t FileLength;
Signature · 1 line
1.7.1
PATCH 2/9 staging: ft1000: Get rid of UCHAR typedef.
--- .../staging/ft1000/ft1000-usb/ft1000_download.c | 26 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 6 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 11 ++++---- 3 files changed, 21 insertions(+), 22 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +13 -13
@@ -534,7 +534,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)// // Parameters: struct ft1000_device - device structure // USHORT **pUsFile - DSP image file pointer in USHORT -// UCHAR **pUcFile - DSP image file pointer in UCHAR +// u8 **pUcFile - DSP image file pointer in u8 // long word_length - lenght of the buffer to be written // to DPRAM //
@@ -546,7 +546,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)// Notes: // //--------------------------------------------------------------------------- -static ULONG write_blk (struct ft1000_device *ft1000dev,USHORT **pUsFile,UCHAR **pUcFile,long word_length) +static ULONG write_blk (struct ft1000_device *ft1000dev,USHORT **pUsFile,u8 **pUcFile,long word_length) {ULONG Status =STATUS_SUCCESS ;USHORT dpram;
@@ -690,7 +690,7 @@ static void usb_dnld_complete (struct urb *urb)// // Parameters: struct ft1000_device - device structure // USHORT **pUsFile - DSP image file pointer in USHORT -// UCHAR **pUcFile - DSP image file pointer in UCHAR +// u8 **pUcFile - DSP image file pointer in u8 // long word_length - lenght of the buffer to be written // to DPRAM //
@@ -702,7 +702,7 @@ static void usb_dnld_complete (struct urb *urb)// Notes: // //--------------------------------------------------------------------------- -static ULONG write_blk_fifo (struct ft1000_device *ft1000dev,USHORT **pUsFile,UCHAR **pUcFile,long word_length) +static ULONG write_blk_fifo (struct ft1000_device *ft1000dev,USHORT **pUsFile,u8 **pUcFile,long word_length) {ULONG Status =STATUS_SUCCESS ;int byte_length;
@@ -789,8 +789,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLestruct drv_msg *pMailBoxData;USHORT *pUsData =NULL ;USHORT *pUsFile =NULL ; -UCHAR *pUcFile =NULL ; -UCHAR *pBootEnd =NULL , *pCodeEnd=NULL ; +u8 *pUcFile =NULL ; +u8 *pBootEnd =NULL , *pCodeEnd=NULL ;int imageN;long loader_code_address, loader_code_size =0 ;long run_address =0 , run_size =0 ;
@@ -821,9 +821,9 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeft1000_write_register (ft1000dev,0x800 ,FT1000_REG_MAG_WATERMARK ); pUsFile = (USHORT *)(pFileStart + pFileHdr5->loader_offset); - pUcFile = (UCHAR *)(pFileStart + pFileHdr5->loader_offset); + pUcFile = (u8 *)(pFileStart + pFileHdr5->loader_offset); - pBootEnd = (UCHAR *)(pFileStart + pFileHdr5->loader_code_end); + pBootEnd = (u8 *)(pFileStart + pFileHdr5->loader_code_end); loader_code_address = pFileHdr5->loader_code_address; loader_code_size = pFileHdr5->loader_code_size;
@@ -879,7 +879,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeDEBUG ("FT1000:REQUEST_DONE_BL\n" );/* Reposition ptrs to beginning of code section */ pUsFile = (USHORT *)(pBootEnd); - pUcFile = (UCHAR *)(pBootEnd); + pUcFile = (u8 *)(pBootEnd);//DEBUG("FT1000:download:pUsFile = 0x%8x\n", (int)pUsFile); //DEBUG("FT1000:download:pUcFile = 0x%8x\n", (int)pUcFile); uiState =STATE_CODE_DWNLD ;
@@ -989,7 +989,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe pft1000info->usbboot =3 ;/* Reposition ptrs to beginning of provisioning section */ pUsFile = (USHORT *)(pFileStart + pFileHdr5->commands_offset); - pUcFile = (UCHAR *)(pFileStart + pFileHdr5->commands_offset); + pUcFile = (u8 *)(pFileStart + pFileHdr5->commands_offset); uiState =STATE_DONE_DWNLD ;break ;case REQUEST_CODE_SEGMENT :
@@ -1119,8 +1119,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe bGoodVersion = TRUE;DEBUG ("FT1000:download: bGoodVersion is TRUE\n" ); pUsFile = (USHORT *)(pFileStart + pDspImageInfoV6->begin_offset); - pUcFile = (UCHAR *)(pFileStart + pDspImageInfoV6->begin_offset); - pCodeEnd = (UCHAR *)(pFileStart + pDspImageInfoV6->end_offset); + pUcFile = (u8 *)(pFileStart + pDspImageInfoV6->begin_offset); + pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset); run_address = pDspImageInfoV6->run_address; run_size = pDspImageInfoV6->image_size; image_chksum = (ULONG )pDspImageInfoV6->checksum;
@@ -1188,7 +1188,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe pprov_record->pprov_data = pbuffer;list_add_tail (&pprov_record->list, &pft1000info->prov_list);// Move to next entry if available - pUcFile = (UCHAR *)((unsigned long )pUcFile + (UINT )((usHdrLength +1 ) &0xFFFFFFFE ) +sizeof (struct pseudo_hdr )); + pUcFile = (u8 *)((unsigned long )pUcFile + (UINT )((usHdrLength +1 ) &0xFFFFFFFE ) +sizeof (struct pseudo_hdr ));if ( (unsigned long )(pUcFile) - (unsigned long )(pFileStart) >= (unsigned long )FileLength) { uiState =STATE_DONE_FILE ; }
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +3 -3
@@ -367,7 +367,7 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va//--------------------------------------------------------------------------- u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer) { -UCHAR buf[16 ]; +u8 buf[16 ];USHORT pos;u16 ret =STATUS_SUCCESS ;
@@ -419,8 +419,8 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *bUSHORT pos1;USHORT pos2;USHORT i; -UCHAR buf[32 ]; -UCHAR resultbuffer[32 ]; +u8 buf[32 ]; +u8 resultbuffer[32 ];u8 *pdata;u16 ret =STATUS_SUCCESS ;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +5 -6
@@ -98,7 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define UCHAR u8#define USHORT u16#define ULONG u32/* WTF ??? */ #define BOOLEAN u8
@@ -371,15 +370,15 @@ struct prov_record { -#define ISR_EMPTY (UCHAR)0x00 // no bits set in ISR +#define ISR_EMPTY (u8)0x00 // no bits set in ISR -#define ISR_DOORBELL_ACK (UCHAR)0x01 // the doorbell i sent has been recieved. +#define ISR_DOORBELL_ACK (u8)0x01 // the doorbell i sent has been recieved. -#define ISR_DOORBELL_PEND (UCHAR)0x02 // doorbell for me +#define ISR_DOORBELL_PEND (u8)0x02 // doorbell for me -#define ISR_RCV (UCHAR)0x04 // packet received with no errors +#define ISR_RCV (u8)0x04 // packet received with no errors -#define ISR_WATERMARK (UCHAR)0x08 // +#define ISR_WATERMARK (u8)0x08 //
Signature · 1 line
1.7.1
PATCH 3/9 staging: ft1000: GEt rid of PUSHORT typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 6 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 18 +++++++++--------- drivers/staging/ft1000/ft1000-usb/ft1000_hw.h | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 1 - 4 files changed, 13 insertions(+), 14 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +3 -3
@@ -656,7 +656,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,USHORT qtype;USHORT msgsz;struct pseudo_hdr *ppseudo_hdr; -PUSHORT pmsg; +u16 *pmsg;USHORT total_len;USHORT app_index;u16 status;
@@ -766,8 +766,8 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,// Make sure we are within the limits of the slow queue memory limitation if ( (msgsz <MAX_CMD_SQSIZE ) && (msgsz >PSEUDOSZ ) ) {// Need to put sequence number plus new checksum for message -//pmsg = (PUSHORT)&dpram_command.dpram_blk.pseudohdr; - pmsg = (PUSHORT )&dpram_data->pseudohdr; +//pmsg = (u16 *)&dpram_command.dpram_blk.pseudohdr; + pmsg = (u16 *)&dpram_data->pseudohdr; ppseudo_hdr = (struct pseudo_hdr *)pmsg; total_len = msgsz+2 ;if (total_len &0x1 ) {
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +9 -9
@@ -1209,7 +1209,7 @@ static int ft1000_copy_up_pkt (struct urb *urb)//DEBUG("ft1000_copy_up_pkt: transfer_buffer_length=%d, actual_buffer_len=%d\n", // urb->transfer_buffer_length, urb->actual_length); - chksum = (PUSHORT )ft1000dev->rx_buf; + chksum = (u16 *)ft1000dev->rx_buf; tempword = *chksum++;for (i=1 ; i<7 ; i++)
@@ -1541,7 +1541,7 @@ static int ft1000_dsp_prov(void *arg)u16 i=0 ;struct prov_record *ptr;struct pseudo_hdr *ppseudo_hdr; -PUSHORT pmsg; +u16 *pmsg;u16 status;USHORT TempShortBuf [256 ];
@@ -1579,7 +1579,7 @@ static int ft1000_dsp_prov(void *arg) len =htons (len); len +=PSEUDOSZ ; - pmsg = (PUSHORT )ptr->pprov_data; + pmsg = (u16 *)ptr->pprov_data; ppseudo_hdr = (struct pseudo_hdr *)pmsg;// Insert slow queue sequence number ppseudo_hdr->seq_num = info->squeseqnum++;
@@ -1626,7 +1626,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {struct drv_msg *pdrvmsg;u16 i;struct pseudo_hdr *ppseudo_hdr; -PUSHORT pmsg; +u16 *pmsg;u16 status;union {u8 byte[2 ];
@@ -1758,7 +1758,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { tempword =ntohs (pdrvmsg->length); info->DSPInfoBlklen = tempword;if (tempword < (MAX_DSP_SESS_REC -4 ) ) { - pmsg = (PUSHORT )&pdrvmsg->data[0 ]; + pmsg = (u16 *)&pdrvmsg->data[0 ];for (i=0 ; i<((tempword+1 )/2 ); i++) {DEBUG ("FT1000:drivermsg:dsp info data = 0x%x\n" , *pmsg); info->DSPInfoBlk[i+10 ] = *pmsg++;
@@ -1790,10 +1790,10 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {// Put message into Slow Queue // Form Pseudo header - pmsg = (PUSHORT )info->DSPInfoBlk; + pmsg = (u16 *)info->DSPInfoBlk; *pmsg++ =0 ; *pmsg++ =htons (info->DSPInfoBlklen+20 +info->DSPInfoBlklen); - ppseudo_hdr = (struct pseudo_hdr *)(PUSHORT )&info->DSPInfoBlk[2 ]; + ppseudo_hdr = (struct pseudo_hdr *)(u16 *)&info->DSPInfoBlk[2 ]; ppseudo_hdr->length =htons (info->DSPInfoBlklen+4 +info->DSPInfoBlklen); ppseudo_hdr->source =0x10 ; ppseudo_hdr->destination =0x20 ;
@@ -1840,7 +1840,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {if ( (tempword &FT1000_DB_DPRAM_TX ) ==0 ) {// Put message into Slow Queue // Form Pseudo header - pmsg = (PUSHORT )&tempbuffer[0 ]; + pmsg = (u16 *)&tempbuffer[0 ]; ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr->length =htons (0x0012 ); ppseudo_hdr->source =0x10 ;
@@ -1861,7 +1861,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {for (i=1 ; i<7 ; i++) { ppseudo_hdr->checksum ^= *pmsg++; } - pmsg = (PUSHORT )&tempbuffer[16 ]; + pmsg = (u16 *)&tempbuffer[16 ]; *pmsg++ =htons (RSP_DRV_ERR_RPT_MSG ); *pmsg++ =htons (0x000e ); *pmsg++ =htons (info->DSP_TIME[0 ]);
drivers/staging/ft1000/ft1000-usb/ft1000_hw.h +1 -1
@@ -4,7 +4,7 @@#include "ft1000_usb.h" -extern u16 ft1000_read_register (struct usb_device *dev,PUSHORT Data,u8 nRegIndx); +extern u16 ft1000_read_register (struct usb_device *dev,u16 *Data,u8 nRegIndx);extern u16 ft1000_write_register (struct usb_device *dev,USHORT value,u8 nRegIndx);#endif
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +0 -1
@@ -102,7 +102,6 @@ struct prov_record {#define ULONG u32/* WTF ??? */ #define BOOLEAN u8#define PULONG u32 * -#define PUSHORT u16 *#define PCHAR u8 *#define UINT u32
Signature · 1 line
1.7.1
PATCH 4/9 staging: ft1000: Get rid of USHORT typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 8 +- .../staging/ft1000/ft1000-usb/ft1000_download.c | 114 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 36 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.h | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 15 ++-- 6 files changed, 88 insertions(+), 89 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +4 -4
@@ -653,12 +653,12 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command, {IOCTL_DPRAM_BLK *dpram_data;//IOCTL_DPRAM_COMMAND dpram_command; -USHORT qtype; -USHORT msgsz; +u16 qtype; +u16 msgsz;struct pseudo_hdr *ppseudo_hdr;u16 *pmsg; -USHORT total_len; -USHORT app_index; +u16 total_len; +u16 app_index;u16 status;//DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_SET_DPRAM called\n");
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +57 -57
326 lines not on this page · raw message
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +18 -18
@@ -160,7 +160,7 @@ u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegInd// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_write_register (struct ft1000_device *ft1000dev,USHORT value,u16 nRegIndx) +u16 ft1000_write_register (struct ft1000_device *ft1000dev,u16 value,u16 nRegIndx) {u16 ret =STATUS_SUCCESS ;
@@ -196,7 +196,7 @@ u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRe// //--------------------------------------------------------------------------- -u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt) +u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u16 cnt) {u16 ret =STATUS_SUCCESS ;
@@ -235,7 +235,7 @@ u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt) +u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u16 cnt) {u16 ret =STATUS_SUCCESS ;
@@ -272,7 +272,7 @@ u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffe// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,u8 highlow) +u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u8 highlow) {u16 ret =STATUS_SUCCESS ;
@@ -320,7 +320,7 @@ u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer// Notes: // //--------------------------------------------------------------------------- -u16 ft1000_write_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,USHORT value,u8 highlow) +u16 ft1000_write_dpram16 (struct ft1000_device *ft1000dev,u16 indx,u16 value,u8 highlow) {u16 ret =STATUS_SUCCESS ;
@@ -365,10 +365,10 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va// Notes: // //--------------------------------------------------------------------------- -u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer) +u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer) {u8 buf[16 ]; -USHORT pos; +u16 pos;u16 ret =STATUS_SUCCESS ;//DEBUG("fix_ft1000_read_dpram32: indx: %d \n", indx);
@@ -414,11 +414,11 @@ u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *bu// Notes: // //--------------------------------------------------------------------------- -u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer) +u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer) { -USHORT pos1; -USHORT pos2; -USHORT i; +u16 pos1; +u16 pos2; +u16 i;u8 buf[32 ];u8 resultbuffer[32 ];u8 *pdata;
@@ -494,7 +494,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *bstatic void card_reset_dsp (struct ft1000_device *ft1000dev,BOOLEAN value) {u16 status =STATUS_SUCCESS ; -USHORT tempword; +u16 tempword; status =ft1000_write_register (ft1000dev,HOST_INTF_BE ,FT1000_REG_SUP_CTRL ); status =ft1000_read_register (ft1000dev, &tempword,FT1000_REG_SUP_CTRL );
@@ -593,7 +593,7 @@ void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int sizint dsp_reload (struct ft1000_device *ft1000dev) {u16 status; -USHORT tempword; +u16 tempword;ULONG templong;struct ft1000_info *pft1000info;
@@ -1543,7 +1543,7 @@ static int ft1000_dsp_prov(void *arg)struct pseudo_hdr *ppseudo_hdr;u16 *pmsg;u16 status; -USHORT TempShortBuf [256 ]; +u16 TempShortBuf [256 ];DEBUG ("*** DspProv Entered\n" );
@@ -1876,7 +1876,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { *pmsg++ = convert.wrd; *pmsg++ =htons (info->DrvErrNum); -CardSendCommand (dev, (unsigned char *)&tempbuffer[0 ], (USHORT )(0x0012 +PSEUDOSZ )); +CardSendCommand (dev, (unsigned char *)&tempbuffer[0 ], (u16)(0x0012 +PSEUDOSZ )); info->DrvErrNum =0 ; } info->DrvMsgPend =0 ;
@@ -1907,9 +1907,9 @@ int ft1000_poll(void* dev_id) {u16 status;u16 size;int i; -USHORT data; -USHORT modulo; -USHORT portid; +u16 data; +u16 modulo; +u16 portid;u16 nxtph;struct dpram_blk *pdpram_blk;struct pseudo_hdr *ppseudo_hdr;
drivers/staging/ft1000/ft1000-usb/ft1000_hw.h +1 -1
@@ -5,6 +5,6 @@#include "ft1000_usb.h" extern u16 ft1000_read_register (struct usb_device *dev,u16 *Data,u8 nRegIndx); -extern u16 ft1000_write_register (struct usb_device *dev,USHORT value,u8 nRegIndx); +extern u16 ft1000_write_register (struct usb_device *dev,u16 value,u8 nRegIndx);#endif
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +1 -1
@@ -38,7 +38,7 @@//#endif -u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx, +u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u8 highlow);
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +7 -8
@@ -98,7 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define USHORT u16#define ULONG u32/* WTF ??? */ #define BOOLEAN u8#define PULONG u32 *
@@ -561,13 +560,13 @@ struct dpram_blk { } __attribute__ ((packed));u16 ft1000_read_register (struct ft1000_device *ft1000dev,u16 * Data,u16 nRegIndx); -u16 ft1000_write_register (struct ft1000_device *ft1000dev,USHORT value,u16 nRegIndx); -u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt); -u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,USHORT cnt); -u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer,u8 highlow); -u16 ft1000_write_dpram16 (struct ft1000_device *ft1000dev,USHORT indx,USHORT value,u8 highlow); -u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer); -u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,USHORT indx,u8 *buffer); +u16 ft1000_write_register (struct ft1000_device *ft1000dev,u16 value,u16 nRegIndx); +u16 ft1000_read_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u16 cnt); +u16 ft1000_write_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u16 cnt); +u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer,u8 highlow); +u16 ft1000_write_dpram16 (struct ft1000_device *ft1000dev,u16 indx,u16 value,u8 highlow); +u16 fix_ft1000_read_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer); +u16 fix_ft1000_write_dpram32 (struct ft1000_device *ft1000dev,u16 indx,u8 *buffer);extern void *pFileStart;extern size_t FileLength;
Signature · 1 line
1.7.1
PATCH 5/9 staging: ft1000: Get rid of PULONG typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +0 -1
@@ -100,7 +100,6 @@ struct prov_record {#define ULONG u32/* WTF ??? */ #define BOOLEAN u8 -#define PULONG u32 *#define PCHAR u8 *#define UINT u32
Signature · 1 line
1.7.1
PATCH 6/9 staging: ft1000: Get rid of ULONG typedef usage.
In reply to Marek Belisko--- .../staging/ft1000/ft1000-usb/ft1000_download.c | 52 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 3 +- 3 files changed, 28 insertions(+), 29 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +26 -26
@@ -123,11 +123,11 @@ struct dsp_image_info {// Notes: // //--------------------------------------------------------------------------- -static ULONG check_usb_db (struct ft1000_device *ft1000dev) +static u32 check_usb_db (struct ft1000_device *ft1000dev) {int loopcnt;u16 temp; -ULONG status; +u32 status; loopcnt =0 ;while (loopcnt <10 )
@@ -204,7 +204,7 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value) {u16 handshake;int loopcnt; -ULONG status=0 ; +u32 status=0 ;struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net); loopcnt =0 ;
@@ -271,13 +271,13 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value)//--------------------------------------------------------------------------- static void put_handshake (struct ft1000_device *ft1000dev,u16 handshake_value) { -ULONG tempx; +u32 tempx;u16 tempword; -ULONG status; +u32 status; - tempx = (ULONG )handshake_value; + tempx = (u32 )handshake_value; tempx =ntohl (tempx); tempword = (u16)(tempx &0xffff );
@@ -292,7 +292,7 @@ static u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_valueu16 handshake;int loopcnt;u16 temp; -ULONG status=0 ; +u32 status=0 ;struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net); loopcnt =0 ;
@@ -349,9 +349,9 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_valustatic u16 get_request_type (struct ft1000_device *ft1000dev) {u16 request_type; -ULONG status; +u32 status;u16 tempword; -ULONG tempx; +u32 tempx;struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);if ( pft1000info->bootmode ==1 )
@@ -377,9 +377,9 @@ static u16 get_request_type(struct ft1000_device *ft1000dev)static u16 get_request_type_usb (struct ft1000_device *ft1000dev) {u16 request_type; -ULONG status; +u32 status;u16 tempword; -ULONG tempx; +u32 tempx;struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);if ( pft1000info->bootmode ==1 ) {
@@ -420,9 +420,9 @@ static u16 get_request_type_usb(struct ft1000_device *ft1000dev)//--------------------------------------------------------------------------- static long get_request_value (struct ft1000_device *ft1000dev) { -ULONG value; +u32 value;u16 tempword; -ULONG status; +u32 status;struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);
@@ -449,9 +449,9 @@ static long get_request_value(struct ft1000_device *ft1000dev)#if 0 static long get_request_value_usb (struct ft1000_device *ft1000dev) { -ULONG value; +u32 value;u16 tempword; -ULONG status; +u32 status;struct ft1000_info * pft1000info =netdev_priv (ft1000dev->net);if (pft1000info->usbboot ==2 ) {
@@ -490,8 +490,8 @@ static long get_request_value_usb(struct ft1000_device *ft1000dev)//--------------------------------------------------------------------------- static void put_request_value (struct ft1000_device *ft1000dev,long lvalue) { -ULONG tempx; -ULONG status; +u32 tempx; +u32 status; tempx =ntohl (lvalue); status =fix_ft1000_write_dpram32 (ft1000dev,DWNLD_MAG1_SIZE_LOC , (u8 *)&tempx);
@@ -546,9 +546,9 @@ static u16 hdr_checksum(struct pseudo_hdr *pHdr)// Notes: // //--------------------------------------------------------------------------- -static ULONG write_blk (struct ft1000_device *ft1000dev,u16 **pUsFile,u8 **pUcFile,long word_length) +static u32 write_blk (struct ft1000_device *ft1000dev,u16 **pUsFile,u8 **pUcFile,long word_length) { -ULONG Status =STATUS_SUCCESS ; +u32 Status =STATUS_SUCCESS ;u16 dpram;long temp_word_length;int loopcnt, i, j;
@@ -702,9 +702,9 @@ static void usb_dnld_complete (struct urb *urb)// Notes: // //--------------------------------------------------------------------------- -static ULONG write_blk_fifo (struct ft1000_device *ft1000dev,u16 **pUsFile,u8 **pUcFile,long word_length) +static u32 write_blk_fifo (struct ft1000_device *ft1000dev,u16 **pUsFile,u8 **pUcFile,long word_length) { -ULONG Status =STATUS_SUCCESS ; +u32 Status =STATUS_SUCCESS ;int byte_length;long aligncnt;
@@ -770,7 +770,7 @@ static ULONG write_blk_fifo (struct ft1000_device *ft1000dev, u16 **pUsFile, u8// Returns: status - return code //--------------------------------------------------------------------------- -u16 scram_dnldr (struct ft1000_device *ft1000dev,void *pFileStart,ULONG FileLength) +u16 scram_dnldr (struct ft1000_device *ft1000dev,void *pFileStart,u32 FileLength) {u16 Status =STATUS_SUCCESS ;UINT uiState;
@@ -795,8 +795,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLelong loader_code_address, loader_code_size =0 ;long run_address =0 , run_size =0 ; -ULONG templong; -ULONG image_chksum =0 ; +u32 templong; +u32 image_chksum =0 ;u16 dpram =0 ;u8 *pbuffer;
@@ -1114,7 +1114,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe templong = temp; temp = (u16)(pDspImageInfoV6->version >>16 ); templong |= (temp <<16 ); -if (templong == (ULONG )requested_version) +if (templong == (u32 )requested_version) { bGoodVersion = TRUE;DEBUG ("FT1000:download: bGoodVersion is TRUE\n" );
@@ -1123,7 +1123,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset); run_address = pDspImageInfoV6->run_address; run_size = pDspImageInfoV6->image_size; - image_chksum = (ULONG )pDspImageInfoV6->checksum; + image_chksum = (u32 )pDspImageInfoV6->checksum;break ; } pDspImageInfoV6++;
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +1 -1
@@ -594,7 +594,7 @@ int dsp_reload(struct ft1000_device *ft1000dev) {u16 status;u16 tempword; -ULONG templong; +u32 templong;struct ft1000_info *pft1000info;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +1 -2
@@ -98,7 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define ULONG u32/* WTF ??? */ #define BOOLEAN u8#define PCHAR u8 *#define UINT u32
@@ -572,7 +571,7 @@ extern size_t FileLength;extern int numofmsgbuf;int ft1000_close (struct net_device *dev); -u16 scram_dnldr (struct ft1000_device *ft1000dev,void *pFileStart,ULONG FileLength); +u16 scram_dnldr (struct ft1000_device *ft1000dev,void *pFileStart,u32 FileLength);extern struct list_head freercvpool;extern spinlock_t free_buff_lock;// lock to arbitrate free buffer list for receive command data
Signature · 1 line
1.7.1
PATCH 7/9 staging: ft1000: Get rid of BOOLEAN typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 2 +- .../staging/ft1000/ft1000-usb/ft1000_download.c | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 4 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 7 +++---- 5 files changed, 8 insertions(+), 9 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +1 -1
@@ -64,7 +64,7 @@ spinlock_t free_buff_lock;int numofmsgbuf =0 ;// Global variable to indicate that all provisioning data is sent to DSP -//BOOLEAN fProvComplete; +//u8 fProvComplete; // // Table of entry-point routines for char device
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +1 -1
@@ -785,7 +785,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u32 FileLengstruct dsp_file_hdr *pFileHdr5;struct dsp_image_info *pDspImageInfoV6 =NULL ;long requested_version; -BOOLEAN bGoodVersion; +u8 bGoodVersion;struct drv_msg *pMailBoxData;u16 *pUsData =NULL ;u16 *pUsFile =NULL ;
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +2 -2
@@ -491,7 +491,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buff// // Returns: None //----------------------------------------------------------------------- -static void card_reset_dsp (struct ft1000_device *ft1000dev,BOOLEAN value) +static void card_reset_dsp (struct ft1000_device *ft1000dev,u8 value) {u16 status =STATUS_SUCCESS ;u16 tempword;
@@ -1479,7 +1479,7 @@ static int ft1000_chkcard (struct ft1000_device *dev) {// = 1 (successful) // //--------------------------------------------------------------------------- -static BOOLEAN ft1000_receive_cmd (struct ft1000_device *dev,u16 *pbuffer,int maxsz,u16 *pnxtph) { +static u8 ft1000_receive_cmd (struct ft1000_device *dev,u16 *pbuffer,int maxsz,u16 *pnxtph) {u16 size, ret;u16 *ppseudohdr;int i;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +1 -1
@@ -36,7 +36,7 @@ static struct usb_device_id id_table[] = {MODULE_DEVICE_TABLE (usb, id_table); -static BOOLEAN gPollingfailed = FALSE; +static u8 gPollingfailed = FALSE;int ft1000_poll_thread (void *arg) {int ret =STATUS_SUCCESS ;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +3 -4
@@ -98,7 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define BOOLEAN u8#define PCHAR u8 *#define UINT u32
@@ -488,9 +487,9 @@ struct ft1000_info {unsigned char usbboot;unsigned short dspalive;u16 ASIC_ID ; -BOOLEAN fProvComplete; -BOOLEAN fCondResetPend; -BOOLEAN fAppMsgPend; +u8 fProvComplete; +u8 fCondResetPend; +u8 fAppMsgPend;char *pfwimg;int fwimgsz;u16 DrvErrNum;
Signature · 1 line
1.7.1
Re: [PATCH 7/9] staging: ft1000: Get rid of BOOLEAN typedef usage.
drivers/staging/ft1000/ft1000-usb/ft1000_download.c u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u32 FileLeng · line 788
Quoted 2 lines · Marek Belisko
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +1
-1-BOOLEAN bGoodVersion; +u8 bGoodVersion;
Please use the bool type instead of u8. Might as well do FALSE/TRUE -> false/true while you are at it :)
Cheers,
Brandon
Re: [PATCH 7/9] staging: ft1000: Get rid of BOOLEAN typedef usage.
Quoted 6 lines · Brandon Philips
Quoted 2 lines · Marek Belisko
- BOOLEAN bGoodVersion;
+ u8 bGoodVersion;Please use the bool type instead of u8. Might as well do FALSE/TRUE -> false/true while you are at it :)
Thanks for comment. Already send patch v2.
Quoted 5 lines
Cheers,
Brandon
BR,
marek
Signature · 10 lines
as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com
PATCH 8/9 staging: ft1000: Get rid of PCHAR typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 1 - 2 files changed, 1 insertions(+), 2 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +1 -1
@@ -726,7 +726,7 @@ static int ft1000_reset_card (struct net_device *dev)// Initialize DSP heartbeat area to ho ft1000_write_dpram16 (ft1000dev,FT1000_MAG_HI_HO , ho_mag,FT1000_MAG_HI_HO_INDX ); -ft1000_read_dpram16 (ft1000dev,FT1000_MAG_HI_HO , (PCHAR )&tempword,FT1000_MAG_HI_HO_INDX ); +ft1000_read_dpram16 (ft1000dev,FT1000_MAG_HI_HO , (u8 *)&tempword,FT1000_MAG_HI_HO_INDX );DEBUG ("ft1000_hw:ft1000_reset_card:hi_ho value = 0x%x\n" , tempword);
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +0 -1
@@ -98,7 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define PCHAR u8 *#define UINT u32#define FALSE 0
Signature · 1 line
1.7.1
PATCH 9/9 staging: ft1000: Get rid of UINT typedef usage.
In reply to Marek Belisko--- .../staging/ft1000/ft1000-usb/ft1000_download.c | 6 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +3 -3
@@ -773,7 +773,7 @@ static u32 write_blk_fifo (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **u16 scram_dnldr (struct ft1000_device *ft1000dev,void *pFileStart,u32 FileLength) {u16 Status =STATUS_SUCCESS ; -UINT uiState; +u32 uiState;u16 handshake;struct pseudo_hdr *pHdr;u16 usHdrLength;
@@ -1181,14 +1181,14 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u32 FileLeng// Get buffer for provisioning data pbuffer =kmalloc ((usHdrLength +sizeof (struct pseudo_hdr )),GFP_ATOMIC );if (pbuffer) { -memcpy (pbuffer, (void *)pUcFile, (UINT )(usHdrLength +sizeof (struct pseudo_hdr ))); +memcpy (pbuffer, (void *)pUcFile, (u32)(usHdrLength +sizeof (struct pseudo_hdr )));// link provisioning data pprov_record =kmalloc (sizeof (struct prov_record ),GFP_ATOMIC );if (pprov_record) { pprov_record->pprov_data = pbuffer;list_add_tail (&pprov_record->list, &pft1000info->prov_list);// Move to next entry if available - pUcFile = (u8 *)((unsigned long )pUcFile + (UINT )((usHdrLength +1 ) &0xFFFFFFFE ) +sizeof (struct pseudo_hdr )); + pUcFile = (u8 *)((unsigned long )pUcFile + (u32)((usHdrLength +1 ) &0xFFFFFFFE ) +sizeof (struct pseudo_hdr ));if ( (unsigned long )(pUcFile) - (unsigned long )(pFileStart) >= (unsigned long )FileLength) { uiState =STATE_DONE_FILE ; }
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +0 -2
@@ -98,8 +98,6 @@ struct prov_record {/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) -#define UINT u32 -#define FALSE 0#define TRUE 1
Signature · 1 line
1.7.1