Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
From: kbuild test robot
Date: Fri Mar 03 2017 - 17:41:52 EST
Hi simran,
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.10 next-20170303]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/simran-singhal/staging-nvec-Remove-unnecessary-cast-on-void-pointer/20170304-061120
config: x86_64-randconfig-x018-201709 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs.h:77:0,
from drivers/staging/lustre/lustre/mgc/../include/lprocfs_status.h:46,
from drivers/staging/lustre/lustre/mgc/mgc_request.c:42:
drivers/staging/lustre/lustre/mgc/mgc_request.c: In function 'mgc_set_info_async':
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:11: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'void *' [-Wformat=]
CERROR("invalid sptlrpc flavor %s to MGS\n",
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:222:30: note: in definition of macro '__CDEBUG'
libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
^~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
#define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
^~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:4: note: in expansion of macro 'CERROR'
CERROR("invalid sptlrpc flavor %s to MGS\n",
^~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:244:7: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'void *' [-Wformat=]
"%x-%x: " format, errnum, LERRCHKSUM(errnum), ## __VA_ARGS__)
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:222:30: note: in definition of macro '__CDEBUG'
libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
^~~~~~
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:243:49: note: in expansion of macro 'CDEBUG_LIMIT'
#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \
^~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:245:37: note: in expansion of macro 'LCONSOLE_ERROR_MSG'
#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__)
^~~~~~~~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1052:4: note: in expansion of macro 'LCONSOLE_ERROR'
LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
^~~~~~~~~~~~~~
vim +1036 drivers/staging/lustre/lustre/mgc/mgc_request.c
d7e09d039 Peng Tao 2013-05-02 1030 val = "null";
d7e09d039 Peng Tao 2013-05-02 1031 vallen = 4;
d7e09d039 Peng Tao 2013-05-02 1032 }
d7e09d039 Peng Tao 2013-05-02 1033
d7e09d039 Peng Tao 2013-05-02 1034 rc = sptlrpc_parse_flavor(val, &flvr);
d7e09d039 Peng Tao 2013-05-02 1035 if (rc) {
d7e09d039 Peng Tao 2013-05-02 @1036 CERROR("invalid sptlrpc flavor %s to MGS\n",
49b8751ff simran singhal 2017-03-03 1037 val);
0a3bdb007 Greg Kroah-Hartman 2013-08-03 1038 return rc;
d7e09d039 Peng Tao 2013-05-02 1039 }
d7e09d039 Peng Tao 2013-05-02 1040
d7e09d039 Peng Tao 2013-05-02 1041 /*
d7e09d039 Peng Tao 2013-05-02 1042 * caller already hold a mutex
d7e09d039 Peng Tao 2013-05-02 1043 */
d7e09d039 Peng Tao 2013-05-02 1044 if (cli->cl_flvr_mgc.sf_rpc == SPTLRPC_FLVR_INVALID) {
d7e09d039 Peng Tao 2013-05-02 1045 cli->cl_flvr_mgc = flvr;
d7e09d039 Peng Tao 2013-05-02 1046 } else if (memcmp(&cli->cl_flvr_mgc, &flvr,
d7e09d039 Peng Tao 2013-05-02 1047 sizeof(flvr)) != 0) {
d7e09d039 Peng Tao 2013-05-02 1048 char str[20];
d7e09d039 Peng Tao 2013-05-02 1049
d7e09d039 Peng Tao 2013-05-02 1050 sptlrpc_flavor2name(&cli->cl_flvr_mgc,
d7e09d039 Peng Tao 2013-05-02 1051 str, sizeof(str));
2d00bd17a Joe Perches 2014-11-23 @1052 LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
49b8751ff simran singhal 2017-03-03 1053 val, str);
d7e09d039 Peng Tao 2013-05-02 1054 rc = -EPERM;
d7e09d039 Peng Tao 2013-05-02 1055 }
:::::: The code at line 1036 was first introduced by commit
:::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support
:::::: TO: Peng Tao <bergwolf@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip