Commit 15bba866 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: Shortened lines in get_dsx_sf_data_to_application()

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c4fe6fa7
...@@ -1831,22 +1831,29 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1831,22 +1831,29 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
return TRUE; return TRUE;
} }
int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user *user_buffer) int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter,
UINT uiSFId, void __user *user_buffer)
{ {
int status = 0; int status = 0;
struct bcm_packet_info *psSfInfo = NULL; struct bcm_packet_info *psSfInfo = NULL;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d", status); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"status =%d", status);
status = SearchSfid(Adapter, uiSFId); status = SearchSfid(Adapter, uiSFId);
if (status >= NO_OF_QUEUES) { if (status >= NO_OF_QUEUES) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SFID %d not present in queue !!!", uiSFId); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"SFID %d not present in queue !!!", uiSFId);
return -EINVAL; return -EINVAL;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d", status); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"status =%d", status);
psSfInfo = &Adapter->PackInfo[status]; psSfInfo = &Adapter->PackInfo[status];
if (psSfInfo->pstSFIndication && copy_to_user(user_buffer, if (psSfInfo->pstSFIndication
psSfInfo->pstSFIndication, sizeof(struct bcm_add_indication_alt))) { && copy_to_user(user_buffer, psSfInfo->pstSFIndication,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", uiSFId); sizeof(struct bcm_add_indication_alt))) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
"copy to user failed SFID %d, present in queue !!!",
uiSFId);
status = -EFAULT; status = -EFAULT;
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment