Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2708844ybi; Sun, 28 Jul 2019 15:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFOyhRwU9q7DMtxkk/mjINOF5EajaztVBk4uwVyXDTLHZE8LxXA2LH5ZheihP9baGWIqQu X-Received: by 2002:a17:902:28c9:: with SMTP id f67mr68158091plb.19.1564354394981; Sun, 28 Jul 2019 15:53:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564354394; cv=pass; d=google.com; s=arc-20160816; b=RtO8UvntJl5qUJyECFfFzJft0IsxWpxmmUteg6pqaKD0uUnFNmYFfkLEoLuVNuPNK9 WcjX1OnF7J8mkPx+tB0ll8S7p4qbZor7ldL0CpMJpMg903JUukhCgHX+hUyihdwSu5sS s22jpbZAsbTRqEvaLnGTOPhZ4xnCfuq3XJq5YHECiMxhd8ektTXQa/joIF7eEERB/j2X ejVlf7u+ZD1tK6mMw9UiSlS9DK3duJ7zs2+/zt3umsAoIJOocXTuu/6EvDLIQ9skT/NB UeRDQvPxrRjZKWTCQeC8yfGZRHzocXf9wc3qaX0BhCbcL0gIsKvP9PJxK9aHFyfHZ67J IPvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=1t+e0kdgV/QI2HfuepYYo8ALA2TOfk9UcfFB4PXRaNo=; b=oDdWc/L3+ZWrR8zbceGEYJDkrJqOsOdlnTqFgMFiva2GnVTDgLFRgnkvjWBYDGKgZ0 vxDBiMFcChr4LUpWBxBHutSPfCSmsWnOZXnyCskBT4uhxi6d3cPox7cn/sRL6OcclkL8 vuDKNTlQCxqV32nLWVg/qxSloG0t4UO8jq2tsrOAGpvUPzt1gSiC+jN1tc8afN5gT8Wc OEu1t6wCVjyIN4ufv1ZjTZNKB/G9GI6lZ+SKS5zlzEFyfxoe/WCcAhKxWBUENt+rjXog O+gyHz/sK+qvopqd6loxLiEfhiGfuqLQZJBAtcxl752iij5X/UnkhkFsOmhFsh5Td+0z +hNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wavecomp.com header.s=selector1 header.b=R26HwiPe; arc=pass (i=1 spf=pass spfdomain=wavecomp.com dkim=pass dkdomain=mips.com dmarc=pass fromdomain=mips.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si26191681pfg.136.2019.07.28.15.52.29; Sun, 28 Jul 2019 15:53:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@wavecomp.com header.s=selector1 header.b=R26HwiPe; arc=pass (i=1 spf=pass spfdomain=wavecomp.com dkim=pass dkdomain=mips.com dmarc=pass fromdomain=mips.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbfG1WuB (ORCPT + 99 others); Sun, 28 Jul 2019 18:50:01 -0400 Received: from mail-eopbgr700098.outbound.protection.outlook.com ([40.107.70.98]:50705 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726103AbfG1WuA (ORCPT ); Sun, 28 Jul 2019 18:50:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oLKmNkw5ACkjsvHmCaMJQ1lRGRvUswEAHWuGeaXhjxupaaJq3Q6PUuyCPE9vGXGkJvq+1EmsQYa9YazdmieohHXZcMu/KbXCmreD9b7oG/aLJuldvpKFNdv1BWQlQWhIDFr7eaIjOH3va/ozHDVYdKUx27rZ2E+kLOpjwEt1nfijep/PflzKHaShRPx0d3BhmHgnWgc2uF4Y4cKAw6p0/xTIBEY/neUZ6JGfL9Fi3nHCEQmyZVbtz0HBHsvyo4gi+Cc5cexPrw4DTRiq/62bNia16yOfLFCd+SZ1R0nTVZ8e4JD3Af7BQaz3slRCr3avS+rc75eRoCy5NueAXWO0Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1t+e0kdgV/QI2HfuepYYo8ALA2TOfk9UcfFB4PXRaNo=; b=kXmAlJpm4IDgFWMciKZdZczpaBawUxioXFZSLt38GDQ4jD5lu70jg9o8QYI/f/HVqPTcPWf7vH0ibdhKN5FryiJkd6hj1OXSurPEmOJwgFTPKVFr3dT5GZlVh4nZHBTD+ifvHBe147K5VEDcjNX7LZqA3ODuHJk0gqP3/t7gdAye6PIaekv7u/SkT/vfGHelN/yfgqLZfgrSY42q3eTFepQkUoZr6QEOHyomf9OOTD62xohkd1oTyw8a2ubWUdzqi7qaIeaspcli4R/QtXqR9q4MdIckRZGvLBAVC7sushTIvK4LEZaGWe8oI4gnvsbieOHG7MbPBBkuRc80DVZZtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=wavecomp.com;dmarc=pass action=none header.from=mips.com;dkim=pass header.d=mips.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavecomp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1t+e0kdgV/QI2HfuepYYo8ALA2TOfk9UcfFB4PXRaNo=; b=R26HwiPeP8BQNG2RyotTltxCEtfBhBs5xSR+8GrJIOv8VafzqBgu6LAAnhi1leiK3c6wsekwlUtQJ7Txk5Uj/nO2epH9WJHj6HM0VK75OodvrCav2aVGLS/lzyx55gBlt3pW66lNwts0mf4bWXTaz9tuYAj8YIQ0I06v/A7HLoI= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.172.60.12) by MWHPR2201MB1375.namprd22.prod.outlook.com (10.174.160.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.10; Sun, 28 Jul 2019 22:49:55 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::105a:1595:b6ef:cbdf]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::105a:1595:b6ef:cbdf%4]) with mapi id 15.20.2115.005; Sun, 28 Jul 2019 22:49:55 +0000 From: Paul Burton To: Denis Efremov CC: Bjorn Helgaas , "David S. Miller" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Ralf Baechle , James Hogan , Michal Simek , "linux-mips@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "sparclinux@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [EXTERNAL][PATCH 1/5] PCI: Convert pci_resource_to_user to a weak function Thread-Topic: [EXTERNAL][PATCH 1/5] PCI: Convert pci_resource_to_user to a weak function Thread-Index: AQHVRYJLuix0vLkFjkOXtfNq2O4qQKbgooWA Date: Sun, 28 Jul 2019 22:49:55 +0000 Message-ID: <20190728224953.kezztdozc6k24ya3@pburton-laptop> References: <20190728202213.15550-1-efremov@linux.com> <20190728202213.15550-2-efremov@linux.com> In-Reply-To: <20190728202213.15550-2-efremov@linux.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0043.namprd02.prod.outlook.com (2603:10b6:a03:54::20) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:18::12) user-agent: NeoMutt/20180716 authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [73.93.4.225] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a04180d2-8bc9-41d1-8562-08d713ade8bf x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MWHPR2201MB1375; x-ms-traffictypediagnostic: MWHPR2201MB1375: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:983; x-forefront-prvs: 01128BA907 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916004)(366004)(346002)(376002)(136003)(39830400003)(396003)(199004)(189003)(66476007)(66556008)(71190400001)(66946007)(5660300002)(4326008)(71200400001)(76176011)(7416002)(6246003)(53936002)(256004)(6916009)(66446008)(64756008)(52116002)(99286004)(6116002)(25786009)(3846002)(66066001)(6512007)(9686003)(44832011)(305945005)(81156014)(6506007)(26005)(81166006)(316002)(478600001)(476003)(8676002)(186003)(68736007)(7736002)(229853002)(446003)(6436002)(8936002)(486006)(2906002)(33716001)(1076003)(102836004)(6486002)(54906003)(42882007)(11346002)(14454004)(386003)(58126008);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR2201MB1375;H:MWHPR2201MB1277.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LGoXH/hfZ2EmVxj3CUBqAL1sE0i9frxkLeyaAv11qd5O/T0Vpk5dzHcq5B69mWk9zzcZGjP8mgNYqnYgk8VqWacbSL5U1PAXFUuEUxznedrRjQwQV2vPSyfCz2/0ML4894jFWL5b9GgZoPlrjT7dZ8vyafd0q/MtN4sU7xDwnvr+Quk4JuTf2quk4QpWt+gytYlAgN9WF/xbO6KcK2SOv/ebCUzSDWbybST6lhuT065w+DYtU/sfa+9g9lrHpN+xqIVS7fcS0DGisdVV0uROM8JS2Q+vNtIMz2MBVoRQGNaWh0MilRwAmDP6FXuXef+RGu3NNUfdXp0HIPTnpe2WMds9niDVqNKpSlA+naW4VSVt+Y5txDN3lNRiB2e+jDH4pvj72xFpYjGeMDxphd52Bnfx5LUtHJxgrIr28bB8Na8= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: a04180d2-8bc9-41d1-8562-08d713ade8bf X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2019 22:49:55.3491 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pburton@wavecomp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1375 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Denis, On Sun, Jul 28, 2019 at 11:22:09PM +0300, Denis Efremov wrote: > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 9e700d9f9f28..1a19d0151b0a 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1870,25 +1870,13 @@ static inline const char *pci_name(const struct p= ci_dev *pdev) > return dev_name(&pdev->dev); > } > =20 > - > /* > * Some archs don't want to expose struct resource to userland as-is > * in sysfs and /proc > */ > -#ifdef HAVE_ARCH_PCI_RESOURCE_TO_USER > -void pci_resource_to_user(const struct pci_dev *dev, int bar, > - const struct resource *rsrc, > - resource_size_t *start, resource_size_t *end); > -#else > -static inline void pci_resource_to_user(const struct pci_dev *dev, int b= ar, > - const struct resource *rsrc, resource_size_t *start, > - resource_size_t *end) > -{ > - *start =3D rsrc->start; > - *end =3D rsrc->end; > -} > -#endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */ > - > +void __weak pci_resource_to_user(const struct pci_dev *dev, int bar, > + const struct resource *rsrc, > + resource_size_t *start, resource_size_t *end); > =20 > /* > * The world is not perfect and supplies us with broken PCI devices. This is wrong - using __weak on the declaration in a header will cause the weak attribute to be applied to all implementations too (presuming the C files containing the implementations include the header). You then get whichever impleentation the linker chooses, which isn't necessarily the one you wanted. checkpatch.pl should produce an error about this - see the WEAK_DECLARATION error introduced in commit 619a908aa334 ("checkpatch: add error on use of attribute((weak)) or __weak declarations"). Thanks, Paul