Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1470643ybl; Wed, 28 Aug 2019 15:27:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRe9MfYcKbtLTBdQjcjOfp7GQ1LyViGW0F5Fnc0QknaWlZpcVazYdlNzQTWqvWnfDm1hQt X-Received: by 2002:a17:90a:9f46:: with SMTP id q6mr6357168pjv.110.1567031253375; Wed, 28 Aug 2019 15:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567031253; cv=none; d=google.com; s=arc-20160816; b=nGFsrfK0vjbN10iUYrlQATHc6QZk4GuRHihhw/Xt9Wn4Cmt5NbIEHRBcJ69w5S5JZa zZDrAjcbMXMld/l1qrP2xDguVMWxjlDroNUzh9LKjm56BOrfWCmFLy8vdPXO7p9/l02c oc5RSxjhK3JippvjxQjbm7V0StEJGdODRI0UMZ0qvJaGE4sWQJyhY6uABGBExgXypItz op+GCKxAIIvoYzYVp73qsNMQaNaolPlBQBg0x3mx0oaQoXNsR8X7a0BJoa+XJHDzjk4c WlWsLqB0RxlHEIwh2MxE0+QMH2Zexdw5lLavOnwK+9X+p/H+Ytkn/1N1UdEmoWCG1NyZ ZIxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GA318CEUx9e3kkw5EVy3LLJebt37vhfn9gRemXbA1tc=; b=ZocAUHQyBVY7X0wOJzw95PV07woueHrcqtmpM2W+eE1tUeUqXRJLGiNRpy6G2SIP+F z0mz3RZqzn4NDs6QlzcVrSIEM7dgZeTMik92GMvI/Img7iZrID0YYpi7rN8MhivdDkfV 5qxQwLNueKCilUf7GQ+QUIMoOvt/0DPu09trToNCwCcepCdLirNr2wgQ7REqzql48Tsn l/UWwfMgwpRXJ6ibI2wPqCUlFCvt74jDtwu0otlLJQarIRqB9YIrc1+xVz5wNETLvlyM aSGxBa7YA3z8e7OKefb5dnDlLc5BuIHI21vGPIJ6AewDRzIdQzdZlb/TvkxmcpVHjtwB JEzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y19PaU3S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si329201pgf.198.2019.08.28.15.27.15; Wed, 28 Aug 2019 15:27:33 -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=@kernel.org header.s=default header.b=Y19PaU3S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfH1W0W (ORCPT + 99 others); Wed, 28 Aug 2019 18:26:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:57892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfH1W0V (ORCPT ); Wed, 28 Aug 2019 18:26:21 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6580A217F5; Wed, 28 Aug 2019 22:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567031180; bh=nh/Cp1V3gNlbWJY+TFHAxN8PnPYse/LGeF2iYlhuYr0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y19PaU3SJXWC5Jbbcdbffp+tIBXD/MaU3idWNPVC1i9/TYyH5mH3cGqpAhUPTgQB6 z/VKY/ron/skTmRO6tRYfYvUNLQMpKkEGmit8DxkT7py4vHms/0/79RjxNGBRJImT8 BHfPqMmItT6H6/p8Vo6LWWdZk6cj0ZJX9dzDxhBc= Date: Wed, 28 Aug 2019 17:26:18 -0500 From: Bjorn Helgaas To: Krzysztof Wilczynski Cc: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Sasha Levin , Lorenzo Pieralisi , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH] PCI: hv: Make functions only used locally static in pci-hyperv.c Message-ID: <20190828222618.GE7013@google.com> References: <20190826154159.9005-1-kw@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190826154159.9005-1-kw@linux.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe just: PCI: hv: Make functions static since we already know it's in pci-hyperv.c, and it's obvious that you can only do this for functions that are only used locally. On Mon, Aug 26, 2019 at 05:41:59PM +0200, Krzysztof Wilczynski wrote: > Functions hv_read_config_block(), hv_write_config_block() > and hv_register_block_invalidate() are not used anywhere > else and are local to drivers/pci/controller/pci-hyperv.c, > and do not need to be in global scope, so make these static. > > Resolve compiler warning that can be seen when building with > warnings enabled (W=1). Rewrap commit log to fill 75 columns. Does this fix all the similar warnings in drivers/pci/? If there are more, maybe we could fix them all in a single patch or at least a single series? > Signed-off-by: Krzysztof Wilczynski > --- > drivers/pci/controller/pci-hyperv.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c > index f1f300218fab..c9642e429c2d 100644 > --- a/drivers/pci/controller/pci-hyperv.c > +++ b/drivers/pci/controller/pci-hyperv.c > @@ -930,7 +930,7 @@ static void hv_pci_read_config_compl(void *context, struct pci_response *resp, > * > * Return: 0 on success, -errno on failure > */ > -int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len, > +static int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len, > unsigned int block_id, unsigned int *bytes_returned) > { > struct hv_pcibus_device *hbus = > @@ -1010,7 +1010,7 @@ static void hv_pci_write_config_compl(void *context, struct pci_response *resp, > * > * Return: 0 on success, -errno on failure > */ > -int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len, > +static int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len, > unsigned int block_id) > { > struct hv_pcibus_device *hbus = > @@ -1079,7 +1079,7 @@ int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len, > * > * Return: 0 on success, -errno on failure > */ > -int hv_register_block_invalidate(struct pci_dev *pdev, void *context, > +static int hv_register_block_invalidate(struct pci_dev *pdev, void *context, > void (*block_invalidate)(void *context, > u64 block_mask)) > { > -- > 2.22.1 >