Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2308463pxb; Fri, 17 Sep 2021 07:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHu10BUEqwnLMsxlFvMT9faHIuXa27EXh/mtPeFhkkBIo1DCA0KhmhEAH0l/VfM5yaQ3D5 X-Received: by 2002:a05:6638:35ac:: with SMTP id v44mr8820479jal.48.1631887364750; Fri, 17 Sep 2021 07:02:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631887364; cv=pass; d=google.com; s=arc-20160816; b=dWT4i8UW6dqSpqTcAHGfrmmA3RsyIXnJj9qrxDCs+3Xgqi7LGCw4AbztnAPv9WlZmi z9gghiHBw2AnEbkn+K1ZAk94/XlpAmKVLCDpfZaHCEuAgCxgGsq0qjSgtwXOCTKLWaEY 0r00QJd3tGiYUwz7pbGI/+Wb6Ds/TM0mOOOusErVMfc5dTdUayFXVEhF+jO/AL9zE1gK XF1g39GqLoRKeattzoBctpBi5IoiH/gFgqR75HeN+UE7C8j18ucvb4AwtJ3fNvmcZ1DM 3DnEoAbrjNTNf4Q/Bc50tvEvS/Q3lxCbCVol0ykOQmJ699a2+6mkDnBNVfQQLVpYplUo 5zDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:references :cc:to:from:subject:dkim-signature; bh=kndVqjY9sCpaHVWNklWOKb8oFcdnKBVKLygRhlHka6U=; b=0Zl9mT+g9I61z6HoPqrZ8SWpH6aDjcqdhyKjZEGBiy42+gC/h95b6n+c89R7WiwQSY WAXHcli+txG38ThOtPZQw8bxUJBdIRWxnOMao8OrfHK3o0652wYQ5LZcjsbJO5Mi6Wbo mtpjlnMrdBnkW/7gtYXdy3p2O7nQ9h67MLX/CwQjsWkqv/hYiq277qwyT5S8ml4fdpNN QVsg8RGkeIjL8jq52CeWgB6zu1ixHt7dsQ9oaroK9beZWOBm21bWjUz4vp106RNne1C8 sKla2memsqhiZ4t4+06fGx38qAWrwFjKObMMe1JNtq1jttGOfdu1Er5f8AqxeFbk39rk F33w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b="SEGytB2/"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kx11si6827768ejc.554.2021.09.17.07.02.18; Fri, 17 Sep 2021 07:02:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b="SEGytB2/"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234275AbhIQKuc (ORCPT + 99 others); Fri, 17 Sep 2021 06:50:32 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:41946 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232848AbhIQKuc (ORCPT ); Fri, 17 Sep 2021 06:50:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631875749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kndVqjY9sCpaHVWNklWOKb8oFcdnKBVKLygRhlHka6U=; b=SEGytB2/zcGY2RWw1wKxosQ0Vu9FVjvGQok87OTnvNNvaErtDAoTZreF6fWmtlmXrtExpO ufTbFeGK0NZas1imsc/M3fiJAy41So9ZePQHdifBL5d+Ei2kYWl/bJXp/vykyaRNiCArlu Vpj0D9ktDcQRb4b5nI4V0PozMVRf7Qo= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2056.outbound.protection.outlook.com [104.47.14.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-1-PkQaqTS1OHiajKqKIZMyHQ-1; Fri, 17 Sep 2021 12:49:08 +0200 X-MC-Unique: PkQaqTS1OHiajKqKIZMyHQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmFMBGQFtMAd5FDk1XbObktPuQyY9PE29Vh1aztnY4BW2K8F3rL3Qt7cpX3iN8hKygHqsKIzGnRBP+QrxMLyEivpMih4CTbVQaj3oTzcSQ/+/9RArJPzdHz+35PspHpCEJOEn8v106F4WVG3l3b/64uW4Tn/gbReK++FEINH6P0aMCxqhx206x2BCBN+qONLjN9eCVFJ0A0qO/Wu5cl9MsvoUF5c73ao2IPIsFiC+vz4v6o80E0t2Vcd94k5VYJ0IUMAAGS/n9uFzaWLCBsP4c6cDSicJmi0xLNmXKujz58wz8ygb2r3f3RCzwaOnadNHUjXWsHgR5al5/zn6VDSdw== 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; bh=kndVqjY9sCpaHVWNklWOKb8oFcdnKBVKLygRhlHka6U=; b=QoLU57JC/x81rEFxjlfeX6kCbuxpTWzm8rUaFZ/IWYGStvQlfH2VnwEh0Q+oXre8WysIiQN9pIpiUSiPcT0lE1xyY5+EqRF7Ux1eU9hV1yVQ86NAIYGlDw2OfpqIg4hdZ4xv6JFx8qrm9oswts//eKLJ1cMUoltg+/gxiNiDbQJbEAHFnbi/oqXfxi9GzEghmLU8umfsu2GqBLZ1xSetSdyBU4EC9v7FpR95tOfwzR5CRhqRCVPcA1fFbAYZs6Pe8eZZED4UhoD4As7FrF+i9vvKQanCOfOSB3EmJJI/v1GEc4rbwx5JnU/EKbvJx8FzikvOVgDFKwzfDaN9F/mblA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: lists.linux-foundation.org; dkim=none (message not signed) header.d=none;lists.linux-foundation.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VE1PR04MB6672.eurprd04.prod.outlook.com (2603:10a6:803:127::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 10:49:07 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4523.016; Fri, 17 Sep 2021 10:49:07 +0000 Subject: [PATCH v2 3/4] xen/pci-swiotlb: reduce visibility of symbols From: Jan Beulich To: Juergen Gross , Boris Ostrovsky Cc: Stefano Stabellini , lkml , "xen-devel@lists.xenproject.org" , "hch@lst.de" , Konrad Wilk , "iommu@lists.linux-foundation.org" References: <164e58ff-2edd-2c99-ac3d-e18eb06ff731@suse.com> Message-ID: Date: Fri, 17 Sep 2021 12:49:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <164e58ff-2edd-2c99-ac3d-e18eb06ff731@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR2PR09CA0022.eurprd09.prod.outlook.com (2603:10a6:101:16::34) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.156.60.236] (37.24.206.209) by PR2PR09CA0022.eurprd09.prod.outlook.com (2603:10a6:101:16::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 10:49:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a54bc54f-3d61-4688-7218-08d979c8c5fa X-MS-TrafficTypeDiagnostic: VE1PR04MB6672: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FWbW2r4tXDfuI1LT+hNd8i8PNpnTorkZ1xGGNh/073M1Ypigs4NJuPrFiyj9axEXr+RccClClbveXpPVAEBSSC9wuKFZvZQUn0gE3urO947gXoUVKr7CWlt72yRoqhWisqSiSk0wxAI6/N3AKgj+JuX/wMmdTGmNrUrhlT3kiiY75TbPq3kJy8CImjIW7JfAW7z2kQ/q6/Ix7lh6xAODw0WUfMdQF6QCiSLPW51jFBAdi161yv6nQ8gENfIXaeHbKDLcuoGn9SVfQBk/mQkDsCO8zdJ4OxmfCfEgt6IePAbN3o+Orl3etS6bkSi5iP6gDqOqTO6T1heCT5Wz7BAWIuCWxPsOt7ueRS7GdDBtk8LzAs/EzbUHNR/aFbpxHo9d13f0LJPzKMQVvBmGUSZx9PBOK+dMf4Apiee9f0FOQw6L4axcdJdRjEkr4ex7sfLlZbbL8kx2i/Xh117Itk4x34+6FCKgbSAO4U4kBp33HqklGFaC3MEQL//uThTCwVDSge96aq0Go+ld52nOZ4cCRC/WN4QPCDUXx7m/4SkM5ZONL4Pitf5Ib9bqHbsI/cmQG32b8Giq6ezBvk2wwnBF6WIHdtZKv7HG4NZx2luwb3juQLpf1piGin5AL3R8pFZbxtbhXmJwyZ1BlttujrghYjc1imrv2rDv05XNuv6+MtqEofMKjEPatyf6thMhS4n6vyEdfaBRUSe9J8VYBMdUm6Ehk7abZw6Gq5M5b8e+RYg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(39860400002)(396003)(136003)(346002)(376002)(366004)(478600001)(2906002)(956004)(26005)(8676002)(38100700002)(86362001)(31686004)(5660300002)(31696002)(186003)(66946007)(54906003)(2616005)(66476007)(16576012)(66556008)(110136005)(316002)(6486002)(83380400001)(8936002)(36756003)(4326008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VmplNWRWQWVlUEZqNDdpQ0xYR2l6bk1YbElkRmRFSzZTVUZGT05MbVhxK29D?= =?utf-8?B?NjZHN3RKUkpuK3p4QURYZnZUTnhGdVkrKzdFZkIwRzRFVE05QXpqOEx6a0Jy?= =?utf-8?B?WWg1UDB1NlExckhlOExTK3c3ZjNncklsUFA1Q1c1eHFGOUVpMldCOHkxWnpO?= =?utf-8?B?OERYTHpESGg5bWxBZkxBaTIvVFdTclVwV0FVTTQ3K0M4UUozVHpOazNRV0hz?= =?utf-8?B?RnpjVXR2OTFDcGlvaWpybUd6enZySnJ5R0RoUTh6SnUwQ2JKR1lRMU1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jJoZnN2cDFL?= =?utf-8?B?azhzeDJiRDZnY2pRemFEQUtZUWhnYmR6MTludGhBcWwrb2ExMC9FY2VmSzds?= =?utf-8?B?eXBBN1l6L001K1oxaVhHdFdhVHZPTmkvaHdSenZSVEJkWTNYTVVMSHlpRG1W?= =?utf-8?B?YkpKZ0I3aFJaZkRqRnQwUnZNMjhwRFdra0REM3lRY0kwUWhKajR1WHlhME1I?= =?utf-8?B?eXBwdGpDV05Qc3VHV1ROWnhjbkZwcGtlNVFtc2M1VHhQYksrZVVscnhNaXo4?= =?utf-8?B?YURLVitDa0RGV015RkVOMDlYbUtOcVBtemxtbkRJUkJkNVlYWUl5QVNyMlRM?= =?utf-8?B?NlpEeUxIS01IWU1BVktneVdvS0gySnY4WVN6bklqRU1GZXZFRFJLSVRtbEd6?= =?utf-8?B?dCtuT1RabEpFZ3lVNFA2TUJMUy9HN2t3byttcE9sWjF4MkFqYm5aNDRXWmNx?= =?utf-8?B?ZEVEMlVsZG9aREo2cWJWc2h5SnhUQ2s5QlU3VUtjS2hrY1lVZ3NSMThKd1pm?= =?utf-8?B?cTR3NkZhaWVraVVLcFJBRDZET2ZFelpnbHZBYXR4alRFNHY3Mi9xekR2OEs5?= =?utf-8?Q?Xriafnac+vppW8qKREz4bYAu1OGrQclhfDkfTDW?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a54bc54f-3d61-4688-7218-08d979c8c5fa X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 10:49:07.2300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HcSZ6RLEwzc3lSy0RMwhB+2RbPH6c97eWXvHMHfpiw80A3tdK/At6WCsCRoK6BnEU6oza9I0Ryy8ZoqKtJZqyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6672 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org xen_swiotlb and pci_xen_swiotlb_init() are only used within the file defining them, so make them static and remove the stubs. Otoh pci_xen_swiotlb_detect() has a use (as function pointer) from the main pci-swiotlb.c file - convert its stub to a #define to NULL. Signed-off-by: Jan Beulich Reviewed-by: Christoph Hellwig --- a/arch/x86/include/asm/xen/swiotlb-xen.h +++ b/arch/x86/include/asm/xen/swiotlb-xen.h @@ -3,14 +3,10 @@ #define _ASM_X86_SWIOTLB_XEN_H #ifdef CONFIG_SWIOTLB_XEN -extern int xen_swiotlb; extern int __init pci_xen_swiotlb_detect(void); -extern void __init pci_xen_swiotlb_init(void); extern int pci_xen_swiotlb_init_late(void); #else -#define xen_swiotlb (0) -static inline int __init pci_xen_swiotlb_detect(void) { return 0; } -static inline void __init pci_xen_swiotlb_init(void) { } +#define pci_xen_swiotlb_detect NULL static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; } #endif --- a/arch/x86/xen/pci-swiotlb-xen.c +++ b/arch/x86/xen/pci-swiotlb-xen.c @@ -18,7 +18,7 @@ #endif #include -int xen_swiotlb __read_mostly; +static int xen_swiotlb __read_mostly; /* * pci_xen_swiotlb_detect - set xen_swiotlb to 1 if necessary @@ -56,7 +56,7 @@ int __init pci_xen_swiotlb_detect(void) return xen_swiotlb; } -void __init pci_xen_swiotlb_init(void) +static void __init pci_xen_swiotlb_init(void) { if (xen_swiotlb) { xen_swiotlb_init_early();