linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Felipe Balbi <balbi@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: [PATCH 9/9] usb: gadget: bdc: prefer pointer dereference to pointer type
Date: Tue, 14 Jul 2020 16:48:54 +0800	[thread overview]
Message-ID: <1594716535-24699-9-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1594716535-24699-1-git-send-email-chunfeng.yun@mediatek.com>

Prefer kzalloc(sizeof(*bd_table)...) over
kzalloc(sizeof(struct bd_table)

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
index eea66d5..d1ace77 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
@@ -147,7 +147,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
 	/* Allocate memory for each table */
 	for (index = 0; index < num_tabs; index++) {
 		/* Allocate memory for bd_table structure */
-		bd_table = kzalloc(sizeof(struct bd_table), GFP_ATOMIC);
+		bd_table = kzalloc(sizeof(*bd_table), GFP_ATOMIC);
 		if (!bd_table)
 			goto fail;
 
-- 
1.9.1

      parent reply	other threads:[~2020-07-14  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  8:48 [PATCH 1/9] usb: gadget: bdc: fix code check warning or error caused by spacing Chunfeng Yun
2020-07-14  8:48 ` [PATCH 2/9] usb: gadget: bdc: fix warning of embedded function name Chunfeng Yun
2020-07-14  8:48 ` [PATCH 3/9] usb: gadget: bdc: fix improper SPDX comment style for header file Chunfeng Yun
2020-07-14  8:48 ` [PATCH 4/9] usb: gadget: bdc: remove bdc_ep_set_halt() declaration Chunfeng Yun
2020-07-14  8:48 ` [PATCH 5/9] usb: gadget: bdc: add identifier name for function declaraion Chunfeng Yun
2020-07-14  8:48 ` [PATCH 6/9] usb: gadget: bdc: fix check warning of block comments alignment Chunfeng Yun
2020-07-14  8:48 ` [PATCH 7/9] usb: gadget: bdc: avoid precedence issues Chunfeng Yun
2020-07-14  8:48 ` [PATCH 8/9] usb: gadget: bdc: use the BIT macro to define bit filed Chunfeng Yun
2020-07-14  8:48 ` Chunfeng Yun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1594716535-24699-9-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=balbi@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=swboyd@chromium.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).