Re: [PATCH 3/6] staging/ft1000-usb: fix build warnings

From: Belisko Marek
Date: Mon Oct 04 2010 - 08:43:44 EST


On Thu, Sep 30, 2010 at 10:24 AM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> This lets us see clearer when stuff breaks.
>
> Most of the changes are fixes for casts between int and pointer
> that don't work on 64 bit.
>
> The ioctl function uses a large amount of stack, which gets
> fixed by allocating the buffer dynamically.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> Âdrivers/staging/ft1000/ft1000-usb/ft1000_chdev.c  |  44 +++++++++++--------
> Â.../staging/ft1000/ft1000-usb/ft1000_download.c  Â|  Â4 +-
> Âdrivers/staging/ft1000/ft1000-usb/ft1000_hw.c   Â|  Â6 +-
> Âdrivers/staging/ft1000/ft1000-usb/ft1000_usb.c   |  Â4 +-
> Âdrivers/staging/ft1000/ft1000-usb/ft1000_usb.h   |  Â2 +-
> Â5 files changed, 33 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> index 44b037c..282deeb 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> @@ -263,7 +263,7 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
> Â Â //save the device info to global array
> Â Â pdevobj[info->CardNumber] = dev;
>
> - Â ÂDEBUG("ft1000_CreateDevice: ******SAVED pdevobj[%d]=%x\n", info->CardNumber, (unsigned int)pdevobj[info->CardNumber]); Â Â //aelias [+] reason:up
> + Â ÂDEBUG("ft1000_CreateDevice: ******SAVED pdevobj[%d]=%p\n", info->CardNumber, pdevobj[info->CardNumber]); Â //aelias [+] reason:up
>
> Â Â if (info->DeviceCreated)
> Â Â {
> @@ -430,7 +430,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
> Â Â DEBUG("ft1000_ChOpen: minor number=%d\n", num);
>
> Â Â for (i=0; i<5; i++)
> - Â Â Â ÂDEBUG("pdevobj[%d]=%x\n", i, (unsigned int)pdevobj[i]); //aelias [+] reason: down
> + Â Â Â ÂDEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
>
> Â Â if ( pdevobj[num] != NULL )
> Â Â Â Â //info = (PFT1000_INFO)(pdevobj[num]->net->priv);
> @@ -441,7 +441,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
> Â Â Â Â return -1;
> Â Â }
>
> - Â ÂDEBUG("f_owner = 0x%8x number of application = %d\n", (u32)(&File->f_owner), info->appcnt );
> + Â ÂDEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt );
>
> Â Â // Check if maximum number of application exceeded
> Â Â if (info->appcnt > MAX_NUM_APP) {
> @@ -451,7 +451,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
>
> Â Â // Search for available application info block
> Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Âif ( (info->app_info[i].fileobject == 0) ) {
> + Â Â Â Âif ( (info->app_info[i].fileobject == NULL) ) {
> Â Â Â Â Â Â break;
> Â Â Â Â }
> Â Â }
> @@ -463,7 +463,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
> Â Â }
>
> Â Â info->appcnt++;
> - Â Âinfo->app_info[i].fileobject = (u32)(&File->f_owner);
> + Â Âinfo->app_info[i].fileobject = &File->f_owner;
> Â Â info->app_info[i].nTxMsg = 0;
> Â Â info->app_info[i].nRxMsg = 0;
> Â Â info->app_info[i].nTxMsgReject = 0;
> @@ -503,7 +503,7 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
>
> Â Â // Search for matching file object
> Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Âif ( info->app_info[i].fileobject == (u32)(&file->f_owner) ) {
> + Â Â Â Âif ( info->app_info[i].fileobject == &file->f_owner) {
> Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id);
> Â Â Â Â Â Â break;
> Â Â Â Â }
> @@ -587,7 +587,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â if (tempword == DSPBCMSGID) {
> Â Â Â Â Â Â Â Â // Search for matching file object
> Â Â Â Â Â Â Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == (u32)(&File->f_owner) ) {
> + Â Â Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == &File->f_owner) {
> Â Â Â Â Â Â Â Â Â Â Â Â info->app_info[i].DspBCMsgFlag = 1;
> Â Â Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl:Registered for broadcast messages\n");
> Â Â Â Â Â Â Â Â Â Â Â Â break;
> @@ -660,7 +660,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â break;
> Â Â case IOCTL_SET_DPRAM_CMD:
> Â Â Â Â {
> - Â Â Â Â Â ÂIOCTL_DPRAM_BLK dpram_data;
> + Â Â Â Â Â ÂIOCTL_DPRAM_BLK *dpram_data;
> Â Â Â Â Â Â //IOCTL_DPRAM_COMMAND dpram_command;
> Â Â Â Â Â Â USHORT qtype;
> Â Â Â Â Â Â USHORT msgsz;
> @@ -702,6 +702,11 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â Â Â break;
> Â Â Â Â Â Â Â Â }
>
> + Â Â Â Â Â Â Â result = -ENOMEM;
> + Â Â Â Â Â Â Â dpram_data = kmalloc(msgsz + 2, GFP_KERNEL);
> + Â Â Â Â Â Â Â if (!dpram_data)
> + Â Â Â Â Â Â Â Â Â Â Â break;
> +
> Â Â Â Â Â Â Â Â //if ( copy_from_user(&(dpram_command.dpram_blk), (PIOCTL_DPRAM_BLK)Argument, msgsz+2) ) {
> Â Â Â Â Â Â Â Â if ( copy_from_user(&dpram_data, (PIOCTL_DPRAM_BLK)Argument, msgsz+2) ) {
> Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n");
> @@ -717,20 +722,21 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â#endif
> Â Â Â Â Â Â Â Â Â Â // Check if this message came from a registered application
> Â Â Â Â Â Â Â Â Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Â Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == (u32)(&File->f_owner) ) {
> + Â Â Â Â Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == &File->f_owner) {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;
> Â Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â if (i==MAX_NUM_APP) {
> Â Â Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:No matching application fileobject\n");
> Â Â Â Â Â Â Â Â Â Â Â Â result = -EINVAL;
> + Â Â Â Â Â Â Â Â Â Â Â kfree(dpram_data);
> Â Â Â Â Â Â Â Â Â Â Â Â break;
> Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â app_index = i;
>
> Â Â Â Â Â Â Â Â Â Â // Check message qtype type which is the lower byte within qos_class
> Â Â Â Â Â Â Â Â Â Â //qtype = ntohs(dpram_command.dpram_blk.pseudohdr.qos_class) & 0xff;
> - Â Â Â Â Â Â Â Â Â Âqtype = ntohs(dpram_data.pseudohdr.qos_class) & 0xff;
> + Â Â Â Â Â Â Â Â Â Âqtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff;
> Â Â Â Â Â Â Â Â Â Â //DEBUG("FT1000_ft1000_ChIoctl: qtype = %d\n", qtype);
> Â Â Â Â Â Â Â Â Â Â if (qtype) {
> Â Â Â Â Â Â Â Â Â Â }
> @@ -756,6 +762,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (tempword & FT1000_DB_DPRAM_TX) {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl:Doorbell not available\n");
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result = -ENOTTY;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â kfree(dpram_data);
is shift of kfree() needed or just a typo?
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
> @@ -769,7 +776,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â Â Â Â Â 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 = (PUSHORT)&dpram_data->pseudohdr;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â ppseudo_hdr = (PPSEUDO_HDR)pmsg;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â total_len = msgsz+2;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (total_len & 0x1) {
> @@ -789,7 +796,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â pmsg++;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â ppseudo_hdr = (PPSEUDO_HDR)pmsg;
> Â#if 0
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Âptr = (char *)&dpram_data;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Âptr = dpram_data;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl: Command Send\n");
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â for (i=0; i<total_len; i++) {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl: data %d = 0x%x\n", i, *ptr++);
> @@ -798,15 +805,13 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â //dpram_command.extra = 0;
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â //CardSendCommand(ft1000dev,(unsigned char*)&dpram_command,total_len+2);
> - Â Â Â Â Â Â Â Â Â Â Â Â Â ÂCardSendCommand(ft1000dev,(unsigned short*)&dpram_data,total_len+2);
> + Â Â Â Â Â Â Â Â Â Â Â Â Â ÂCardSendCommand(ft1000dev,(unsigned short*)dpram_data,total_len+2);
>
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â info->app_info[app_index].nTxMsg++;
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â Â Â else {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â result = -EINVAL;
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â }
> @@ -815,13 +820,14 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â DEBUG("FT1000:ft1000_ChIoctl: Card not ready take messages\n");
> Â Â Â Â Â Â Â Â result = -EACCES;
> Â Â Â Â Â Â }
> + Â Â Â Â Â kfree(dpram_data);
>
> Â Â Â Â }
> Â Â Â Â break;
> Â Â case IOCTL_GET_DPRAM_CMD:
> Â Â Â Â {
> Â Â Â Â Â Â PDPRAM_BLK pdpram_blk;
> - Â Â Â Â Â ÂPIOCTL_DPRAM_BLK pioctl_dpram;
> + Â Â Â Â Â ÂIOCTL_DPRAM_BLK __user *pioctl_dpram;
> Â Â Â Â Â Â int msglen;
>
> Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_DPRAM called\n");
> @@ -832,7 +838,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
>
> Â Â Â Â Â Â // Search for matching file object
> Â Â Â Â Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == (u32)(&File->f_owner) ) {
> + Â Â Â Â Â Â Â Âif ( info->app_info[i].fileobject == &File->f_owner) {
> Â Â Â Â Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id);
> Â Â Â Â Â Â Â Â Â Â break;
> Â Â Â Â Â Â Â Â }
> @@ -856,7 +862,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> Â Â Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl:NumOfMsg for app %d = %d\n", i, info->app_info[i].NumOfMsg);
> Â Â Â Â Â Â Â Â spin_unlock_irqrestore(&free_buff_lock, flags);
> Â Â Â Â Â Â Â Â msglen = ntohs(*(u16 *)pdpram_blk->pbuffer) + PSEUDOSZ;
> - Â Â Â Â Â Â Â Âpioctl_dpram->total_len = htons(msglen);
> + Â Â Â Â Â Â Â Âpioctl_dpram->total_len = htons(msglen); /* XXX exploit here */
> Â Â Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl:msg length = %x\n", msglen);
> Â Â Â Â Â Â Â Â if(copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen))
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â{
> @@ -910,7 +916,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
>
> Â Â // Search for matching file object
> Â Â for (i=0; i<MAX_NUM_APP; i++) {
> - Â Â Â Âif ( info->app_info[i].fileobject == (u32)(&File->f_owner) ) {
> + Â Â Â Âif ( info->app_info[i].fileobject == &File->f_owner) {
> Â Â Â Â Â Â //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id);
> Â Â Â Â Â Â break;
> Â Â Â Â }
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> index 93f75b1..c71a1f4 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> @@ -1356,8 +1356,8 @@ 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 *)((UINT)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
> - Â Â Â Â Â Â Â Â Â Âif ( (UINT)(pUcFile) - (UINT)(pFileStart) >= (UINT)FileLength) {
> + Â Â Â Â Â Â Â Â Â ÂpUcFile = (UCHAR *)((unsigned long)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
> + Â Â Â Â Â Â Â Â Â Âif ( (unsigned long)(pUcFile) - (unsigned long)(pFileStart) >= (unsigned long)FileLength) {
> Â Â Â Â Â Â Â Â Â Â Â ÂuiState = STATE_DONE_FILE;
> Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â }
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> index 51ed0dd..4c3b1db 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> @@ -1350,7 +1350,7 @@ static int ft1000_read_fifo_reg(struct ft1000_device *ft1000dev,unsigned int pip
>
> Â Â Â Â if(urb->status)
> Â Â Â Â {
> - Â Â Â Â Â Âprintk("ft1000 control message failed (urb addr: %x) with error number: %i\n", (int)urb, (int)status);
> + Â Â Â Â Â Âprintk("ft1000 control message failed (urb addr: %p) with error number: %i\n", urb, (int)status);
>
> Â Â Â Â Â Â usb_clear_halt(ft1000dev->dev, usb_rcvctrlpipe(ft1000dev->dev, 0));
> Â Â Â Â Â Â usb_clear_halt(ft1000dev->dev, usb_sndctrlpipe(ft1000dev->dev, 0));
> @@ -1390,7 +1390,7 @@ static inline u16 ft1000_read_fifo_len (struct net_device *dev)
> Â Â Â ÂFT1000_INFO *info = (FT1000_INFO *) netdev_priv (dev);
> Â Â struct ft1000_device *ft1000dev = info->pFt1000Dev;
> Â// Â ÂDEBUG("ft1000_read_fifo_len: enter ft1000dev %x\n", ft1000dev); Â Â Â Â Â Â Â Â Â//aelias [-] reason: warning: format ???%x??? expects type ???unsigned int???, but argument 2 has type ???struct ft1000_device *???
> - Â ÂDEBUG("ft1000_read_fifo_len: enter ft1000dev %x\n", (unsigned int)ft1000dev); Â Â Â//aelias [+] reason: up
> + Â ÂDEBUG("ft1000_read_fifo_len: enter ft1000dev %p\n", ft1000dev); Â Â//aelias [+] reason: up
> Â Â //ft1000_read_register(ft1000dev, &temp, FT1000_REG_MAG_UFSR);
>
> Â Â ret = STATUS_SUCCESS;
> @@ -1882,7 +1882,7 @@ int ft1000_close(struct net_device *net)
> Â Â //usb_kill_urb(ft1000dev->tx_urb);
>
>
> - Â ÂDEBUG("ft1000_close: pInfo=%x, ft1000dev=%x\n", (int)pInfo, (int)ft1000dev);
> + Â ÂDEBUG("ft1000_close: pInfo=%p, ft1000dev=%p\n", pInfo, ft1000dev);
> Â Â netif_carrier_off(net);//mbelian
> Â Â netif_stop_queue(net);
> Â Â //DEBUG("ft1000_close: netif_stop_queue called\n");
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> index 4dbc98b..f708c09 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> @@ -184,7 +184,7 @@ static int ft1000_probe(struct usb_interface *interface, const struct usb_device
> Â Â pft1000info = (FT1000_INFO *) netdev_priv (ft1000dev->net);
>
> Â// Â ÂDEBUG("In probe: pft1000info=%x\n", pft1000info); Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â// aelias [-] reason: warning: format ???%x??? expects type ???unsigned int???, but argument 2 has type ???struct FT1000_INFO *???
> - Â ÂDEBUG("In probe: pft1000info=%x\n", (unsigned int)pft1000info); Â Â Â Â Â Â// aelias [+] reason: up
> + Â ÂDEBUG("In probe: pft1000info=%p\n", pft1000info); Â Â Â Â Â// aelias [+] reason: up
>
> Â Â dsp_reload(ft1000dev);
> Â Â gPollingfailed = FALSE; Â//mbelian
> @@ -245,7 +245,7 @@ static void ft1000_disconnect(struct usb_interface *interface)
>
> Â Â pft1000info = (PFT1000_INFO)usb_get_intfdata(interface);
> Â// Â ÂDEBUG("In disconnect pft1000info=%x\n", pft1000info); Â Â// aelias [-] reason: warning: format ???%x??? expects type ???unsigned int???, but argument 2 has type ???struct FT1000_INFO *???
> - Â ÂDEBUG("In disconnect pft1000info=%x\n", (unsigned int) pft1000info); Â Â Â // aelias [+] reason: up
> + Â ÂDEBUG("In disconnect pft1000info=%p\n", pft1000info); Â Â Â// aelias [+] reason: up
>
>
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
> index b0c611b..a64d468 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
> @@ -83,7 +83,7 @@ typedef struct _APP_INFO_BLOCK
> Â Â 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
> - Â Âu32 fileobject; Â Â Â Â Â Â Â Â// Application's file object
> + Â Âstruct fown_struct *fileobject;// Application's file object
> Â Â u16 app_id; Â Â Â Â Â Â Â Â Â Â// Application id
> Â Â int DspBCMsgFlag;
> Â Â int NumOfMsg; Â Â Â Â Â Â Â Â Â // number of messages queued up
> --
> 1.7.1
>
>
Anyway there is also compilation warning:
In function âcopy_from_userâ,
inlined from âft1000_ChIoctlâ at
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:709:36:
/home/open-nandra/kernels/linux-next/arch/x86/include/asm/uaccess_32.h:212:26:
warning: call to âcopy_from_user_overflowâ declared with attribute
warning: copy_from_user() buffer size is not provably correct


best regards,

marek

--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/