Message ID | MWHPR03MB26690A6775AA12D58E6770E1BFEB0@MWHPR03MB2669.namprd03.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47347607F0 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 05:19:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 394B028620 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 05:19:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CB732873C; Tue, 23 Aug 2016 05:19:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B211C28662 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 23 Aug 2016 05:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753175AbcHWFTy (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Tue, 23 Aug 2016 01:19:54 -0400 Received: from mail-sn1nam01on0135.outbound.protection.outlook.com ([104.47.32.135]:26656 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752840AbcHWFTy (ORCPT <rfc822;linux-pci@vger.kernel.org>); Tue, 23 Aug 2016 01:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UqhuI6F7cm7xjbYTLQKjB5zEhmGwCpalQN3cn0YGcww=; b=bi+higv9Y6HqrVI2tMEPIngLYM4NGUlejm8SF0WGbajdNR2ImBlQIkx8ebJv1sRmtLNyla214vOBStbtcfRRq7w3iwA3FmvLDoGsJnjui5tCb0bXDPaouiUubC/98fqHsTjAfwcUsftjXM0cL6MYxnxgm68C2In7+RY/wcX9vBY= Received: from MWHPR03MB2669.namprd03.prod.outlook.com (10.168.207.15) by MWHPR03MB2544.namprd03.prod.outlook.com (10.169.201.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Tue, 23 Aug 2016 04:46:39 +0000 Received: from MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) by MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) with mapi id 15.01.0587.009; Tue, 23 Aug 2016 04:46:39 +0000 From: Dexuan Cui <decui@microsoft.com> To: Bjorn Helgaas <bhelgaas@google.com>, "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, KY Srinivasan <kys@microsoft.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "devel@linuxdriverproject.org" <devel@linuxdriverproject.org>, "olaf@aepfle.de" <olaf@aepfle.de>, "apw@canonical.com" <apw@canonical.com>, "jasowang@redhat.com" <jasowang@redhat.com>, "vkuznets@redhat.com" <vkuznets@redhat.com>, Haiyang Zhang <haiyangz@microsoft.com>, Hadden Hoppert <haddenh@microsoft.com>, "helgaas@kernel.org" <helgaas@kernel.org>, "Stephen Hemminger" <sthemmin@microsoft.com> Subject: [PATCH 2/5] PCI: hv: use pci_function_description[0] in struct definitions Thread-Topic: [PATCH 2/5] PCI: hv: use pci_function_description[0] in struct definitions Thread-Index: AdH8+U27+NcIrKnYTiunOb/QIXII6g== Date: Tue, 23 Aug 2016 04:46:39 +0000 Message-ID: <MWHPR03MB26690A6775AA12D58E6770E1BFEB0@MWHPR03MB2669.namprd03.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [112.65.1.155] x-ms-office365-filtering-correlation-id: 10d441ec-a437-4bcc-20a6-08d3cb1078c0 x-microsoft-exchange-diagnostics: 1; MWHPR03MB2544; 6:3cfUIRENOQh7cGO88TCgbZV4ojV/Cbn5AoHYHgjH0bd0K137N2/lL8FuphWbCaJWyyPD7JJ1UPAqif6Mkwr24aSfJA1Pzs1xH89ycA4nR9qnmqtk6JMeVGSPSheqwB4JFRd9IVIKRqGIItfxT26SC6puYuF2ntr2TzMBFE38crRFULlO9Iqd2dZmdDWx7QxmHWraTqqxaE+ylPyIPpJwV1FhGirUCOTGdIffUfUvuTxPhv3+bcpJ4f9qCPl7fKqUv5MIedvSsNbs19M5HW8oJ9UmuIO6sXWD0GwPO/QNE4WdoiHeGJebcfOTVsTUITkJUcFdKoJZReL0I/73NMRShA==; 5:fEIC/njnTBPJHSCwj3clod6OoHXeDPFIeAcjwiz3ioIH7dbsEsieBFNOIbxL5NKeXGZXD7bRW9Y5Cd8HkdU7t2291sCqhFZ/QSq+qZonogPkbmAjAsBawQ/jrDGbIA5jDmvcJV8ziVonoCRVhRieAA==; 24:JhCvYlLjdkqIygHjE3VyVGKu6esj4ZmVpfFQOLJp28QSlAN1JDPPprnv38Gf8R3BdikGN6/jK19tsrIkUQy3Hc2+juerGLTT8lHX9uAMgF4=; 7:CRM3pDiy0Ly9U89HvteAMrKXYZ0Ak8ScgbNVv5u56UYdweQVbzj3cIBdQjTlLJHiJ7Lfwp/CRRm9Gkcy9MeWRvIiKSY9eftDhpCfus9W4eyZTVqV5VqQHYlEDip9RqFsYG/A6oVMchnbEG9JupH0PhboxZMwnbSKM3ffmVSFYFd1y9RXlmOb33zpm8tKRiWmHoKEtPUpkkueYr7ixCRGShMBo69h8si5/nSsKHZhOtAhm76DGXEWj41ZeCgMEKnQ x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2544; x-microsoft-antispam-prvs: <MWHPR03MB2544E3F4B5E7F180BBFDDED5BFEB0@MWHPR03MB2544.namprd03.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(61426038)(61427038); SRVR:MWHPR03MB2544; BCL:0; PCL:0; RULEID:; SRVR:MWHPR03MB2544; x-forefront-prvs: 004395A01C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(4001450100002)(106356001)(10090500001)(2561002)(11100500001)(92566002)(305945005)(7696003)(7736002)(5660300001)(7846002)(8936002)(81166006)(81156014)(2900100001)(77096005)(8676002)(2501003)(8990500004)(7416002)(10290500002)(5005710100001)(5002640100001)(10400500002)(74316002)(9686002)(122556002)(97736004)(5001770100001)(189998001)(19580405001)(107886002)(2906002)(2201001)(76576001)(54356999)(99286002)(50986999)(86362001)(3846002)(102836003)(19580395003)(105586002)(6116002)(33656002)(586003)(1511001)(3280700002)(66066001)(101416001)(3660700001)(68736007)(86612001)(2421001)(87936001)(229853001)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR03MB2544; H:MWHPR03MB2669.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2016 04:46:39.2552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2544 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 78758e9..cdbadea5 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -259,7 +259,7 @@ struct pci_bus_d0_entry { struct pci_bus_relations { struct pci_incoming_message incoming; u32 device_count; - struct pci_function_description func[1]; + struct pci_function_description func[0]; } __packed; struct pci_q_res_req_response { @@ -394,7 +394,7 @@ struct hv_dr_work { struct hv_dr_state { struct list_head list_entry; u32 device_count; - struct pci_function_description func[1]; + struct pci_function_description func[0]; }; enum hv_pcichild_state {
The 2 structs can use a zero-length array here, because dynamic memory of the correct size is allocated in hv_pci_devices_present() and we don't need this extra element. No functional change. Cc: Jake Oshins <jakeo@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Dexuan Cui <decui@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)