Skip to contentSkip to conversation

Staging: Use sizeof type *pointer instead of sizeof type.

PATCH New Sandhya Bankar 1 participant 4 messages Mar 21, 2016 Staging

lore
Share & tools
lore
#0 lore raw

v3 cover Staging: Use sizeof type *pointer instead of sizeof type.

Use sizeof type *pointer instead of sizeof type.

changes in v3:
* Adding changes of v2 to each patch of patchset.
changes in v2:
* Correcting the commit message.

Sandhya Bankar (3):
Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type.
Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.
Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type.

 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++--
 drivers/staging/lustre/lnet/selftest/rpc.c          | 2 +-
 drivers/staging/rtl8188eu/core/rtw_efuse.c          | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.3.4
#1 lore raw

PATCH v3 1/3 Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type.

Use sizeof type *pointer instead of sizeof type.

---
changes in v3:
* Adding changes of v2 to each patch of patchset.
changes in v2:
* Correcting the commit message.

 drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_efuse.c +1 -1
index 19f11d0..cd64045 100644
@@ -107,7 +107,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
 	if (!efuseTbl)
 		return;
 
-	eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
+	eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(*eFuseWord));
 	if (!eFuseWord) {
 		DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
 		goto eFuseWord_failed;
Signature · 1 line
1.8.3.4
#2 lore raw

PATCH v3 2/3 Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.

In reply to Sandhya Bankar

Use sizeof type *pointer instead of sizeof type.

---
changes in v3:
* Adding changes of v2 to each patch of patchset.
changes in v2:
* Correcting the commit message.

 drivers/staging/lustre/lnet/selftest/rpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/selftest/rpc.c +1 -1
index 69be7d6..563827c 100644
@@ -256,7 +256,7 @@ srpc_service_init(struct srpc_service *svc)
 	svc->sv_shuttingdown = 0;
 
 	svc->sv_cpt_data = cfs_percpt_alloc(lnet_cpt_table(),
-					    sizeof(struct srpc_service_cd));
+					    sizeof(*svc->sv_cpt_data));
 	if (!svc->sv_cpt_data)
 		return -ENOMEM;
 
Signature · 1 line
1.8.3.4
#3 lore raw

PATCH v3 3/3 Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type.

In reply to Sandhya Bankar

Use sizeof type *pointer instead of sizeof type.

---
changes in v3:
* Adding changes of v2 to each patch of patchset.
changes in v2:
* Correcting the commit message.

 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +2 -2
index 0d32e65..89f9390 100644
@@ -1968,7 +1968,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
 	 */
 
 	net->ibn_fmr_ps = cfs_percpt_alloc(lnet_cpt_table(),
-					   sizeof(kib_fmr_poolset_t));
+					   sizeof(*net->ibn_fmr_ps));
 	if (!net->ibn_fmr_ps) {
 		CERROR("Failed to allocate FMR pool array\n");
 		rc = -ENOMEM;
@@ -1992,7 +1992,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts)
 
  create_tx_pool:
 	net->ibn_tx_ps = cfs_percpt_alloc(lnet_cpt_table(),
-					  sizeof(kib_tx_poolset_t));
+					  sizeof(*net->ibn_tx_ps));
 	if (!net->ibn_tx_ps) {
 		CERROR("Failed to allocate tx pool array\n");
 		rc = -ENOMEM;
Signature · 1 line
1.8.3.4