From patchwork Mon Oct 26 08:12:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 7486001 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 8238BBEEA4 for ; Mon, 26 Oct 2015 08:13:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 847AA20651 for ; Mon, 26 Oct 2015 08:13:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E115206BE for ; Mon, 26 Oct 2015 08:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbbJZINA (ORCPT ); Mon, 26 Oct 2015 04:13:00 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:16853 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752964AbbJZIM6 (ORCPT ); Mon, 26 Oct 2015 04:12:58 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 26 Oct 2015 17:12:56 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 96E0E4B8CA; Mon, 26 Oct 2015 17:12:56 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 944538002E; Mon, 26 Oct 2015 17:12:56 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 8CE608002D; Mon, 26 Oct 2015 17:12:56 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id TAQ29415; Mon, 26 Oct 2015 17:12:56 +0900 X-IronPort-AV: E=Sophos;i="5.20,200,1444662000"; d="scan'208";a="198436140" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 26 Oct 2015 17:12:54 +0900 Received: from TY1PR06MB0927.apcprd06.prod.outlook.com (10.164.99.153) by TY1PR06MB0942.apcprd06.prod.outlook.com (10.164.99.155) with Microsoft SMTP Server (TLS) id 15.1.306.13; Mon, 26 Oct 2015 08:12:53 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost (211.11.155.144) by TY1PR06MB0927.apcprd06.prod.outlook.com (10.164.99.153) with Microsoft SMTP Server (TLS) id 15.1.306.13; Mon, 26 Oct 2015 08:12:51 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , , Yoshihiro Shimoda Subject: [PATCH v3 1/7] usb: host: xhci: fix hcd private size Date: Mon, 26 Oct 2015 17:12:29 +0900 Message-ID: <1445847155-5468-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1445847155-5468-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1445847155-5468-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: HK2PR02CA0037.apcprd02.prod.outlook.com (25.163.104.175) To TY1PR06MB0927.apcprd06.prod.outlook.com (25.164.99.153) X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0927; 2:CQbgPVpWtfvXxs8Tg+ryEYkeBmb6DdK6CFE5FVulFNeZOzNOkaEjcHeYVSlLYjLAUhFiUQf9nLqY2z2v1OxL6fO1BRTwd5bjEDD9H1Z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wfHCDjuJHj5boeYNZjydNIRCJfEYanvwiEQOw+8qQf1iQ8; 4:mJElP471XVj9YRQmOpeXHuG3w1upWOM64S9hM6DdKDrwo5fVT3fILFnYwBsh6R/lA9SUHpzVM7UYwjRmdQjTszrKXqeXuOOZGgeTTSsCJfaELuHq8iKv3oDpL2PLoQuLJSDliieZ+kd+0InOWCTD56xe7X75Y6zoadr8wMoYSnVnN7nh4BQRyGUTgYhR1Hd94teIqfuS+HAida77m0RgfG/63Hu7VNtkQMab2IHwW8D4I2jbdTUvLXqZZJ1dc8J3fpHCUt10KZM9zk3wM9c1FeqeduiuwxpkCUbT5Zpl9y1u0ZX6CAy+LZT23s4z1iZjVkxjrH566enQhNbNOlWvifIrLTjJ76qhee2j5q6SFfO+dTd71sTR4XoKfEtwFc/u 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)(5005006)(520078)(3002001)(102215026); SRVR:TY1PR06MB0927; BCL:0; PCL:0; RULEID:; SRVR:TY1PR06MB0927; X-Forefront-PRVS: 0741C77572 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(199003)(189002)(97736004)(48376002)(81156007)(50466002)(47776003)(5003940100001)(66066001)(4001430100002)(36756003)(33646002)(42186005)(19580405001)(2950100001)(19580395003)(5001770100001)(76506005)(105586002)(106356001)(87976001)(42382002)(92566002)(229853001)(107886002)(5004730100002)(101416001)(50226001)(5008740100001)(5001960100002)(40100003)(78352002)(122386002)(76176999)(50986999)(77096005)(189998001)(5007970100001); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR06MB0927; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:0; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; TY1PR06MB0927; 23:shmucqotDIZpaRe4gSSJJE78iy2O+rSqdMWXQERrA?= =?us-ascii?Q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pwzliSodKle8ufKlcFPRxza2WNF2Nf3zP?= =?us-ascii?Q?xS6C7z5QqMXCm8R2nIWD2zvBW0C8GNTOalUIgjAOTVS2ybpbYRZeqKrMLVxi?= =?us-ascii?Q?THhdlIuH4tBkynDd3Orpht7q9ets3ARaHwywCYC9OO5kBqLWD8406r1/x6Pp?= =?us-ascii?Q?zdFzAhPnd3szrtm0AD0BmGxYqtEPaYLRedPHqPouUQer9yh0A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0927; 5:XXwuGs8R//kAknfGy+ipERK2nIiRbgKKiKLJ5XaNVodCgTbytSnV6U6NK9V0y/v9zXbMl8QRlcX+RhL7d2sms7sgIZUs30h/o+FTaF68DLPmpP58DOBMAFCQbriHkXCXnxNEhKAsFRjdks2rDon+iQ==; 24:uMEyrfoDVctXQq3s08VGO7168fWSC/gMMdFFP4/kp/zBtIKZqEnGLSP2zHHwVWTGL4KQ2VuOrdDdtUB3zIg3HsMzV5qiASj/AwuwyBUtSYg=; 20:Yb0bu48RUsLk8eDibi9xZx+c6XuiKd03QrzxzG4gVZhqpe1sWBRwalIS9J+OgTAq4bjKpfs3Uc9LRa4LZT2bqATmMvjsYev7NEQqRNVuW45YNRx0BmZ0LKm4HQP/9ZgFuPCBcESTdXcQhSk2nIrtyFhAkEhIL0dYMzHSfk0K1LA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2015 08:12:51.4770 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0927 X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0942; 2:5QdVIrNBceET857p4nBSkPOEHtsBDQ3nD8RfFvjQeV/qAm3egS6NZ7e1d2LFaFUMwmfyvcKMVBbqV0xRw4pBea6ZCTygBtfvn6A9j4ABx5NXIWE1T05Kxq/vWGHl783R2JXNTnfa+Hp0TYmKEbgD09ClH/DL0zOl5S+s3I6AuMk=; 23:Cg/iaWU972GoDvEmjY81JgSa3LL9cZz3IK4pzg9ItDu9oKw8uOFUjIk8zGrT91s/8B3hRc3NMZT/ztL6IJfpwIP0dSrDuOTkVfXvoGBb26hdmQV56+0sYp/It3Cz2KJxLYGjSQwRW6XnZdJR64aLikj4cqJtrwfV0JT8EDLiOZvsOFr37hZTsqU/KFfs01BK X-OriginatorOrg: renesas.com 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 fixes the hcd private size to sutabile 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