Message ID | 20190130220657.9177-1-bvanassche@acm.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | IPoIB: Declare local functions static | expand |
On 1/30/19 2:08 PM, Jason Gunthorpe wrote: > On Wed, Jan 30, 2019 at 02:06:57PM -0800, Bart Van Assche wrote: >> This patch avoids that the following compiler warning is reported when >> building with W=1: >> >> drivers/infiniband/ulp/ipoib/ipoib_main.c:2414:5: warning: no previous prototype for ipoib_intercept_dev_id_attr [-Wmissing-prototypes] >> int ipoib_intercept_dev_id_attr(struct net_device *dev) >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Fixes: f6350da41dc7 ("IB/ipoib: Log sysfs 'dev_id' accesses from userspace") # v4.20 >> Signed-off-by: Bart Van Assche <bvanassche@acm.org> >> --- >> drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Kamal beat you too it Hi Jason, You are right. Sorry for the duplicate. Bart.
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 45ef3b0f03c5..3d3407d1feb4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2411,7 +2411,7 @@ static ssize_t dev_id_show(struct device *dev, } static DEVICE_ATTR_RO(dev_id); -int ipoib_intercept_dev_id_attr(struct net_device *dev) +static int ipoib_intercept_dev_id_attr(struct net_device *dev) { device_remove_file(&dev->dev, &dev_attr_dev_id); return device_create_file(&dev->dev, &dev_attr_dev_id);
This patch avoids that the following compiler warning is reported when building with W=1: drivers/infiniband/ulp/ipoib/ipoib_main.c:2414:5: warning: no previous prototype for ipoib_intercept_dev_id_attr [-Wmissing-prototypes] int ipoib_intercept_dev_id_attr(struct net_device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: f6350da41dc7 ("IB/ipoib: Log sysfs 'dev_id' accesses from userspace") # v4.20 Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)