staging: wilc1000: Use sizeof type *pointer instead of sizeof type
PATCH 1/1 staging: wilc1000: Use sizeof type *pointer instead of sizeof type
This patch replaces sizeof type with sizeof type pointer as suggested by checkpatch.pl.
--- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
@@ -3329,7 +3329,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)init_completion (&hif_wait_response); - hif_drv =kzalloc (sizeof (struct host_if_drv ),GFP_KERNEL ); + hif_drv =kzalloc (sizeof (*hif_drv),GFP_KERNEL );if (!hif_drv) { result = -ENOMEM ; goto _fail_;
@@ -3878,7 +3878,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo) pu8IEs = ptstrNetworkInfo->ies; u16IEsLen = ptstrNetworkInfo->ies_len; - pNewJoinBssParam =kzalloc (sizeof (struct join_bss_param ),GFP_KERNEL ); + pNewJoinBssParam =kzalloc (sizeof (*pNewJoinBssParam),GFP_KERNEL );if (pNewJoinBssParam) { pNewJoinBssParam->dtim_period = ptstrNetworkInfo->dtim_period; pNewJoinBssParam->beacon_period = ptstrNetworkInfo->beacon_period;
Signature · 1 line
2.7.4
Quoted 2 lines · sayli karnik
This patch replaces sizeof type with sizeof type pointer as suggested by checkpatch.pl.
When you do this, the commit message should make apparent that you have checked that the sizes are the same.
julia
Quoted 38 lines
Signed-off-by sayli karnik <[email protected]>--- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/wilc1000/host_interface.c +2
-3@@ -3329,7 +3329,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)init_completion (&hif_wait_response); - hif_drv =kzalloc (sizeof (struct host_if_drv ),GFP_KERNEL ); + hif_drv =kzalloc (sizeof (*hif_drv),GFP_KERNEL );if (!hif_drv) { result = -ENOMEM ; goto _fail_;@@ -3878,7 +3878,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo) pu8IEs = ptstrNetworkInfo->ies; u16IEsLen = ptstrNetworkInfo->ies_len; - pNewJoinBssParam =kzalloc (sizeof (struct join_bss_param ),GFP_KERNEL ); + pNewJoinBssParam =kzalloc (sizeof (*pNewJoinBssParam),GFP_KERNEL );if (pNewJoinBssParam) { pNewJoinBssParam->dtim_period = ptstrNetworkInfo->dtim_period; pNewJoinBssParam->beacon_period = ptstrNetworkInfo->beacon_period; --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160915100834.GA5703%40sayli-HP-15-Notebook-PC.
For more options, visit https://groups.google.com/d/optout.