Received: by 10.213.65.68 with SMTP id h4csp1021336imn; Thu, 22 Mar 2018 13:35:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELuUzxyTqX+GB6rQCY52asMzoyin4mcBH1X0LmfqjI5H+E7LK7oP+xskYAMBnFO+GjcjS/fM X-Received: by 2002:a17:902:52c7:: with SMTP id a65-v6mr26481292pli.249.1521750922547; Thu, 22 Mar 2018 13:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521750922; cv=none; d=google.com; s=arc-20160816; b=twAe9fmy4A1Kbv7IBqUPAL8TU/VNd/RifEysemf3DLqPtv9bBxl9FWBfrzI0KHJzbN 9zdtEYjtc8HfiDa1Twivm7BXp8HJ0KNcgXCQJYK+CeVkklAUL44Xxhq8rBUVgicGXvkr Q1l3VB2F7dxy8bqeTxaQBD5wilZWjWJc8gsi7Id5n0eASq0sagA9g8WXbASzqojzNyu1 cILDG1E2USoh0BGsw/lk1Z282z5iiSLkgkq981fS78NYUYgMEZsSt1uClID4w4S6tZh9 8YD3bAc0BrkMRG6SB5th38xUNPfqKl5WGNWgR3x6ku6z69kxmgbCz0Gy20f8QQtPCu5E 3TSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Jr979PAGjK6kMmejvDRCfnQlxIdS0H+dK1tHbcfRpj8=; b=hIq4TyX0yL4ad70txFBU9yr5XLyftfdDYm3E8TH8nutuoxNuYflHjemdVCqzMWk9ma /gntQfy0rRNbzPY+2aNji4vB8WLThxg0fMZySK3jYSCbSZoHJn+P3ojQeesQOHID1OUo JWVX4UNDwfyYzGK0H0Z8hKNtufDip6v5F7AXdS+uX4NM4ILZ2uDJzPhL2Xg0xnxdu7+j V5+Qf895xIfB/Xq4VrrRebl5lLQST4/1wdkG0sPD9EZ5DjXRVFoEv7+kbscSM+x5z5G0 2YhWXK36t72Umm8nCMLbP60uN8T1gkdC8WqjFOVEt2oMjgZxHacp4dsxRdXiDHlHTSny L8XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fG27Y/O4; 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 h191si4874576pgc.716.2018.03.22.13.35.06; Thu, 22 Mar 2018 13:35:22 -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=fail header.i=@gmail.com header.s=20161025 header.b=fG27Y/O4; 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 S1751586AbeCVUeH (ORCPT + 99 others); Thu, 22 Mar 2018 16:34:07 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:51550 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751286AbeCVUeG (ORCPT ); Thu, 22 Mar 2018 16:34:06 -0400 Received: by mail-wm0-f68.google.com with SMTP id v21so7155603wmc.1; Thu, 22 Mar 2018 13:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jr979PAGjK6kMmejvDRCfnQlxIdS0H+dK1tHbcfRpj8=; b=fG27Y/O4oVvcbZ8GNfyFm49bol1YHuWh+JThH5MIDwkomBVBsjv4Lch4w6lxhXPOxx oUGo89L4EW8LYtiFBQD5Gd1wEU86Em57NiyPdp2TXBQRXhxCMcos4swddJGuTY5J5nsH JTfITxDJaTNvelbuW2kEBGaJkXM+diGRrGbUgDpPFCA0smcJqkuyZ8fISfVyEIqhtED6 RRnfO8VUmDPzxJ09S+S3DslmILlKNZyVnjufm0YzFSd4iTuozQO94RVAoc/sxk6aSEB9 3tLz9iHmFEHG43RUYt07XirWee1Eoq/LVzuf3acLOF7HvY3FIjO1z/4n5rOr1FOijMhL CHZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Jr979PAGjK6kMmejvDRCfnQlxIdS0H+dK1tHbcfRpj8=; b=QvwAUm3rwTLjy3TTWewqKEQOxm1P/NDBZipr6WXlcoDQySZlrxqFSs96cKlQnwh5/f 2/aK6YwlVv/RFEIJHtIiJr0+7LPh9ZzeRRz7bw9EMx9lPb/9thYjYlQqAUpxI3d6Hu3+ Kdj6wD6kRx0dg3CZPx8sRwAWsstz1ePtJjpjcKwcJ1DA+ATHPYQjOWSumF5KhzgGbKHv kUZrBDjHXGJ9Zu938Q5mKjb382/QKUkg5O0M05VHOo12MEDLUXA9BpozTYcaoKaGMl5u cB38IkMzByGqixGTB9g0GgmWQGpyItyYVTdbfPPEXBrb8smQ3lNt9oGgDn85+D3au/S7 yfnw== X-Gm-Message-State: AElRT7EebtPst4uZ2s3vs0fO5fyNiFQRNN6RV8vltd6Y1LwOszGeUUVC IfBAy1FVgoOrBzDLGN3SVhM= X-Received: by 10.28.36.134 with SMTP id k128mr7199578wmk.2.1521750844898; Thu, 22 Mar 2018 13:34:04 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id m62sm9103153wmi.19.2018.03.22.13.34.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Mar 2018 13:34:04 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 4891A10C03A5; Thu, 22 Mar 2018 21:34:03 +0100 (CET) From: Mathieu Malaterre To: Bjorn Helgaas Cc: Wei Yang , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Mathieu Malaterre Subject: [PATCH] PCI/IOV: Add missing prototype for powerpc specific Date: Thu, 22 Mar 2018 21:33:55 +0100 Message-Id: <20180322203355.26448-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some prototypes for weak functions were missing for powerpc specific functions. Add the missing prototypes to the CONFIG_PCI_IOV block. This fixes the following three warnings treated as error when using W=1: arch/powerpc/kernel/pci-common.c:236:17: error: no previous prototype for ‘pcibios_default_alignment’ [-Werror=missing-prototypes] arch/powerpc/kernel/pci-common.c:253:5: error: no previous prototype for ‘pcibios_sriov_enable’ [-Werror=missing-prototypes] arch/powerpc/kernel/pci-common.c:261:5: error: no previous prototype for ‘pcibios_sriov_disable’ [-Werror=missing-prototypes] Also in commit 978d2d683123 ("PCI: Add pcibios_iov_resource_alignment() interface") a new function was added but the prototype was located in the main header instead of the CONFIG_PCI_IOV specific section. Move this function next to the newly added ones. Signed-off-by: Mathieu Malaterre --- include/linux/pci.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 024a1beda008..f43b43b9b643 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1295,7 +1295,6 @@ unsigned char pci_bus_max_busnr(struct pci_bus *bus); void pci_setup_bridge(struct pci_bus *bus); resource_size_t pcibios_window_alignment(struct pci_bus *bus, unsigned long type); -resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev, int resno); #define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) #define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) @@ -1923,6 +1922,7 @@ void pcibios_release_device(struct pci_dev *dev); void pcibios_penalize_isa_irq(int irq, int active); int pcibios_alloc_irq(struct pci_dev *dev); void pcibios_free_irq(struct pci_dev *dev); +resource_size_t pcibios_default_alignment(void); #ifdef CONFIG_HIBERNATE_CALLBACKS extern struct dev_pm_ops pcibios_pm_ops; @@ -1955,6 +1955,11 @@ int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); int pci_sriov_get_totalvfs(struct pci_dev *dev); resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno); void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool probe); + +/* Arch may override these (weak) */ +int pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs); +int pcibios_sriov_disable(struct pci_dev *pdev); +resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev, int resno); #else static inline int pci_iov_virtfn_bus(struct pci_dev *dev, int id) { -- 2.11.0