All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/6] staging: vt6656: main_usb: Replace data type declaration with variable of same type
@ 2016-09-14 22:16 Namrata A Shettar
  2016-09-15  5:19 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Namrata A Shettar @ 2016-09-14 22:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Malcolm Priestley, Alison Schofield,
	maomao xu, Othmar Pasteka, Parth Sane, Wolfram Sang,
	outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

This patch fixes checkpatch issue:
-Replacing sizeof(struct vnt_usb_send_context) with sizeof(*tx_context)
-Replacing sizeof(struct vnt_rcb) with sizeof(*priv->rcb[ii])
The replacements are of the type they are replaced with hence size
remains same.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
 drivers/staging/vt6656/main_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c
b/drivers/staging/vt6656/main_usb.c
index d79f07f..c03f023 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -429,7 +429,7 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
        int ii;

        for (ii = 0; ii < priv->num_tx_context; ii++) {
-               tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
+               tx_context = kmalloc(sizeof(*tx_context),
                                                                GFP_KERNEL);
                if (!tx_context)
                        goto free_tx;
@@ -447,7 +447,7 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
        }

        for (ii = 0; ii < priv->num_rcb; ii++) {
-               priv->rcb[ii] = kzalloc(sizeof(struct vnt_rcb), GFP_KERNEL);
+               priv->rcb[ii] = kzalloc(sizeof(*priv->rcb[ii]), GFP_KERNEL);
                if (!priv->rcb[ii]) {
                        dev_err(&priv->usb->dev,
                                        "failed to allocate rcb no %d\n",
ii);

--
2.7.4

[-- Attachment #2: Type: text/html, Size: 2019 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-15 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 22:16 [PATCH 3/6] staging: vt6656: main_usb: Replace data type declaration with variable of same type Namrata A Shettar
2016-09-15  5:19 ` [Outreachy kernel] " Julia Lawall
     [not found]   ` <20160915180849.GA6416@namrata-HP-Pavilion-g6-Notebook-PC>
2016-09-15 18:10     ` Namrata A Shettar
2016-09-15 19:24       ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.