Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1124888iob; Wed, 18 May 2022 23:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpm9Eocw1WhEQWrvwJhRCzBEvM3Syth2hUVR4NAzcjLKzVT1Gp9ZaB99LQruEhMASjN/Qg X-Received: by 2002:a17:902:ecc2:b0:15e:9add:104c with SMTP id a2-20020a170902ecc200b0015e9add104cmr3246932plh.140.1652940257547; Wed, 18 May 2022 23:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652940257; cv=none; d=google.com; s=arc-20160816; b=T5aJYiSPXl07lHCCl1OSxduW0xVA2r2nitKCsXLm4cYc9S7j8nsbp1dV4X6UGGBDld qHgnlUDQV1eSssyr1YoCjuwz7iByJmkr8JF8UP72PKpQfatGuqJOEopzi4YZFoVNhGL9 rIoKw9YjhxsX7t7u4JSbvLtG8Chcb0bj6N+3RNd0bWhvr9tSqOR/yXNiZ8SQFLknG9MN cfNkY+Lj3PoxCDeH0m87tZMHxTYhp4hddW+PuN/6TLu2zB1Uzz6S6gI/A8YTimPwz6SQ lo0DMJJroyLWYObQujEI9gtcPFhRd+meI7iisxIDocbM+R7Ysz764taY6ap8Wy9ddhre 4Izg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=1K5Kj0q4VA0uHycgXAZpiHxXiJ3BZne5cwNBKL+zDRg=; b=qYaLtlSQWRfHHkH0nvY25udN2td4ZTkRpLMjqYuy1N4hPy54rw9Kv1Vj1Ecps6yDss 1V7dEHa6MRJ1+pDRmFG+hEwMrxpaBs12KVtzTMDGmvxhe4LCLOTai/NPSwFBcxIIN/I4 ZiThf8odmOSxYto3esJFfgKwI0TdPrmanuWAitCH4761PJ4odJ0sqEFpJZRFfuQjZxQh aLs/Kscu2Kt9ViDMGa+UqswWt7129O8ly4C8Axrj5x65S+v/WndHMahzthtlqah9599N xNVX5aS75XSTWG4H2Xj7YzD7khXB5Uf+X2CjLMcDKQIVVDycAgsCeOfA65169JGH/ihL PbOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=j0Rr3aWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a170902ed5200b0015e8b1857c0si5158659plb.250.2022.05.18.23.03.59; Wed, 18 May 2022 23:04:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=j0Rr3aWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbiESCTX (ORCPT + 99 others); Wed, 18 May 2022 22:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbiESCTU (ORCPT ); Wed, 18 May 2022 22:19:20 -0400 X-Greylist: delayed 124 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 18 May 2022 19:19:19 PDT Received: from alexa-out-tai-02.qualcomm.com (alexa-out-tai-02.qualcomm.com [103.229.16.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAB5C3D1B; Wed, 18 May 2022 19:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652926760; x=1684462760; h=from:to:cc:subject:date:message-id; bh=1K5Kj0q4VA0uHycgXAZpiHxXiJ3BZne5cwNBKL+zDRg=; b=j0Rr3aWVOKzf8sfCk8/nd/ZmaZTfVpOgfE0FGQQW/1a45NOd4sWpdN3S VvgP/Q8FkMWVTdokTFpZGtHPJ47RpS9W2T0l1GxBbfoGw7j7U5rHScL+M 52FYo9xnBLpslLGGFZ9pTEzz7DwyhAsxkeoYk48bIZTGPC0eMeNBzf5pj s=; Received: from ironmsg02-tai.qualcomm.com ([10.249.140.7]) by alexa-out-tai-02.qualcomm.com with ESMTP; 19 May 2022 10:17:13 +0800 X-QCInternal: smtphost Received: from cbsp-sh-gv.ap.qualcomm.com (HELO cbsp-sh-gv.qualcomm.com) ([10.231.249.68]) by ironmsg02-tai.qualcomm.com with ESMTP; 19 May 2022 10:17:09 +0800 Received: by cbsp-sh-gv.qualcomm.com (Postfix, from userid 3922021) id C3CD44A36; Thu, 19 May 2022 10:17:07 +0800 (CST) From: Tao Wang To: Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org (open list:USB XHCI DRIVER), linux-kernel@vger.kernel.org (open list) Cc: quic_wat@quicinc.com Subject: [PATCH] usb: xhci: save hcd_priv memory of shared_hcd Date: Thu, 19 May 2022 10:17:01 +0800 Message-Id: <1652926622-85047-1-git-send-email-quic_wat@quicinc.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The shared_hcd->hcd_priv is not used in xhci, so not need to malloc hcd priv memory for shared_hcd. Signed-off-by: Tao Wang --- drivers/usb/host/xhci-plat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 01dcfd7..a27dd3a 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -336,6 +336,11 @@ static int xhci_plat_probe(struct platform_device *pdev) device_set_wakeup_capable(&pdev->dev, true); xhci->main_hcd = hcd; + /* + * The shared_hcd->hcd_priv is not used in xhci, + * so not need to malloc hcd priv memory for shared_hcd. + */ + driver->hcd_priv_size = 0; xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev, dev_name(&pdev->dev), hcd); if (!xhci->shared_hcd) { -- 2.7.4