Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1432611

Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function

From Leon Romanovsky <leon@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function
Date 2016-06-28 10:10 +0200
Message-ID <rOWfM-4gQ-19@gated-at.bofh.it> (permalink)
References (2 earlier) <rNAKl-UD-3@gated-at.bofh.it> <rOzMe-62T-51@gated-at.bofh.it> <rOzMe-62T-49@gated-at.bofh.it> <rOAfg-6cY-11@gated-at.bofh.it> <rOUQG-3cY-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Jun 28, 2016 at 02:31:41PM +0800, Wei Hu (Xavier) wrote:
> 
> 
> On 2016/6/27 16:31, oulijun wrote:
> >Hi, Leon
> >在 2016/6/27 16:01, Leon Romanovsky 写道:
> >>On Sat, Jun 25, 2016 at 06:25:37PM +0800, Wei Hu (Xavier) wrote:
> >>>
> >>>On 2016/6/24 22:59, Leon Romanovsky wrote:
> >>>>On Thu, Jun 16, 2016 at 10:35:12PM +0800, Lijun Ou wrote:
> >>>>>This patch mainly added reset flow of RoCE engine in RoCE
> >>>>>driver. It is necessary when RoCE is loaded and removed.
> >>>>>
> >>>>>Signed-off-by: Wei Hu <xavier.huwei@huawei.com>
> >>>>>Signed-off-by: Nenglong Zhao <zhaonenglong@hisilicon.com>
> >>>>>Signed-off-by: Lijun Ou <oulijun@huawei.com>
> >>>>>---
> >>...
> >>
> >>>>>+
> >>>>>+#define SLEEP_TIME_INTERVAL				20
> >>>>>+
> >>>>>+extern int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool enable);
> >>>>Why did you add this extern?
> >>>>You already exported this function.
> >>>>drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:EXPORT_SYMBOL(hns_dsaf_roce_reset);
> >>>Hi, Leon
> >>>
> >>>         The function named hns_dsaf_roce_reset is defined in hns_dsaf_main.c
> >>>         It exists in hns_dsaf.ko(ethernet driver)
> >>>
> >>>         RoCE driver will call this function.
> >>>
> >>>         Your suggestion is that delete "extern" as below:
> >>>             In /drivers/infiniband/hw/hns/hns_roce_hw_v1.h:
> >>>
> >>>           int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool
> >>>enable);
> >>>
> >>>Right? or other soultion?
> >>You placed it in header file.
> >>Please move it to your hns_roce_hw_v1.c file.
> >>
> >  You suggest to do as follows, right?
> >  in hns_roce_hw_v1.c
> >    int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool enable);
> >
> >  and delete the keyword extern
> >
> >  Bcause reserve the extern in hns_roce_hw_v1.c, the checkpatch is not pass.
> Hi, Leon & Doug Ledford
> 
>     If we move it to hns_roce_hw_v1.c file as below:
>         int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool
> enable);
>     The result of checkpatch is warning.
> 
>     We prepare to add a head file for this function as below:
>         In the directory of include\linux,  mkdir hns.
>         add hns_driver.h in include\linux\hns.
>         In the file of hns_driver.h, the declaration:
>                int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode,
> bool enable);
>     What do you think about?
> 
>

Please avoid creating new directories/files under include/linux,
especially for one function only.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function Leon Romanovsky <leon@kernel.org> - 2016-06-24 17:00 +0200
  Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function Leon Romanovsky <leon@kernel.org> - 2016-06-27 10:10 +0200
    Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function oulijun <oulijun@huawei.com> - 2016-06-27 10:40 +0200
      Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2016-06-28 08:40 +0200
        Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function Leon Romanovsky <leon@kernel.org> - 2016-06-28 10:10 +0200

csiph-web