All of lore.kernel.org
 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>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Al Cooper <alcooperx@gmail.com>, <linux-usb@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: [PATCH v4 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type
Date: Thu, 12 Nov 2020 15:59:26 +0800	[thread overview]
Message-ID: <1605167974-28502-3-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1605167974-28502-1-git-send-email-chunfeng.yun@mediatek.com>

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

Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
v4: no changes, but rebase on kernel 5.10-rc1
v3: add acked-by Florian
v2: add Cc Florian
---
 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 fafdc9fdb4a5..76463de75595 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;
 
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Felipe Balbi <balbi@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Cooper <alcooperx@gmail.com>,
	linux-kernel@vger.kernel.org,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type
Date: Thu, 12 Nov 2020 15:59:26 +0800	[thread overview]
Message-ID: <1605167974-28502-3-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1605167974-28502-1-git-send-email-chunfeng.yun@mediatek.com>

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

Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
v4: no changes, but rebase on kernel 5.10-rc1
v3: add acked-by Florian
v2: add Cc Florian
---
 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 fafdc9fdb4a5..76463de75595 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;
 
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Felipe Balbi <balbi@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Cooper <alcooperx@gmail.com>,
	linux-kernel@vger.kernel.org,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type
Date: Thu, 12 Nov 2020 15:59:26 +0800	[thread overview]
Message-ID: <1605167974-28502-3-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1605167974-28502-1-git-send-email-chunfeng.yun@mediatek.com>

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

Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
v4: no changes, but rebase on kernel 5.10-rc1
v3: add acked-by Florian
v2: add Cc Florian
---
 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 fafdc9fdb4a5..76463de75595 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;
 
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-11-12  8:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12  7:59 [PATCH v4 01/11] usb: gadget: bdc: fix improper SPDX comment style for header file Chunfeng Yun
2020-11-12  7:59 ` Chunfeng Yun
2020-11-12  7:59 ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 02/11] usb: gadget: bdc: remove bdc_ep_set_halt() declaration Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` Chunfeng Yun [this message]
2020-11-12  7:59   ` [PATCH v4 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 04/11] usb: gadget: bdc: fix warning of embedded function name Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 05/11] usb: gadget: bdc: fix check warning of block comments alignment Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 06/11] usb: gadget: bdc: add identifier name for function declaraion Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 07/11] usb: gadget: bdc: avoid precedence issues Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 09/11] usb: gadget: bdc: fix checkpatch.pl tab warning Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 10/11] usb: gadget: bdc: fix checkpatch.pl spacing error Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59 ` [PATCH v4 11/11] usb: gadget: bdc: fix checkpatch.pl repeated word warning Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun
2020-11-12  7:59   ` Chunfeng Yun

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=1605167974-28502-3-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=alcooperx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --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 \
    /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 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.