Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2997345pxb; Mon, 18 Oct 2021 06:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm6VjNsfQa1vvXv/onNGUHwZJI1A1jurveFvWUMfRqfuRSi+H9kVKW+9qXJx5Y69ErxM17 X-Received: by 2002:a05:6a00:214f:b0:44c:6c77:aab6 with SMTP id o15-20020a056a00214f00b0044c6c77aab6mr28776342pfk.44.1634563135611; Mon, 18 Oct 2021 06:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634563135; cv=none; d=google.com; s=arc-20160816; b=oVj5U7gPM00dRoCyjEygdGEHePoIrcDOWkxp+U0kmxS+MMOJqM4TBIVsSOFjrVW5bX e9nC+aaEkx+NMTWe4JTLHajGr8FijSwr7aKKOu4wfZ9gVw2IvQsz7Ki0c1FiYPbPz6gQ +HjTAwtxW7Z0uopuEQP9QRCeVrUVKvZg5kURM0UeaSoKJoetK3ygGgceF7hLN0/X5lg7 OnaUkxCAdJZbLEXNjf+k884F0BZt5uVBWWs8wr7x2pUGfYCcmQc3tVM14GMro/JbwSG9 eegOL5SyNDlg7hFDrDcTW6vSyjCWxqq+Oa5Ocp9mhdMNYhxBW+1CPa1NkT1Mg4az3oVG J7qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=2RTXHr63m/ezxUktY/nhxJWnZLRBPX9iHpFWttdtL/0=; b=NkxK/eAJZM19+8Wo/Uf605qLHanbe2ma0dY6wFOYlDrFF34m0ANkadO82xVuS9OAGy C9oJ5c8veujHmya0o3Bzv+AH0BQvLif1eieep2QGWt7ujgbw7149W/vn/XE8tTVIcynb Hbz6QFjOftofDVNg0KfgE1s1KTWm0tCG3Ml2RSZsP5J1ugW+WviIyXfBDeDJEfcw2xSY LjwyycrGX/bG5yf7RfXLEht2pFNZU+HqTLLMtVvsld+LmIVhdYk6PJ7B0+fSoaN3M8Dc Wz7WDMNxAUJnxzKB6cJXg8fjiFhY8Spw3AHgCGFIjJTw1IkT0ulGTcktDyUnGsBanAub hQJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si222134plg.250.2021.10.18.06.18.41; Mon, 18 Oct 2021 06:18:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbhJRNTb (ORCPT + 99 others); Mon, 18 Oct 2021 09:19:31 -0400 Received: from mx24.baidu.com ([111.206.215.185]:60416 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231872AbhJRNTX (ORCPT ); Mon, 18 Oct 2021 09:19:23 -0400 Received: from BJHW-Mail-Ex02.internal.baidu.com (unknown [10.127.64.12]) by Forcepoint Email with ESMTPS id 8F45D95DA2A668E8EAE4; Mon, 18 Oct 2021 21:17:10 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex02.internal.baidu.com (10.127.64.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 18 Oct 2021 21:17:10 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 18 Oct 2021 21:17:10 +0800 From: Cai Huoqing To: CC: Greg Kroah-Hartman , , Subject: [PATCH] usb: host: fotg210: Make use of dma_pool_zalloc() instead of dma_pool_alloc/memset() Date: Mon, 18 Oct 2021 21:17:08 +0800 Message-ID: <20211018131709.487-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-EX02.internal.baidu.com (172.31.51.42) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replacing dma_pool_alloc/memset() with dma_pool_zalloc() to simplify the code. Signed-off-by: Cai Huoqing --- drivers/usb/host/fotg210-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 296452625488..b590995a6b3e 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -1859,10 +1859,9 @@ static struct fotg210_qh *fotg210_qh_alloc(struct fotg210_hcd *fotg210, if (!qh) goto done; qh->hw = (struct fotg210_qh_hw *) - dma_pool_alloc(fotg210->qh_pool, flags, &dma); + dma_pool_zalloc(fotg210->qh_pool, flags, &dma); if (!qh->hw) goto fail; - memset(qh->hw, 0, sizeof(*qh->hw)); qh->qh_dma = dma; INIT_LIST_HEAD(&qh->qtd_list); -- 2.25.1