Thread (16 messages) 16 messages, 3 authors, 2022-08-30

Re: [PATCH] rnbd-srv: remove 'dir' argument from rnbd_srv_rdma_ev

From: Leon Romanovsky <leon@kernel.org>
Date: 2022-08-28 11:27:23
Also in: linux-rdma

On Fri, Aug 26, 2022 at 01:29:28PM +0200, Jinpu Wang wrote:
On Fri, Aug 26, 2022 at 1:26 PM Guoqing Jiang [off-list ref] wrote:
quoted


On 8/26/22 6:48 PM, Jinpu Wang wrote:
quoted
On Fri, Aug 26, 2022 at 10:11 AM Guoqing Jiang [off-list ref] wrote:
quoted
Since all callers (process_{read,write}) set id->dir, no need to
pass 'dir' again.

Signed-off-by: Guoqing Jiang <redacted>
---
  drivers/block/rnbd/rnbd-srv.c          | 9 ++++-----
  drivers/block/rnbd/rnbd-srv.h          | 1 +
  drivers/infiniband/ulp/rtrs/rtrs-srv.c | 4 ++--
  drivers/infiniband/ulp/rtrs/rtrs.h     | 3 +--
  4 files changed, 8 insertions(+), 9 deletions(-)
<...>
quoted
quoted
quoted
  #include <rtrs.h>
+#include <rtrs-srv.h>
why do we need this?
Otherwise, compiler complains

drivers/block/rnbd/rnbd-srv.c: In function ‘rnbd_srv_rdma_ev’:
drivers/block/rnbd/rnbd-srv.c:400:33: error: invalid use of undefined
type ‘struct rtrs_srv_op’
   400 |                         type, id->dir, srv_sess->sessname);

Thanks,
Guoqing
ah, okay, this reminds me, why we have dir there, we don't want to
export too much detail regarding the rtrs_srv_op to
rnbd-server, it is supposed to be transparent  to rnbd-srv.
So decouple it from rtrs-srv.h and hide everything that not-needed to be
exported to separate header file.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help