From patchwork Fri Sep 25 05:58:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11798961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4629C618 for ; Fri, 25 Sep 2020 06:02:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A59121775 for ; Fri, 25 Sep 2020 06:02:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="u/IHtzil" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbgIYGB0 (ORCPT ); Fri, 25 Sep 2020 02:01:26 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:52869 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726990AbgIYGB0 (ORCPT ); Fri, 25 Sep 2020 02:01:26 -0400 X-UUID: 3dffde2c96cc46efb8af3660c358bd1e-20200925 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=tnTXrW+viUcET7ilMySC0jNd0vhu5XBB0MZp5smjZUo=; b=u/IHtzilf8Woc4tmjsedC7idEaWm/mJwddQKsVC0oyJ30BoR4enEw+TU5NcZeeyvKSQezkyzr4UqtL9BraOSEQaHD/lhQeByaAp52ory+zxYcnX9Rf94IO2NnJ4Ao8CwZ8gMGTofWME0nf20KzaZCnm05+Del6Sek3/9gIMublw=; X-UUID: 3dffde2c96cc46efb8af3660c358bd1e-20200925 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1958158567; Fri, 25 Sep 2020 14:01:20 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Sep 2020 14:01:18 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 25 Sep 2020 14:01:17 +0800 From: Chunfeng Yun To: Felipe Balbi CC: Greg Kroah-Hartman , Matthias Brugger , Florian Fainelli , Chunfeng Yun , Al Cooper , Sasi Kumar , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type Date: Fri, 25 Sep 2020 13:58:11 +0800 Message-ID: <1601013499-28920-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1601013499-28920-1-git-send-email-chunfeng.yun@mediatek.com> References: <1601013499-28920-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 6A5CBFBC10784D0BF179ABE74E3B3DCC5998AE9FCFEF7BBE740656628695DA722000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Change-Id: If78cc929287fa45a3f9de38f2e7057307cd295dd Cc: Florian Fainelli Signed-off-by: Chunfeng Yun Acked-by: Florian Fainelli --- 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 fafdc9f..76463de 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;