diff mbox series

[rdma-next,2/2] RDMA/hns: Limit scope of hns_roce_cmq_send()

Message ID 20190319091009.28740-3-leon@kernel.org (mailing list archive)
State Mainlined
Commit e95e52a1788d4a8af547261875c0fbae2e6e3028
Delegated to: Jason Gunthorpe
Headers show
Series Fixes for HNS driver | expand

Commit Message

Leon Romanovsky March 19, 2019, 9:10 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

The forgotten static keyword causes to the following error to appear
while building HNS driver. Declare hns_roce_cmq_send() to be static
function to fix this warning.

drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
 int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,

Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky March 26, 2019, 11:51 a.m. UTC | #1
On Tue, Mar 26, 2019 at 07:33:01PM +0800, oulijun wrote:
> 在 2019/3/19 17:10, Leon Romanovsky 写道:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > The forgotten static keyword causes to the following error to appear
> > while building HNS driver. Declare hns_roce_cmq_send() to be static
> > function to fix this warning.
> >
> > drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
> > prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
> >  int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >
> > Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> > ---
> >  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > index 1c54390e1c85..b13436e97d1f 100644
> > --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > @@ -1086,7 +1086,7 @@ static int __hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >  	return ret;
> >  }
> >
> > -int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> > +static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >  			     struct hns_roce_cmq_desc *desc, int num)
> >  {
> >  	int retval;
>
> Hi, Leon
>
>    The patch [PATCH V9 for-next] RDMA/hns: Dump detailed driver-specific CQ will need to call the function and
>
> need it keep non-static.

You are not using hns_roce_cmq_send() in that v9 patch except of exposing
it through header file. So that v9 needs to be fixed too.

Thanks

>
> Thanks.
>
> Lijun Ou
>
Lijun Ou March 26, 2019, noon UTC | #2
在 2019/3/26 19:51, Leon Romanovsky 写道:
> On Tue, Mar 26, 2019 at 07:33:01PM +0800, oulijun wrote:
>> 在 2019/3/19 17:10, Leon Romanovsky 写道:
>>> From: Leon Romanovsky <leonro@mellanox.com>
>>>
>>> The forgotten static keyword causes to the following error to appear
>>> while building HNS driver. Declare hns_roce_cmq_send() to be static
>>> function to fix this warning.
>>>
>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
>>> prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
>>>  int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>
>>> Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
>>> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
>>> ---
>>>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>> index 1c54390e1c85..b13436e97d1f 100644
>>> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>> @@ -1086,7 +1086,7 @@ static int __hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>  	return ret;
>>>  }
>>>
>>> -int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>> +static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>  			     struct hns_roce_cmq_desc *desc, int num)
>>>  {
>>>  	int retval;
>> Hi, Leon
>>
>>    The patch [PATCH V9 for-next] RDMA/hns: Dump detailed driver-specific CQ will need to call the function and
>>
>> need it keep non-static.
> You are not using hns_roce_cmq_send() in that v9 patch except of exposing
> it through header file. So that v9 needs to be fixed too.
>
> Thanks
No. hns_roce_cmd_send() have done in hns_roce_hw_v2.h.  I merge this patch into my local branch and add the v9. it
will build fail.

>> Thanks.
>>
>> Lijun Ou
>>
Leon Romanovsky March 26, 2019, 12:34 p.m. UTC | #3
On Tue, Mar 26, 2019 at 08:00:35PM +0800, oulijun wrote:
> 在 2019/3/26 19:51, Leon Romanovsky 写道:
> > On Tue, Mar 26, 2019 at 07:33:01PM +0800, oulijun wrote:
> >> 在 2019/3/19 17:10, Leon Romanovsky 写道:
> >>> From: Leon Romanovsky <leonro@mellanox.com>
> >>>
> >>> The forgotten static keyword causes to the following error to appear
> >>> while building HNS driver. Declare hns_roce_cmq_send() to be static
> >>> function to fix this warning.
> >>>
> >>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
> >>> prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
> >>>  int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >>>
> >>> Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
> >>> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> >>> ---
> >>>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> >>> index 1c54390e1c85..b13436e97d1f 100644
> >>> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> >>> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> >>> @@ -1086,7 +1086,7 @@ static int __hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >>>  	return ret;
> >>>  }
> >>>
> >>> -int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >>> +static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> >>>  			     struct hns_roce_cmq_desc *desc, int num)
> >>>  {
> >>>  	int retval;
> >> Hi, Leon
> >>
> >>    The patch [PATCH V9 for-next] RDMA/hns: Dump detailed driver-specific CQ will need to call the function and
> >>
> >> need it keep non-static.
> > You are not using hns_roce_cmq_send() in that v9 patch except of exposing
> > it through header file. So that v9 needs to be fixed too.
> >
> > Thanks
> No. hns_roce_cmd_send() have done in hns_roce_hw_v2.h.  I merge this patch into my local branch and add the v9. it
> will build fail.

Can you please take another look on your v9? Try to search for the
hns_roce_cmq_send() and see that it is not used.

https://patchwork.kernel.org/patch/10870909/

Thanks

>
> >> Thanks.
> >>
> >> Lijun Ou
> >>
>
>
Lijun Ou March 26, 2019, 12:53 p.m. UTC | #4
在 2019/3/26 20:34, Leon Romanovsky 写道:
> On Tue, Mar 26, 2019 at 08:00:35PM +0800, oulijun wrote:
>> 在 2019/3/26 19:51, Leon Romanovsky 写道:
>>> On Tue, Mar 26, 2019 at 07:33:01PM +0800, oulijun wrote:
>>>> 在 2019/3/19 17:10, Leon Romanovsky 写道:
>>>>> From: Leon Romanovsky <leonro@mellanox.com>
>>>>>
>>>>> The forgotten static keyword causes to the following error to appear
>>>>> while building HNS driver. Declare hns_roce_cmq_send() to be static
>>>>> function to fix this warning.
>>>>>
>>>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
>>>>> prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
>>>>>  int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>>>
>>>>> Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
>>>>> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
>>>>> ---
>>>>>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>>>> index 1c54390e1c85..b13436e97d1f 100644
>>>>> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>>>> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
>>>>> @@ -1086,7 +1086,7 @@ static int __hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>>>  	return ret;
>>>>>  }
>>>>>
>>>>> -int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>>> +static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
>>>>>  			     struct hns_roce_cmq_desc *desc, int num)
>>>>>  {
>>>>>  	int retval;
>>>> Hi, Leon
>>>>
>>>>    The patch [PATCH V9 for-next] RDMA/hns: Dump detailed driver-specific CQ will need to call the function and
>>>>
>>>> need it keep non-static.
>>> You are not using hns_roce_cmq_send() in that v9 patch except of exposing
>>> it through header file. So that v9 needs to be fixed too.
>>>
>>> Thanks
>> No. hns_roce_cmd_send() have done in hns_roce_hw_v2.h.  I merge this patch into my local branch and add the v9. it
>> will build fail.
> Can you please take another look on your v9? Try to search for the
> hns_roce_cmq_send() and see that it is not used.
>
> https://patchwork.kernel.org/patch/10870909/
>
> Thanks
Sorry. you are right. I have analysised it with other guys. it is existed in this series patches.
You have generated it and I will not add it in the v10.
thanks.
>>>> Thanks.
>>>>
>>>> Lijun Ou
>>>>
>>
Jason Gunthorpe March 27, 2019, 6:26 p.m. UTC | #5
On Tue, Mar 19, 2019 at 11:10:09AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> The forgotten static keyword causes to the following error to appear
> while building HNS driver. Declare hns_roce_cmq_send() to be static
> function to fix this warning.
> 
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1089:5: warning: no previous
> prototype for _hns_roce_cmq_send_ [-Wmissing-prototypes]
>  int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> 
> Fixes: 6a04aed6afae ("RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset")
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 1c54390e1c85..b13436e97d1f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -1086,7 +1086,7 @@  static int __hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
 	return ret;
 }
 
-int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
+static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
 			     struct hns_roce_cmq_desc *desc, int num)
 {
 	int retval;