diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-09-30 08:24:12 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-05 15:50:15 (GMT) |
commit | 44a17eff844d92421c8b568c84df29735e1e45f9 (patch) | |
tree | 6ee56974122f2be7cb112a25c0ce032a268f28ec /drivers/staging/bcm/InterfaceDld.c | |
parent | 9f1c75ac2dba752ad3734bd3ffab805a6a3fbeda (diff) | |
download | linux-fsl-qoriq-44a17eff844d92421c8b568c84df29735e1e45f9.tar.xz |
staging/bcm: add sparse annotations
This marks up the code where sparse complains in most cases.
Most of the changes are in the ioctl handling code, which
gets __user annotations, finding one unchecked user access.
The rest is mostly about marking functions static when they
are only used in one file.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/bcm/InterfaceDld.c')
-rw-r--r-- | drivers/staging/bcm/InterfaceDld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index f9761db..8825b8e 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -22,7 +22,7 @@ int InterfaceFileDownload( PVOID arg, while(1) { oldfs=get_fs(); set_fs(get_ds()); - len=vfs_read(flp, buff, MAX_TRANSFER_CTRL_BYTE_USB, &pos); + len=vfs_read(flp, (void __force __user *)buff, MAX_TRANSFER_CTRL_BYTE_USB, &pos); set_fs(oldfs); if(len<=0) { @@ -83,7 +83,7 @@ int InterfaceFileReadbackFromChip( PVOID arg, while(1) { oldfs=get_fs(); set_fs(get_ds()); - len=vfs_read(flp, buff, MAX_TRANSFER_CTRL_BYTE_USB, &pos); + len=vfs_read(flp, (void __force __user *)buff, MAX_TRANSFER_CTRL_BYTE_USB, &pos); set_fs(oldfs); fw_down++; if(len<=0) @@ -381,7 +381,7 @@ int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, FIRMWARE_INFO *psFwInfo) BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL,"Failed in allocation memory"); return -ENOMEM; } - retval = copy_from_user(buff,(PUCHAR)psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength); + retval = copy_from_user(buff,psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength); if(retval != STATUS_SUCCESS) { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "copying buffer from user space failed"); |