From patchwork Tue Oct 27 01:18:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 7492901 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49EFDBEEA4 for ; Tue, 27 Oct 2015 01:18:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E685208EB for ; Tue, 27 Oct 2015 01:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52638208E7 for ; Tue, 27 Oct 2015 01:18:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbbJ0BSr (ORCPT ); Mon, 26 Oct 2015 21:18:47 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:55811 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750859AbbJ0BSq (ORCPT ); Mon, 26 Oct 2015 21:18:46 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 27 Oct 2015 10:18:44 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id AE0E93CA48; Tue, 27 Oct 2015 10:18:44 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id A6A58480A3; Tue, 27 Oct 2015 10:18:44 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id A0F9148014; Tue, 27 Oct 2015 10:18:44 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id LAE12439; Tue, 27 Oct 2015 10:18:44 +0900 X-IronPort-AV: E=Sophos;i="5.20,202,1444662000"; d="scan'";a="197274714" Received: from mail-sg2apc01lp0242.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.242]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 27 Oct 2015 10:18:43 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost (211.11.155.144) by SG2PR06MB0917.apcprd06.prod.outlook.com (10.162.200.158) with Microsoft SMTP Server (TLS) id 15.1.306.13; Tue, 27 Oct 2015 01:18:41 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , , Yoshihiro Shimoda Subject: [PATCH v4 1/7] usb: host: xhci: cleanup hcd private size Date: Tue, 27 Oct 2015 10:18:24 +0900 Message-ID: <1445908710-5812-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1445908710-5812-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1445908710-5812-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0023.jpnprd01.prod.outlook.com (25.161.225.161) To SG2PR06MB0917.apcprd06.prod.outlook.com (25.162.200.158) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0917; 2:SnF/CcoQL/IaH8gGrhDCY4vYu1XJOsoOMzz0RwT8zWzM1qjP10q5uxPaHzbBsZDVcku5nThIVHZL/aQRnc3ntvxPkWIy02NBik5fSQZH7fO++8rqGxXgLSVHdBlfOJz6bh2LbXcMQbAdSoRlvaT+mf84rabuHCVo21JqomzrPlA=; 3:M81sEIz2xuaOAkM/PuvZIpQXO77Kj1Mgoz67CiRheczS2F9/vThVSmCIMI0V17zm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ljsEtnRTiyrRaAvMFzS93s4RM8zGdHI0RbUYdS9y8t1v0lQ4sLzOLPxJIIL0VmEbC1s24HNSg9oi83kbeJ27zyt0MDU2vr8oBYBbrEi/n7LVjxV5+I9ukxtYSPwuctOLdQd9NKK6kmY/8hklqdWsDEbygtjoyCQLPS1EYtEYQpHY1aU4fTqowqK9t1rBf/aJabMZ/f+F9Mm8w+buDlwl4mwKNg61o3xoocOshUilcH2FJQrcAOyA1L23Sgah8tKlz5hOXwEm4oL7HVU4g03BlHFp65vi40RmOtSVFP1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(102215026); SRVR:SG2PR06MB0917; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0917; X-Forefront-PRVS: 0742443479 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(199003)(189002)(189998001)(48376002)(50226001)(107886002)(47776003)(50466002)(66066001)(5004730100002)(92566002)(78352002)(229853001)(5007970100001)(2950100001)(77096005)(5008740100001)(5001960100002)(5003940100001)(81156007)(97736004)(40100003)(4001430100002)(5001770100001)(42382002)(76506005)(122386002)(87976001)(42186005)(105586002)(76176999)(106356001)(36756003)(19580405001)(101416001)(50986999)(33646002)(5001920100001)(19580395003); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0917; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:0; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0917; 23:IP1wJfqb+xdJcBiOfZAEeqlJRUA9wBwc4dT7WXnEG?= =?us-ascii?Q?CjQs03rSCP034Q/ZaF6Vr6P/F/Sz7cXElf3FHBOBvyNf2Vy2ckMy21KjX25T?= =?us-ascii?Q?joCDfsnMz+YZ4sRmprkMsIew1HTaFUiDDA3xuPyQUl2GQ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vfrdNzm23q3BfswRnqUohl5OClLBW2Nl76uXWuaOw2DnZPJbi?= =?us-ascii?Q?y1jhJ3bKnRP95p6q4rqdY2c0DX3+ga1cJ+uFKm/ihu0iiRUz5SgHNe6JirSw?= =?us-ascii?Q?osZy2trK/8XOSTnmzSU7sW4IyDZVZAj?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0917; 5:R28slWnT4AS5/6sw41aLUmj0fFpfUiuVdBcV0sFfkRK0jm09gt1QuBi4ClFSeAzKH+u+aghlGX/NT1vIpm/N5n45g8kbBSlPf6OpVsCUdRM1zhESgOBo1SaRzs3/wbl8eiJLEXlS5nFa1NcaQRfE7Q==; 24:8OKCNdNyR2j7z2U+5uR+9fc0imv9N+USNcbH6HBXgqDWG2gbgoUlS602MpNOZIcu66qWbSRUn+I6hVW/olsPfxGmiCgT11FXx+WobHG5tH8=; 20:HP58tOe7I8P+g7GgR+PEhpKXBXr+kZb0qPmwh0RdPi4WcDpNm/gbLFR0B8C9lbLyz4icLs25tZ1WpoK2KocdR1nsD7TevE4sMDttdSvMP1/tvjOwDaGRbGk/nWZ1DhKvbIDis6Q6FwmHqPSLa6eJrMau13CQb8kwKSqvTLewkd4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2015 01:18:41.6996 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0917 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-4.9 required=5.0 tests=AXB_X_OUTLOOKPROT_ENVSDR, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch cleanups the hcd private size to suitable size. The previous code has "sizeof(struct xhci_hcd *)" in xhci_hc_driver as hcd_priv_size and sizeof(struct xhci_hcd) in xhci_plat_overrides or xhci_pci_overrides as extra_priv_size. However, the xhci driver uses a "sizeof(struct xhcd_hcd)" memory space in each hcd (main_hcd and shared_hcd) actually. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-pci.c | 1 - drivers/usb/host/xhci-plat.c | 1 - drivers/usb/host/xhci.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 17f6897..b51ac63 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -53,7 +53,6 @@ static struct hc_driver __read_mostly xhci_pci_hc_driver; static int xhci_pci_setup(struct usb_hcd *hcd); static const struct xhci_driver_overrides xhci_pci_overrides __initconst = { - .extra_priv_size = sizeof(struct xhci_hcd), .reset = xhci_pci_setup, }; diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 05647e6..4699c1e 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -31,7 +31,6 @@ static int xhci_plat_setup(struct usb_hcd *hcd); static int xhci_plat_start(struct usb_hcd *hcd); static const struct xhci_driver_overrides xhci_plat_overrides __initconst = { - .extra_priv_size = sizeof(struct xhci_hcd), .reset = xhci_plat_setup, .start = xhci_plat_start, }; diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6e7dc6f..c295785 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4942,7 +4942,7 @@ EXPORT_SYMBOL_GPL(xhci_gen_setup); static const struct hc_driver xhci_hc_driver = { .description = "xhci-hcd", .product_desc = "xHCI Host Controller", - .hcd_priv_size = sizeof(struct xhci_hcd *), + .hcd_priv_size = sizeof(struct xhci_hcd), /* * generic hardware linkage