staging:ft1000: Remove MEDIAMSG typedef usage.
PATCH 1/7 staging:ft1000: Remove MEDIAMSG typedef usage.
--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 4 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +2 -2
@@ -1836,7 +1836,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {FT1000_INFO *info = (FT1000_INFO *)netdev_priv (dev->net);u16 msgtype;u16 tempword; -PMEDIAMSG pmediamsg; +struct media_msg *pmediamsg;PDSPINITMSG pdspinitmsg;PDRVMSG pdrvmsg;u16 i;
@@ -1879,7 +1879,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {case MEDIA_STATE : {DEBUG ("ft1000_proc_drvmsg:Command message type = MEDIA_STATE" ); - pmediamsg = (PMEDIAMSG )&cmdbuffer[0 ]; + pmediamsg = (struct media_msg *)&cmdbuffer[0 ];if (info->ProgConStat !=0xFF ) {if (pmediamsg->state) {DEBUG ("Media is up\n" );
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +2 -3
@@ -51,7 +51,7 @@ -typedef struct _MEDIAMSG { +struct media_msg {PSEUDO_HDR pseudo;u16 type;u16 length;
@@ -61,7 +61,7 @@ typedef struct _MEDIAMSG {u32 gateway;u32 dns_1;u32 dns_2; -} __attribute__ ((packed)) MEDIAMSG, *PMEDIAMSG; +} __attribute__ ((packed)); typedef struct _DSPINITMSG { PSEUDO_HDR pseudo;
@@ -97,7 +97,6 @@ typedef struct _PROV_RECORD { }PROV_RECORD , *PPROV_RECORD ;/*end of Jim*/ - #define DEBUG(args...) printk(KERN_INFO args)#define UCHAR u8
Signature · 1 line
1.7.1
PATCH 2/7 staging:ft1000: Remove DSPINITMSG typedef usage.
--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 6 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +3 -3
@@ -1837,7 +1837,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {u16 msgtype;u16 tempword;struct media_msg *pmediamsg; -PDSPINITMSG pdspinitmsg; +struct dsp_init_msg *pdspinitmsg;PDRVMSG pdrvmsg;u16 i;PPSEUDO_HDR ppseudo_hdr;
@@ -1924,7 +1924,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {case DSP_INIT_MSG : {DEBUG ("ft1000_proc_drvmsg:Command message type = DSP_INIT_MSG" ); - pdspinitmsg = (PDSPINITMSG )&cmdbuffer[2 ]; + pdspinitmsg = (struct dsp_init_msg *)&cmdbuffer[2 ];memcpy (info->DspVer, pdspinitmsg->DspVer,DSPVERSZ );DEBUG ("DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n" , info->DspVer[0 ], info->DspVer[1 ], info->DspVer[2 ], info->DspVer[3 ]);memcpy (info->HwSerNum, pdspinitmsg->HwSerNum,HWSERNUMSZ );
@@ -1938,7 +1938,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { dev->net->dev_addr[4 ] = info->eui64[6 ]; dev->net->dev_addr[5 ] = info->eui64[7 ]; -if (ntohs (pdspinitmsg->length) == (sizeof (DSPINITMSG ) -20 ) ) { +if (ntohs (pdspinitmsg->length) == (sizeof (struct dsp_init_msg ) -20 )) {memcpy (info->ProductMode, pdspinitmsg->ProductMode,MODESZ );memcpy (info->RfCalVer, pdspinitmsg->RfCalVer,CALVERSZ );memcpy (info->RfCalDate, pdspinitmsg->RfCalDate,CALDATESZ );
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +12 -12
@@ -63,18 +63,18 @@ struct media_msg {u32 dns_2; } __attribute__ ((packed)); -typedef struct _DSPINITMSG { -PSEUDO_HDR pseudo; -u16 type; -u16 length; -u8 DspVer[DSPVERSZ ];// DSP version number -u8 HwSerNum[HWSERNUMSZ ];// Hardware Serial Number -u8 Sku[SKUSZ ];// SKU -u8 eui64[EUISZ ];// EUI64 -u8 ProductMode[MODESZ ];// Product Mode (Market/Production) -u8 RfCalVer[CALVERSZ ];// Rf Calibration version -u8 RfCalDate[CALDATESZ ];// Rf Calibration date -} __attribute__ ((packed))DSPINITMSG , *PDSPINITMSG ; +struct dsp_init_msg { +PSEUDO_HDR pseudo; +u16 type; +u16 length; +u8 DspVer[DSPVERSZ ];// DSP version number +u8 HwSerNum[HWSERNUMSZ ];// Hardware Serial Number +u8 Sku[SKUSZ ];// SKU +u8 eui64[EUISZ ];// EUI64 +u8 ProductMode[MODESZ ];// Product Mode (Market/Production) +u8 RfCalVer[CALVERSZ ];// Rf Calibration version +u8 RfCalDate[CALDATESZ ];// Rf Calibration date +} __attribute__ ((packed)); typedef struct _APP_INFO_BLOCK
Signature · 1 line
1.7.1
PATCH 3/7 staging:ft1000: Remove APP_INFO_BLOCK typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 27 +++++++++++------------ 1 files changed, 13 insertions(+), 14 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +13 -14
@@ -77,19 +77,18 @@ struct dsp_init_msg { } __attribute__ ((packed)); -typedef struct _APP_INFO_BLOCK -{ -u32 nTxMsg;// DPRAM msg sent to DSP with app_id -u32 nRxMsg;// DPRAM msg rcv from dsp with app_id -u32 nTxMsgReject;// DPRAM msg rejected due to DSP doorbell set -u32 nRxMsgMiss;// DPRAM msg dropped due to overflow -struct fown_struct *fileobject;// Application's file object -u16 app_id;// Application id -int DspBCMsgFlag; -int NumOfMsg;// number of messages queued up -wait_queue_head_t wait_dpram_msg; -struct list_head app_sqlist;// link list of msgs for applicaton on slow queue -}APP_INFO_BLOCK , *PAPP_INFO_BLOCK ; +struct app_info_block { +u32 nTxMsg;// DPRAM msg sent to DSP with app_id +u32 nRxMsg;// DPRAM msg rcv from dsp with app_id +u32 nTxMsgReject;// DPRAM msg rejected due to DSP doorbell set +u32 nRxMsgMiss;// DPRAM msg dropped due to overflow +struct fown_struct *fileobject;// Application's file object +u16 app_id;// Application id +int DspBCMsgFlag; +int NumOfMsg;// number of messages queued up +wait_queue_head_t wait_dpram_msg; +struct list_head app_sqlist;// link list of msgs for applicaton on slow queue +} __attribute__((packed)); typedef struct _PROV_RECORD { struct list_head list;
@@ -582,7 +581,7 @@ typedef struct _FT1000_INFO {u16 ProgConStat;struct list_head prov_list;int appcnt; -APP_INFO_BLOCK app_info[MAX_NUM_APP ];//Added by Jim +struct app_info_block app_info[MAX_NUM_APP ];u16 DSPInfoBlklen;u16 DrvMsgPend;int (*ft1000_reset)(struct net_device *dev);
Signature · 1 line
1.7.1
PATCH 4/7 staging:ft1000: Remove PROV_RECORD typedef usage.
In reply to Marek Belisko--- .../staging/ft1000/ft1000-usb/ft1000_download.c | 5 ++--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 8 ++++---- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +2 -3
@@ -777,7 +777,6 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeUSHORT handshake;PPSEUDO_HDR pHdr;USHORT usHdrLength; -//PPROV_RECORD pProvRecord; long word_length;USHORT request;USHORT temp;
@@ -801,7 +800,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeUSHORT dpram =0 ;PUCHAR pbuffer; -PPROV_RECORD pprov_record; +struct prov_record *pprov_record;FT1000_INFO *pft1000info =netdev_priv (ft1000dev->net);DEBUG ("Entered scram_dnldr...\n" );
@@ -1184,7 +1183,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeif (pbuffer) {memcpy (pbuffer, (void *)pUcFile, (UINT )(usHdrLength +sizeof (PSEUDO_HDR )));// link provisioning data - pprov_record =kmalloc (sizeof (PROV_RECORD ),GFP_ATOMIC ); + 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);
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +4 -4
@@ -722,7 +722,7 @@ static int ft1000_reset_card (struct net_device *dev)FT1000_INFO *info =netdev_priv (dev);struct ft1000_device *ft1000dev = info->pFt1000Dev;u16 tempword; -PPROV_RECORD ptr; +struct prov_record *ptr;DEBUG ("ft1000_hw:ft1000_reset_card called.....\n" );
@@ -733,7 +733,7 @@ static int ft1000_reset_card (struct net_device *dev)// Make sure we free any memory reserve for provisioning while (list_empty (&info->prov_list) ==0 ) {DEBUG ("ft1000_hw:ft1000_reset_card:deleting provisioning record\n" ); - ptr =list_entry (info->prov_list.next,PROV_RECORD , list); + ptr = list_entry(info->prov_list.next, struct prov_record, list);list_del (&ptr->list);kfree (ptr->pprov_data);kfree (ptr);
@@ -1754,7 +1754,7 @@ static int ft1000_dsp_prov(void *arg)u16 tempword;u16 len;u16 i=0 ; -PPROV_RECORD ptr; +struct prov_record *ptr;PPSEUDO_HDR ppseudo_hdr;PUSHORT pmsg;u16 status;
@@ -1789,7 +1789,7 @@ static int ft1000_dsp_prov(void *arg)DEBUG ("*** Provision Data Sent to DSP\n" );// Send provisioning data - ptr =list_entry (info->prov_list.next,PROV_RECORD , list); + ptr = list_entry(info->prov_list.next, struct prov_record, list); len = *(u16 *)ptr->pprov_data; len =htons (len); len +=PSEUDOSZ ;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +4 -4
@@ -90,10 +90,10 @@ struct app_info_block {struct list_head app_sqlist;// link list of msgs for applicaton on slow queue } __attribute__((packed)); -typedef struct _PROV_RECORD { -struct list_head list; -u8 *pprov_data; -}PROV_RECORD , *PPROV_RECORD ; +struct prov_record { +struct list_head list; +u8 *pprov_data; +};/*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args)
Signature · 1 line
1.7.1
PATCH 5/7 staging:ft1000: Remove PSEUDO_HDR typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 6 +- .../staging/ft1000/ft1000-usb/ft1000_download.c | 14 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 22 +++++----- drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | 7 +-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 41 +------------------ 5 files changed, 27 insertions(+), 63 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +3 -3
@@ -655,7 +655,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,//IOCTL_DPRAM_COMMAND dpram_command; USHORT qtype;USHORT msgsz; -PPSEUDO_HDR ppseudo_hdr; +struct pseudo_hdr *ppseudo_hdr;PUSHORT pmsg;USHORT total_len;USHORT app_index;
@@ -768,7 +768,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,// Need to put sequence number plus new checksum for message //pmsg = (PUSHORT)&dpram_command.dpram_blk.pseudohdr; pmsg = (PUSHORT )&dpram_data->pseudohdr; - ppseudo_hdr = (PPSEUDO_HDR )pmsg; + ppseudo_hdr = (struct pseudo_hdr *)pmsg; total_len = msgsz+2 ;if (total_len &0x1 ) { total_len++;
@@ -785,7 +785,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,//DEBUG("checksum = 0x%x\n", ppseudo_hdr->checksum); } pmsg++; - ppseudo_hdr = (PPSEUDO_HDR )pmsg; + ppseudo_hdr = (struct pseudo_hdr *)pmsg;#if 0 ptr = dpram_data;DEBUG ("FT1000:ft1000_ChIoctl: Command Send\n" );
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +7 -7
@@ -507,7 +507,7 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue)//--------------------------------------------------------------------------- // Function: hdr_checksum // -// Parameters: PPSEUDO_HDR pHdr - Pseudo header pointer +// Parameters: struct pseudo_hdr *pHdr - Pseudo header pointer // // Returns: checksum - success //
@@ -516,7 +516,7 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue)// Notes: // //--------------------------------------------------------------------------- -static USHORT hdr_checksum (PPSEUDO_HDR pHdr) +static USHORT hdr_checksum (struct pseudo_hdr *pHdr) {USHORT *usPtr = (USHORT *)pHdr;USHORT chksum;
@@ -775,7 +775,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeu16 Status =STATUS_SUCCESS ;UINT uiState;USHORT handshake; -PPSEUDO_HDR pHdr; +struct pseudo_hdr *pHdr;USHORT usHdrLength;long word_length;USHORT request;
@@ -1167,7 +1167,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLecase STATE_SECTION_PROV :DEBUG ("FT1000:download:STATE_SECTION_PROV\n" ); - pHdr = (PPSEUDO_HDR )pUcFile; + pHdr = (struct pseudo_hdr *)pUcFile;if (pHdr->checksum ==hdr_checksum (pHdr)) {
@@ -1179,16 +1179,16 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe usHdrLength =ntohs (pHdr->length);/* Byte length for PROV records */ // Get buffer for provisioning data - pbuffer =kmalloc ( (usHdrLength +sizeof (PSEUDO_HDR ) ),GFP_ATOMIC ); + pbuffer =kmalloc ((usHdrLength +sizeof (struct pseudo_hdr )),GFP_ATOMIC );if (pbuffer) { -memcpy (pbuffer, (void *)pUcFile, (UINT )(usHdrLength +sizeof (PSEUDO_HDR ))); +memcpy (pbuffer, (void *)pUcFile, (UINT )(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 = (UCHAR *)((unsigned long )pUcFile + (UINT )((usHdrLength +1 ) &0xFFFFFFFE ) +sizeof (PSEUDO_HDR )); + pUcFile = (UCHAR *)((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 +11 -11
@@ -1237,7 +1237,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)//DEBUG("ft1000_copy_down_pkt() entered, len = %d\n", len); - count =sizeof (PSEUDO_HDR ) + len; + count =sizeof (struct pseudo_hdr ) + len;if (count >MAX_BUF_SIZE ) {DEBUG ("Error:ft1000_copy_down_pkt:Message Size Overflow!\n" );
@@ -1263,7 +1263,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len) checksum ^= *pTemp ++; } *pTemp++ = checksum; -memcpy (&(pFt1000Dev->tx_buf[sizeof (PSEUDO_HDR )]), packet, len); +memcpy (&(pFt1000Dev->tx_buf[sizeof (struct pseudo_hdr )]), packet, len);netif_stop_queue (netdev);
@@ -1476,7 +1476,7 @@ static int ft1000_copy_up_pkt (struct urb *urb) -memcpy (pbuffer, ft1000dev->rx_buf+sizeof (PSEUDO_HDR ), len-sizeof (PSEUDO_HDR )); +memcpy (pbuffer, ft1000dev->rx_buf+sizeof (struct pseudo_hdr ), len-sizeof (struct pseudo_hdr ));//DEBUG("ft1000_copy_up_pkt: Data passed to Protocol layer\n"); /*for (i=0; i<len+12; i++)
@@ -1755,7 +1755,7 @@ static int ft1000_dsp_prov(void *arg)u16 len;u16 i=0 ;struct prov_record *ptr; -PPSEUDO_HDR ppseudo_hdr; +struct pseudo_hdr *ppseudo_hdr;PUSHORT pmsg;u16 status;USHORT TempShortBuf [256 ];
@@ -1795,7 +1795,7 @@ static int ft1000_dsp_prov(void *arg) len +=PSEUDOSZ ; pmsg = (PUSHORT )ptr->pprov_data; - ppseudo_hdr = (PPSEUDO_HDR )pmsg; + ppseudo_hdr = (struct pseudo_hdr *)pmsg;// Insert slow queue sequence number ppseudo_hdr->seq_num = info->squeseqnum++; ppseudo_hdr->portsrc =0 ;
@@ -1840,7 +1840,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {struct dsp_init_msg *pdspinitmsg;PDRVMSG pdrvmsg;u16 i; -PPSEUDO_HDR ppseudo_hdr; +struct pseudo_hdr *ppseudo_hdr;PUSHORT pmsg;u16 status;union {
@@ -2008,7 +2008,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { pmsg = (PUSHORT )info->DSPInfoBlk; *pmsg++ =0 ; *pmsg++ =htons (info->DSPInfoBlklen+20 +info->DSPInfoBlklen); - ppseudo_hdr = (PPSEUDO_HDR )(PUSHORT )&info->DSPInfoBlk[2 ]; + ppseudo_hdr = (struct pseudo_hdr *)(PUSHORT )&info->DSPInfoBlk[2 ]; ppseudo_hdr->length =htons (info->DSPInfoBlklen+4 +info->DSPInfoBlklen); ppseudo_hdr->source =0x10 ; ppseudo_hdr->destination =0x20 ;
@@ -2056,7 +2056,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {// Put message into Slow Queue // Form Pseudo header pmsg = (PUSHORT )&tempbuffer[0 ]; - ppseudo_hdr = (PPSEUDO_HDR )pmsg; + ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr->length =htons (0x0012 ); ppseudo_hdr->source =0x10 ; ppseudo_hdr->destination =0x20 ;
@@ -2127,7 +2127,7 @@ int ft1000_poll(void* dev_id) {USHORT portid;u16 nxtph;struct dpram_blk *pdpram_blk; -PPSEUDO_HDR ppseudo_hdr; +struct pseudo_hdr *ppseudo_hdr;unsigned long flags;//DEBUG("Enter ft1000_poll...\n");
@@ -2180,7 +2180,7 @@ int ft1000_poll(void* dev_id) { pdpram_blk =ft1000_get_buffer (&freercvpool);if (pdpram_blk !=NULL ) {if (ft1000_receive_cmd (dev, pdpram_blk->pbuffer,MAX_CMD_SQSIZE , &nxtph) ) { - ppseudo_hdr = (PPSEUDO_HDR )pdpram_blk->pbuffer; + ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;// Put message into the appropriate application block info->app_info[i].nRxMsg++;spin_lock_irqsave (&free_buff_lock, flags);
@@ -2210,7 +2210,7 @@ int ft1000_poll(void* dev_id) {//DEBUG("Memory allocated = 0x%8x\n", (u32)pdpram_blk); if (pdpram_blk !=NULL ) {if (ft1000_receive_cmd (dev, pdpram_blk->pbuffer,MAX_CMD_SQSIZE , &nxtph) ) { - ppseudo_hdr = (PPSEUDO_HDR )pdpram_blk->pbuffer; + ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;// Search for correct application block for (i=0 ; i<MAX_NUM_APP ; i++) {if (info->app_info[i].app_id == ppseudo_hdr->portdest) {
drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h +3 -4
@@ -36,8 +36,7 @@#define MAX_DNLD_BLKSZ 1024// Standard Flarion Pseudo header -typedef struct _PSEUDO_HDR -{ +struct pseudo_hdr {unsigned short length;//length of msg body unsigned char source;//source address (0x10=Host 0x20=DSP) unsigned char destination;//destination address (refer to source address)
@@ -57,7 +56,7 @@ typedef struct _PSEUDO_HDRunsigned char rsvd2;//reserved unsigned short qos_class;//Quality of Service class (Not applicable on Mobile) unsigned short checksum;//Psuedo header checksum -} __attribute__ ((packed)) PSEUDO_HDR, *PPSEUDO_HDR; +} __attribute__ ((packed)); typedef struct _IOCTL_GET_VER {
@@ -106,7 +105,7 @@ typedef struct _IOCTL_GET_DSP_STATtypedef struct _IOCTL_DPRAM_BLK {unsigned short total_len; -PSEUDO_HDR pseudohdr; +struct pseudo_hdr pseudohdr;unsigned char buffer[1780 ]; } __attribute__ ((packed))IOCTL_DPRAM_BLK , *PIOCTL_DPRAM_BLK ;
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +3 -38
60 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 6/7 staging:ft1000: Remove DRVMGS typedef usage.
In reply to Marek Belisko--- .../staging/ft1000/ft1000-usb/ft1000_download.c | 4 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 4 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +2 -2
@@ -786,7 +786,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLestruct dsp_image_info *pDspImageInfoV6 =NULL ;long requested_version;BOOLEAN bGoodVersion; -PDRVMSG pMailBoxData; +struct drv_msg *pMailBoxData;USHORT *pUsData =NULL ;USHORT *pUsFile =NULL ;UCHAR *pUcFile =NULL ;
@@ -1047,7 +1047,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe// Convert length from byte count to word count. Make sure we round up. word_length = (long )(pft1000info->DSPInfoBlklen +1 )/2 ;put_request_value (ft1000dev, word_length); - pMailBoxData = (PDRVMSG )&(pft1000info->DSPInfoBlk[0 ]); + pMailBoxData = (struct drv_msg *)&(pft1000info->DSPInfoBlk[0 ]);/* * Position ASIC DPRAM auto-increment pointer. */
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +2 -2
@@ -1838,7 +1838,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {u16 tempword;struct media_msg *pmediamsg;struct dsp_init_msg *pdspinitmsg; -PDRVMSG pdrvmsg; +struct drv_msg *pdrvmsg;u16 i;struct pseudo_hdr *ppseudo_hdr;PUSHORT pmsg;
@@ -1872,7 +1872,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { } }#endif - pdrvmsg = (PDRVMSG )&cmdbuffer[2 ]; + pdrvmsg = (struct drv_msg *)&cmdbuffer[2 ]; msgtype =ntohs (pdrvmsg->type);DEBUG ("ft1000_proc_drvmsg:Command message type = 0x%x\n" , msgtype);switch (msgtype) {
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +5 -5
@@ -455,12 +455,12 @@ struct prov_record {#define MAX_BUF_SIZE 4096 -typedef struct _DRVMSG { +struct drv_msg {struct pseudo_hdr pseudo; -u16 type; -u16 length; -u8 data[0 ]; -} __attribute__ ((packed))DRVMSG , *PDRVMSG ; +u16 type; +u16 length; +u8 data[0 ]; +} __attribute__ ((packed));struct ft1000_device {
Signature · 1 line
1.7.1
PATCH 7/7 staging:ft1000: Remove FT1000_INFO typedef usage.
In reply to Marek Belisko--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++------- .../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++---- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +- 6 files changed, 57 insertions(+), 57 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +14 -14
@@ -95,7 +95,7 @@ static struct file_operations ft1000fops =//--------------------------------------------------------------------------- static int exec_mknod (void *pdata) { -PFT1000_INFO info; +struct ft1000_info *info;char mjnum[4 ];char minornum[4 ];char temp[32 ];
@@ -137,13 +137,13 @@ static int exec_mknod (void *pdata)static int rm_mknod (void *pdata) { -PFT1000_INFO info; +struct ft1000_info *info;//char *argv[4]={"rm", "-f", "/dev/FT1000", NULL}; int retcode;char temp[32 ];char *argv[]={"rm" ,"-f" , temp,NULL }; - info = (PFT1000_INFO )pdata; + info = (struct ft1000_info *)pdata;DEBUG ("ft1000_chdev:rm_mknod is called for device %s\n" , info->DeviceName);sprintf (temp,"%s%s" ,"/dev/" , info->DeviceName) ;
@@ -235,7 +235,7 @@ void ft1000_free_buffer (struct dpram_blk *pdpram_blk, struct list_head *plist)//--------------------------------------------------------------------------- int ft1000_CreateDevice (struct ft1000_device *dev) { -PFT1000_INFO info =netdev_priv (dev->net); +struct ft1000_info *info =netdev_priv (dev->net);int result;int i;pid_t pid;
@@ -349,7 +349,7 @@ int ft1000_CreateDevice(struct ft1000_device *dev)//--------------------------------------------------------------------------- void ft1000_DestroyDevice (struct net_device *dev) { -PFT1000_INFO info =netdev_priv (dev); +struct ft1000_info *info =netdev_priv (dev);int result =0 ;pid_t pid;int i;
@@ -412,7 +412,7 @@ void ft1000_DestroyDevice(struct net_device *dev)//--------------------------------------------------------------------------- static int ft1000_ChOpen (struct inode *Inode,struct file *File) { -PFT1000_INFO info; +struct ft1000_info *info;int i,num;DEBUG ("ft1000_ChOpen called\n" );
@@ -423,8 +423,8 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)DEBUG ("pdevobj[%d]=%p\n" , i, pdevobj[i]);//aelias [+] reason: down if ( pdevobj[num] !=NULL ) -//info = (PFT1000_INFO)(pdevobj[num]->net->priv); - info = (FT1000_INFO *)netdev_priv (pdevobj[num]->net); +//info = (struct ft1000_info *)(pdevobj[num]->net->priv); + info = (struct ft1000_info *)netdev_priv (pdevobj[num]->net);else {DEBUG ("ft1000_ChOpen: can not find device object %d\n" , num);
@@ -480,7 +480,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)static unsigned int ft1000_ChPoll (struct file *file,poll_table *wait) {struct net_device *dev = file->private_data; -PFT1000_INFO info; +struct ft1000_info *info;int i;//DEBUG("ft1000_ChPoll called\n");
@@ -489,7 +489,7 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)return (-EBADF ); } - info = (FT1000_INFO *)netdev_priv (dev); + info = (struct ft1000_info *)netdev_priv (dev);// Search for matching file object for (i=0 ; i<MAX_NUM_APP ; i++) {
@@ -531,7 +531,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command, {void __user *argp = (void __user *)Argument;struct net_device *dev; -PFT1000_INFO info; +struct ft1000_info *info;struct ft1000_device *ft1000dev;int result=0 ;int cmd;
@@ -561,7 +561,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,//DEBUG("FT1000:ft1000_ChIoctl:Command = 0x%x Argument = 0x%8x\n", Command, (u32)Argument); dev = File->private_data; - info = (FT1000_INFO *)netdev_priv (dev); + info = (struct ft1000_info *)netdev_priv (dev); ft1000dev = info->pFt1000Dev; cmd =_IOC_NR (Command);//DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd);
@@ -893,7 +893,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,//--------------------------------------------------------------------------- static int ft1000_ChRelease (struct inode *Inode,struct file *File) { -PFT1000_INFO info; +struct ft1000_info *info;struct net_device *dev;int i;struct dpram_blk *pdpram_blk;
@@ -901,7 +901,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)DEBUG ("ft1000_ChRelease called\n" ); dev = File->private_data; - info = (FT1000_INFO *)netdev_priv (dev); + info = (struct ft1000_info *)netdev_priv (dev);if (ft1000_flarion_cnt ==0 ) { info->appcnt--;
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +8 -8
@@ -205,7 +205,7 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_valUSHORT handshake;int loopcnt;ULONG status=0 ; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net); loopcnt =0 ;while (loopcnt <100 )
@@ -294,7 +294,7 @@ static USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT expectedUSHORT temp;ULONG status=0 ; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net); loopcnt =0 ; handshake =0 ;while (loopcnt <100 )
@@ -352,7 +352,7 @@ static USHORT get_request_type(struct ft1000_device *ft1000dev)ULONG status;USHORT tempword;ULONG tempx; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);if ( pft1000info->bootmode ==1 ) {
@@ -380,7 +380,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev)ULONG status;USHORT tempword;ULONG tempx; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);if ( pft1000info->bootmode ==1 ) { status =fix_ft1000_read_dpram32 (ft1000dev,DWNLD_MAG1_TYPE_LOC , (PUCHAR )&tempx);
@@ -423,7 +423,7 @@ static long get_request_value(struct ft1000_device *ft1000dev)ULONG value;USHORT tempword;ULONG status; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);if ( pft1000info->bootmode ==1 )
@@ -452,7 +452,7 @@ static long get_request_value_usb(struct ft1000_device *ft1000dev)ULONG value;USHORT tempword;ULONG status; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info * pft1000info =netdev_priv (ft1000dev->net);if (pft1000info->usbboot ==2 ) { value = pft1000info->tempbuf[4 ];
@@ -556,7 +556,7 @@ static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, UCHARUSHORT tempword;USHORT tempbuffer[64 ];USHORT resultbuffer[64 ]; -PFT1000_INFO pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);//DEBUG("FT1000:download:start word_length = %d\n",(int)word_length); dpram = (USHORT )DWNLD_MAG1_PS_HDR_LOC ;
@@ -801,7 +801,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLeUSHORT dpram =0 ;PUCHAR pbuffer;struct prov_record *pprov_record; -FT1000_INFO *pft1000info =netdev_priv (ft1000dev->net); +struct ft1000_info *pft1000info =netdev_priv (ft1000dev->net);DEBUG ("Entered scram_dnldr...\n" );
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +21 -21
165 lines not on this page · raw message
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +7 -7
@@ -52,7 +52,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,unsigned short ledStat;unsigned short conStat; -FT1000_INFO *info; +struct ft1000_info *info;char *status[] = {"Idle (Disconnect)" ,"Searching" ,"Active (Connected)" ,"Waiting for L2" ,"Sleep" ,"No Coverage" ,"" ,""
@@ -65,7 +65,7 @@ ft1000ReadProc (char *page, char **start, off_t off, int count, int *eof,time_t delta; dev = (struct net_device *) data; - info = (FT1000_INFO *)netdev_priv (dev); + info = (struct ft1000_info *)netdev_priv (dev);if (off >0 ) {
@@ -169,10 +169,10 @@ static int ft1000NotifyProc (struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = ptr; -FT1000_INFO *info; +struct ft1000_info *info;struct proc_dir_entry *ft1000_proc_file; - info = (FT1000_INFO *)netdev_priv (dev); +info = (struct ft1000_info *)netdev_priv (dev); switch (event)
@@ -196,9 +196,9 @@ static struct notifier_block ft1000_netdev_notifier = {void ft1000InitProc (struct net_device *dev) { -FT1000_INFO *info; +struct ft1000_info *info;struct proc_dir_entry *ft1000_proc_file; - info = (FT1000_INFO *)netdev_priv (dev); + info = (struct ft1000_info *)netdev_priv (dev); info->ft1000_proc_dir =proc_mkdir (FT1000_PROC_DIR ,FTNET_PROC );
@@ -222,7 +222,7 @@ ft1000InitProc (struct net_device *dev) }void -ft1000CleanupProc (FT1000_INFO * info) +ft1000CleanupProc (struct ft1000_info *info) {remove_proc_entry (info->netdevname, info->ft1000_proc_dir);remove_proc_entry (FT1000_PROC_DIR ,FTNET_PROC );
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +4 -4
@@ -64,7 +64,7 @@ static int ft1000_probe(struct usb_interface *interface,int i, ret =0 , size;struct ft1000_device *ft1000dev; -FT1000_INFO *pft1000info; +struct ft1000_info *pft1000info;const struct firmware *dsp_fw; ft1000dev =kmalloc (sizeof (struct ft1000_device ),GFP_KERNEL );
@@ -164,7 +164,7 @@ static int ft1000_probe(struct usb_interface *interface,if (ret) goto err_load; - pft1000info = (FT1000_INFO *)netdev_priv (ft1000dev->net); + pft1000info = (struct ft1000_info *)netdev_priv (ft1000dev->net);DEBUG ("In probe: pft1000info=%p\n" , pft1000info); ret =dsp_reload (ft1000dev);
@@ -210,11 +210,11 @@ err_fw:static void ft1000_disconnect (struct usb_interface *interface) { -FT1000_INFO *pft1000info; +struct ft1000_info *pft1000info;DEBUG ("ft1000_disconnect is called\n" ); - pft1000info = (PFT1000_INFO )usb_get_intfdata (interface); + pft1000info = (struct ft1000_info *)usb_get_intfdata (interface);DEBUG ("In disconnect pft1000info=%p\n" , pft1000info);if (pft1000info) {
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +3 -3
@@ -486,7 +486,7 @@ struct ft1000_device// struct net_device_stats stats; //mbelian } __attribute__ ((packed)); -typedef struct _FT1000_INFO { +struct ft1000_info {struct ft1000_device *pFt1000Dev;struct net_device_stats stats;
@@ -558,7 +558,7 @@ typedef struct _FT1000_INFO {unsigned short tempbuf[32 ];char netdevname[IFNAMSIZ ];struct proc_dir_entry *ft1000_proc_dir;//mbelian -}FT1000_INFO , *PFT1000_INFO ; +};struct dpram_blk {
@@ -601,7 +601,7 @@ int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intint ft1000_poll (void * dev_id);void ft1000InitProc (struct net_device *dev); -void ft1000CleanupProc (FT1000_INFO *info); +void ft1000CleanupProc (struct ft1000_info *info);
Signature · 1 line
1.7.1
Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
Quoted 9 lines · Marek Belisko
Signed-off-by Marek Belisko <[email protected]>--- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++------- .../staging/ft1000/ft1000-usb/ft1000_download.c | 16 ++++---- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 42 ++++++++++---------- drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +- 6 files changed, 57 insertions(+), 57 deletions(-)
Something's wrong with this patch. There was also something wrong with one of the previous ones as well, but I fixed it up by hand. It seems that you forgot to send one of the patches in this series, which caused this one to throw a lot of rejects.
Care to resync on my tree to see what I haven't applied from you and resend this one, and anything else I've missed?
thanks,
greg k-h
Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
Quoted 11 lines · Greg KH
Quoted 9 lines · Marek Belisko
Signed-off-by Marek Belisko <[email protected]>---
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------.../staging/ft1000/ft1000-usb/ft1000_download.c| 16 ++++----drivers/staging/ft1000/ft1000-usb/ft1000_hw.c| 42 ++++++++++----------drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +- 6 files changed, 57 insertions(+), 57 deletions(-)
Quoted 7 lines
Something's wrong with this patch. There was also something wrong with one of the previous ones as well, but I fixed it up by hand. It seems that you forgot to send one of the patches in this series, which caused this one to throw a lot of rejects.
Care to resync on my tree to see what I haven't applied from you and resend this one, and anything else I've missed?
I forgot to send 1 patch if I check my git logs. I already send it ([PATCH] staging:ft1000: Remove dead code from ft1000_hw.c).
Hopefully it resolved all problems with patch applying.
Sorry.
Quoted 5 lines
thanks,
greg k-h
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
Re: [PATCH 7/7] staging: ft1000: Remove FT1000_INFO typedef usage.
Quoted 17 lines · Belisko Marek
Quoted 16 lines · Greg KH
Quoted 9 lines · Marek Belisko
Signed-off-by Marek Belisko <[email protected]>---
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 28 +++++++-------.../staging/ft1000/ft1000-usb/ft1000_download.c| 16 ++++----drivers/staging/ft1000/ft1000-usb/ft1000_hw.c| 42 ++++++++++----------drivers/staging/ft1000/ft1000-usb/ft1000_proc.c | 14 +++--- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 8 ++-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 6 +- 6 files changed, 57 insertions(+), 57 deletions(-)Something's wrong with this patch. There was also something wrong with one of the previous ones as well, but I fixed it up by hand. It seems that you forgot to send one of the patches in this series, which caused this one to throw a lot of rejects.
Quoted 6 lines
Quoted 2 lines
Care to resync on my tree to see what I haven't applied from you and resend this one, and anything else I've missed?
I forgot to send 1 patch if I check my git logs. I already send it ([PATCH] staging:ft1000: Remove dead code from
ft1000_hw.c).Hopefully it resolved all problems with patch applying.
No, that one doesn't apply either :(
Care to retry?
thanks,
greg k-h