On Wed, Jul 18, 2018 at 09:01:35AM -0700, Bart Van Assche wrote: > This patch avoids that the following compiler warning is reported when > building with gcc 8 and W=1: > > In function 'ocrdma_mbx_get_ctrl_attribs', > inlined from 'ocrdma_init_hw' at drivers/infiniband/hw/ocrdma/ocrdma_hw.c:3224:11: > drivers/infiniband/hw/ocrdma/ocrdma_hw.c:1368:3: warning: 'strncpy' output may be truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation] > strncpy(dev->model_number, > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > hba_attribs->controller_model_number, 31); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx> > Cc: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx> > Cc: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx> > Acked-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Applied to for-next Thanks, Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html