mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-08 10:30:50 +00:00
staging: bcm: line over 80 characters in InterfaceDld.c
Fixed all the line over 80 characters warning found by checkpatch.pl script. Signed-off-by: Gokulnath A <Gokulnath.Avanashilingam@in.bosch.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8f5157bf37
commit
b3a53885b2
@ -40,7 +40,8 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc)
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_chip_loc)
|
int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp,
|
||||||
|
unsigned int on_chip_loc)
|
||||||
{
|
{
|
||||||
char *buff, *buff_readback;
|
char *buff, *buff_readback;
|
||||||
unsigned int reg = 0;
|
unsigned int reg = 0;
|
||||||
@ -68,7 +69,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
|
|||||||
while (1) {
|
while (1) {
|
||||||
oldfs = get_fs();
|
oldfs = get_fs();
|
||||||
set_fs(get_ds());
|
set_fs(get_ds());
|
||||||
len = vfs_read(flp, (void __force __user *)buff, MAX_TRANSFER_CTRL_BYTE_USB, &pos);
|
len = vfs_read(flp, (void __force __user *)buff,
|
||||||
|
MAX_TRANSFER_CTRL_BYTE_USB, &pos);
|
||||||
set_fs(oldfs);
|
set_fs(oldfs);
|
||||||
fw_down++;
|
fw_down++;
|
||||||
|
|
||||||
@ -80,7 +82,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes = InterfaceRDM(psIntfAdapter, on_chip_loc, buff_readback, len);
|
bytes = InterfaceRDM(psIntfAdapter, on_chip_loc,
|
||||||
|
buff_readback, len);
|
||||||
if (bytes < 0) {
|
if (bytes < 0) {
|
||||||
Status = bytes;
|
Status = bytes;
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -95,7 +98,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
|
|||||||
len -= 4;
|
len -= 4;
|
||||||
|
|
||||||
while (len) {
|
while (len) {
|
||||||
if (*(unsigned int *)&buff_readback[len] != *(unsigned int *)&buff[len]) {
|
if (*(unsigned int *)&buff_readback[len] !=
|
||||||
|
*(unsigned int *)&buff[len]) {
|
||||||
Status = -EIO;
|
Status = -EIO;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -111,13 +115,15 @@ exit:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo)
|
static int bcm_download_config_file(struct bcm_mini_adapter *Adapter,
|
||||||
|
struct bcm_firmware_info *psFwInfo)
|
||||||
{
|
{
|
||||||
int retval = STATUS_SUCCESS;
|
int retval = STATUS_SUCCESS;
|
||||||
B_UINT32 value = 0;
|
B_UINT32 value = 0;
|
||||||
|
|
||||||
if (Adapter->pstargetparams == NULL) {
|
if (Adapter->pstargetparams == NULL) {
|
||||||
Adapter->pstargetparams = kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL);
|
Adapter->pstargetparams =
|
||||||
|
kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL);
|
||||||
if (Adapter->pstargetparams == NULL)
|
if (Adapter->pstargetparams == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@ -125,7 +131,9 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
|
|||||||
if (psFwInfo->u32FirmwareLength != sizeof(struct bcm_target_params))
|
if (psFwInfo->u32FirmwareLength != sizeof(struct bcm_target_params))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
retval = copy_from_user(Adapter->pstargetparams, psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength);
|
retval = copy_from_user(Adapter->pstargetparams,
|
||||||
|
psFwInfo->pvMappedFirmwareAddress,
|
||||||
|
psFwInfo->u32FirmwareLength);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
kfree(Adapter->pstargetparams);
|
kfree(Adapter->pstargetparams);
|
||||||
Adapter->pstargetparams = NULL;
|
Adapter->pstargetparams = NULL;
|
||||||
@ -142,13 +150,15 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
|
|||||||
if (retval)
|
if (retval)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) {
|
if (Adapter->LEDInfo.led_thread_running &
|
||||||
|
BCM_LED_THREAD_RUNNING_ACTIVELY) {
|
||||||
Adapter->LEDInfo.bLedInitDone = false;
|
Adapter->LEDInfo.bLedInitDone = false;
|
||||||
Adapter->DriverState = DRIVER_INIT;
|
Adapter->DriverState = DRIVER_INIT;
|
||||||
wake_up(&Adapter->LEDInfo.notify_led_event);
|
wake_up(&Adapter->LEDInfo.notify_led_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) {
|
if (Adapter->LEDInfo.led_thread_running &
|
||||||
|
BCM_LED_THREAD_RUNNING_ACTIVELY) {
|
||||||
Adapter->DriverState = FW_DOWNLOAD;
|
Adapter->DriverState = FW_DOWNLOAD;
|
||||||
wake_up(&Adapter->LEDInfo.notify_led_event);
|
wake_up(&Adapter->LEDInfo.notify_led_event);
|
||||||
}
|
}
|
||||||
@ -159,8 +169,10 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
|
|||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
value = 0;
|
value = 0;
|
||||||
wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, sizeof(value));
|
wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4,
|
||||||
wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, sizeof(value));
|
&value, sizeof(value));
|
||||||
|
wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8,
|
||||||
|
&value, sizeof(value));
|
||||||
|
|
||||||
if (Adapter->eNVMType == NVM_FLASH) {
|
if (Adapter->eNVMType == NVM_FLASH) {
|
||||||
retval = PropagateCalParamsFromFlashToMemory(Adapter);
|
retval = PropagateCalParamsFromFlashToMemory(Adapter);
|
||||||
@ -168,17 +180,21 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, sizeof(struct bcm_target_params), CONFIG_BEGIN_ADDR);
|
retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams,
|
||||||
|
sizeof(struct bcm_target_params), CONFIG_BEGIN_ADDR);
|
||||||
|
|
||||||
if (retval)
|
if (retval)
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "configuration file not downloaded properly");
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT,
|
||||||
|
MP_INIT, DBG_LVL_ALL,
|
||||||
|
"configuration file not downloaded properly");
|
||||||
else
|
else
|
||||||
Adapter->bCfgDownloaded = TRUE;
|
Adapter->bCfgDownloaded = TRUE;
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo)
|
int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter,
|
||||||
|
struct bcm_firmware_info *psFwInfo)
|
||||||
{
|
{
|
||||||
int retval = STATUS_SUCCESS;
|
int retval = STATUS_SUCCESS;
|
||||||
PUCHAR buff = NULL;
|
PUCHAR buff = NULL;
|
||||||
@ -188,7 +204,8 @@ int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_
|
|||||||
* Application
|
* Application
|
||||||
*/
|
*/
|
||||||
atomic_set(&Adapter->uiMBupdate, false);
|
atomic_set(&Adapter->uiMBupdate, false);
|
||||||
if (!Adapter->bCfgDownloaded && psFwInfo->u32StartingAddress != CONFIG_BEGIN_ADDR) {
|
if (!Adapter->bCfgDownloaded &&
|
||||||
|
psFwInfo->u32StartingAddress != CONFIG_BEGIN_ADDR) {
|
||||||
/* Can't Download Firmware. */
|
/* Can't Download Firmware. */
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -201,7 +218,9 @@ int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_
|
|||||||
if (buff == NULL)
|
if (buff == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
retval = copy_from_user(buff, psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength);
|
retval = copy_from_user(buff,
|
||||||
|
psFwInfo->pvMappedFirmwareAddress,
|
||||||
|
psFwInfo->u32FirmwareLength);
|
||||||
if (retval != STATUS_SUCCESS) {
|
if (retval != STATUS_SUCCESS) {
|
||||||
retval = -EFAULT;
|
retval = -EFAULT;
|
||||||
goto error;
|
goto error;
|
||||||
@ -221,7 +240,9 @@ error:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT buffDnld(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress)
|
static INT buffDnld(struct bcm_mini_adapter *Adapter,
|
||||||
|
PUCHAR mappedbuffer, UINT u32FirmwareLength,
|
||||||
|
ULONG u32StartingAddress)
|
||||||
{
|
{
|
||||||
unsigned int len = 0;
|
unsigned int len = 0;
|
||||||
int retval = STATUS_SUCCESS;
|
int retval = STATUS_SUCCESS;
|
||||||
@ -240,7 +261,9 @@ static INT buffDnld(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer, UINT
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT buffRdbkVerify(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress)
|
static INT buffRdbkVerify(struct bcm_mini_adapter *Adapter,
|
||||||
|
PUCHAR mappedbuffer, UINT u32FirmwareLength,
|
||||||
|
ULONG u32StartingAddress)
|
||||||
{
|
{
|
||||||
UINT len = u32FirmwareLength;
|
UINT len = u32FirmwareLength;
|
||||||
INT retval = STATUS_SUCCESS;
|
INT retval = STATUS_SUCCESS;
|
||||||
@ -274,15 +297,20 @@ static INT buffRdbkVerify(struct bcm_mini_adapter *Adapter, PUCHAR mappedbuffer,
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT buffDnldVerify(struct bcm_mini_adapter *Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress)
|
INT buffDnldVerify(struct bcm_mini_adapter *Adapter,
|
||||||
|
unsigned char *mappedbuffer,
|
||||||
|
unsigned int u32FirmwareLength,
|
||||||
|
unsigned long u32StartingAddress)
|
||||||
{
|
{
|
||||||
INT status = STATUS_SUCCESS;
|
INT status = STATUS_SUCCESS;
|
||||||
|
|
||||||
status = buffDnld(Adapter, mappedbuffer, u32FirmwareLength, u32StartingAddress);
|
status = buffDnld(Adapter, mappedbuffer,
|
||||||
|
u32FirmwareLength, u32StartingAddress);
|
||||||
if (status != STATUS_SUCCESS)
|
if (status != STATUS_SUCCESS)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
status = buffRdbkVerify(Adapter, mappedbuffer, u32FirmwareLength, u32StartingAddress);
|
status = buffRdbkVerify(Adapter, mappedbuffer,
|
||||||
|
u32FirmwareLength, u32StartingAddress);
|
||||||
if (status != STATUS_SUCCESS)
|
if (status != STATUS_SUCCESS)
|
||||||
goto error;
|
goto error;
|
||||||
error:
|
error:
|
||||||
|
Loading…
Reference in New Issue
Block a user