s390/sclp: add __nonstring annotation
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 6 Sep 2021 20:20:05 +0000 (22:20 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 8 Sep 2021 12:23:31 +0000 (14:23 +0200)
commitff8a58b0ae735f32fe87d0d07e98751ff9dcaed0
tree869407762ced338493b9977e49938d833d16c664
parent7d665612dd5ae0fe982a34447f84cb5121c3455a
s390/sclp: add __nonstring annotation

Add __nonstring annotation, since the missing string termination for
id member of sclp_trace_entry is intended. This way we get rid of this
warning:

drivers/s390/char/sclp.c:84:9: warning: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
   84 |         strncpy(e.id, id, sizeof(e.id));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/sclp.c