]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: add __printf format attribute to qeth_dbf_longtext
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 25 Oct 2021 09:56:56 +0000 (11:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 12:58:19 +0000 (13:58 +0100)
commitf4c0f38c6b937c44bc3e61043e2d1514c2459d4b
treedc070a6e73a17fde4d98eb89fef5c13715be105c
parent4e6541a4d2b5e9a53722077bb5bb2acc8c7934b5
s390/qeth: add __printf format attribute to qeth_dbf_longtext

Allow the compiler to recognize and check format strings and parameters.

As reported with allmodconfig and W=1:

drivers/s390/net/qeth_core_main.c: In function ‘qeth_dbf_longtext’:
drivers/s390/net/qeth_core_main.c:6190:9: error: function ‘qeth_dbf_longtext’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
 6190 |         vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
      |         ^~~~~~~~~

Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h