From patchwork Wed Sep 9 07:32:54 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: 258616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32A24C433E2 for ; Wed, 9 Sep 2020 07:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E630221D7E for ; Wed, 9 Sep 2020 07:38:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="el//Aoxa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728297AbgIIHfQ (ORCPT ); Wed, 9 Sep 2020 03:35:16 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:22999 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725984AbgIIHfP (ORCPT ); Wed, 9 Sep 2020 03:35:15 -0400 X-UUID: dddadd983f3f4196a4af8df4884e3e9d-20200909 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=5egQoq8hPPAkOfF/INbEfBKiZv1N/+035QYwraMLsRk=; b=el//Aoxao95yTm8wnv403A4xzYHMlR0hveFSTK8XF4kV81rQMrKR7Na0/RJu0dNDUHfxg3bX8TiLDmIX9HuyNHsoWkNtpKb98HlsPVCPfUe1Gx6WGNAsbJ8vNjlfVc3QMs2E9sCzYuhVPx/ViVJ1MVquXKYB/qVqiUuRAGrL7zA=; X-UUID: dddadd983f3f4196a4af8df4884e3e9d-20200909 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 526614121; Wed, 09 Sep 2020 15:35:09 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 9 Sep 2020 15:35:07 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 9 Sep 2020 15:35:06 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Peter Chen , Bin Liu , Sasi Kumar , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v3 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type Date: Wed, 9 Sep 2020 15:32:54 +0800 Message-ID: <1599636782-7654-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1599636782-7654-1-git-send-email-chunfeng.yun@mediatek.com> References: <1599636782-7654-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: AE9BD659DFC8EA67435F8B7B61D7C588BBF055194C28253F8DD20026BD007F602000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Cc: Florian Fainelli Signed-off-by: Chunfeng Yun Acked-by: Florian Fainelli --- 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(-) -- 1.9.1 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;