2021-11-03 22:19 GMT+09:00, Guo Zhengkui <guozhengkui@xxxxxxxx>: > Fix following coccicheck warning: > ./fs/ksmbd/transport_rdma.c:201:20-27: WARNING use flexible-array > member instead. Is there only one here? It would be better to change them together in this patch. > > Signed-off-by: Guo Zhengkui <guozhengkui@xxxxxxxx> > --- > fs/ksmbd/transport_rdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c > index 6330dfc302ff..ca62060acd2b 100644 > --- a/fs/ksmbd/transport_rdma.c > +++ b/fs/ksmbd/transport_rdma.c > @@ -198,7 +198,7 @@ struct smb_direct_rdma_rw_msg { > struct completion *completion; > struct rdma_rw_ctx rw_ctx; > struct sg_table sgt; > - struct scatterlist sg_list[0]; > + struct scatterlist sg_list[]; > }; > > static inline int get_buf_page_count(void *buf, int size) > -- > 2.20.1 > >