[s390:features 73/81] drivers/s390/crypto/ap_queue.c:201:18: warning: format specifies type 'unsigned char' but the argument has type 'int'

kernel test robot
2020-10-07T23:41:48Z

[-- Attachment #1: Type: text/plain, Size: 6302 bytes --]

tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: eefc69a09ca5b441ee136f9fb68ab5970cfc2d51
commit: 2ea2a6099ae3d1708f90f43c81a98cba3d4bb74c [73/81] s390/ap: add error response code field for ap queue devices
config: s390-randconfig-r016-20201008 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4d1d8ae7100ec3c7e1709addb7b3ec6f9ad0b44f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=2ea2a6099ae3d1708f90f43c81a98cba3d4bb74c
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout 2ea2a6099ae3d1708f90f43c81a98cba3d4bb74c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/s390/crypto/ap_queue.c:201:18: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
__func__, status.response_code,
^~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_debug.h:26:47: note: expanded from macro 'AP_DBF_WARN'
debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
^~~~~~~~~~~
arch/s390/include/asm/debug.h:256:21: note: expanded from macro 'debug_sprintf_event'
_fmt, ## __VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/s390/crypto/ap_queue.c:255:18: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
__func__, status.response_code,
^~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_debug.h:26:47: note: expanded from macro 'AP_DBF_WARN'
debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
^~~~~~~~~~~
arch/s390/include/asm/debug.h:256:21: note: expanded from macro 'debug_sprintf_event'
_fmt, ## __VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/s390/crypto/ap_queue.c:298:18: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
__func__, status.response_code,
^~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_debug.h:26:47: note: expanded from macro 'AP_DBF_WARN'
debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
^~~~~~~~~~~
arch/s390/include/asm/debug.h:256:21: note: expanded from macro 'debug_sprintf_event'
_fmt, ## __VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/s390/crypto/ap_queue.c:341:18: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
__func__, status.response_code,
^~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_debug.h:26:47: note: expanded from macro 'AP_DBF_WARN'
debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
^~~~~~~~~~~
arch/s390/include/asm/debug.h:256:21: note: expanded from macro 'debug_sprintf_event'
_fmt, ## __VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/s390/crypto/ap_queue.c:382:18: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
__func__, status.response_code,
^~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_debug.h:26:47: note: expanded from macro 'AP_DBF_WARN'
debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
^~~~~~~~~~~
arch/s390/include/asm/debug.h:256:21: note: expanded from macro 'debug_sprintf_event'
_fmt, ## __VA_ARGS__); \
~~~~ ^~~~~~~~~~~
5 warnings generated.

vim +201 drivers/s390/crypto/ap_queue.c

170
171 /**
172 * ap_sm_read(): Receive pending reply messages from an AP queue.
173 * @aq: pointer to the AP queue
174 *
175 * Returns AP_SM_WAIT_NONE, AP_SM_WAIT_AGAIN, or AP_SM_WAIT_INTERRUPT
176 */
177 static enum ap_sm_wait ap_sm_read(struct ap_queue *aq)
178 {
179 struct ap_queue_status status;
180
181 if (!aq->reply)
182 return AP_SM_WAIT_NONE;
183 status = ap_sm_recv(aq);
184 switch (status.response_code) {
185 case AP_RESPONSE_NORMAL:
186 if (aq->queue_count > 0) {
187 aq->sm_state = AP_SM_STATE_WORKING;
188 return AP_SM_WAIT_AGAIN;
189 }
190 aq->sm_state = AP_SM_STATE_IDLE;
191 return AP_SM_WAIT_NONE;
192 case AP_RESPONSE_NO_PENDING_REPLY:
193 if (aq->queue_count > 0)
194 return AP_SM_WAIT_INTERRUPT;
195 aq->sm_state = AP_SM_STATE_IDLE;
196 return AP_SM_WAIT_NONE;
197 default:
198 aq->dev_state = AP_DEV_STATE_ERROR;
199 aq->last_err_rc = status.response_code;
200 AP_DBF_WARN("%s RC 0x%02hhx on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n",
> 201 __func__, status.response_code,
202 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid));
203 return AP_SM_WAIT_NONE;
204 }
205 }
206

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22352 bytes --]