From: kbuild test robot <lkp@intel.com>
To: Roman Pen <roman.penyaev@profitbricks.com>
Cc: kbuild-all@01.org, linux-block@vger.kernel.org,
linux-rdma@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@infradead.org>,
Sagi Grimberg <sagi@grimberg.me>,
Bart Van Assche <bart.vanassche@sandisk.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Doug Ledford <dledford@redhat.com>,
Swapnil Ingle <swapnil.ingle@profitbricks.com>,
Danil Kipnis <danil.kipnis@profitbricks.com>,
Jack Wang <jinpu.wang@profitbricks.com>,
Roman Pen <roman.penyaev@profitbricks.com>
Subject: Re: [PATCH v2 24/26] ibnbd: include client and server modules into kernel compilation
Date: Mon, 21 May 2018 13:33:32 +0800 [thread overview]
Message-ID: <201805211118.RXWb3Rqd%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180518130413.16997-25-roman.penyaev@profitbricks.com>
[-- Attachment #1: Type: text/plain, Size: 10593 bytes --]
Hi Roman,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc6 next-20180517]
[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/Roman-Pen/InfiniBand-Transport-IBTRS-and-Network-Block-Device-IBNBD/20180520-222445
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/block/ibnbd/ibnbd-clt-sysfs.c: In function 'ibnbd_clt_parse_map_options':
>> drivers/block/ibnbd/ibnbd-clt-sysfs.c:139:12: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
pr_err("map_device: too many (> %lu) paths "
^~~~~~
drivers/block/ibnbd/ibnbd-clt-sysfs.c: In function 'ibnbd_clt_map_device_store':
drivers/block/ibnbd/ibnbd-clt-sysfs.c:613:1: warning: the frame size of 1612 bytes is larger than 1024 bytes [-Wframe-larger-than=]
}
^
vim +139 drivers/block/ibnbd/ibnbd-clt-sysfs.c
ea541da7d Roman Pen 2018-05-18 88
ea541da7d Roman Pen 2018-05-18 89 static int ibnbd_clt_parse_map_options(const char *buf,
ea541da7d Roman Pen 2018-05-18 90 char *sessname,
ea541da7d Roman Pen 2018-05-18 91 struct ibtrs_addr *paths,
ea541da7d Roman Pen 2018-05-18 92 size_t *path_cnt,
ea541da7d Roman Pen 2018-05-18 93 size_t max_path_cnt,
ea541da7d Roman Pen 2018-05-18 94 char *pathname,
ea541da7d Roman Pen 2018-05-18 95 enum ibnbd_access_mode *access_mode,
ea541da7d Roman Pen 2018-05-18 96 enum ibnbd_io_mode *io_mode)
ea541da7d Roman Pen 2018-05-18 97 {
ea541da7d Roman Pen 2018-05-18 98 char *options, *sep_opt;
ea541da7d Roman Pen 2018-05-18 99 char *p;
ea541da7d Roman Pen 2018-05-18 100 substring_t args[MAX_OPT_ARGS];
ea541da7d Roman Pen 2018-05-18 101 int opt_mask = 0;
ea541da7d Roman Pen 2018-05-18 102 int token;
ea541da7d Roman Pen 2018-05-18 103 int ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 104 int i;
ea541da7d Roman Pen 2018-05-18 105 int p_cnt = 0;
ea541da7d Roman Pen 2018-05-18 106
ea541da7d Roman Pen 2018-05-18 107 options = kstrdup(buf, GFP_KERNEL);
ea541da7d Roman Pen 2018-05-18 108 if (!options)
ea541da7d Roman Pen 2018-05-18 109 return -ENOMEM;
ea541da7d Roman Pen 2018-05-18 110
ea541da7d Roman Pen 2018-05-18 111 sep_opt = strstrip(options);
ea541da7d Roman Pen 2018-05-18 112 strip(sep_opt);
ea541da7d Roman Pen 2018-05-18 113 while ((p = strsep(&sep_opt, " ")) != NULL) {
ea541da7d Roman Pen 2018-05-18 114 if (!*p)
ea541da7d Roman Pen 2018-05-18 115 continue;
ea541da7d Roman Pen 2018-05-18 116
ea541da7d Roman Pen 2018-05-18 117 token = match_token(p, ibnbd_opt_tokens, args);
ea541da7d Roman Pen 2018-05-18 118 opt_mask |= token;
ea541da7d Roman Pen 2018-05-18 119
ea541da7d Roman Pen 2018-05-18 120 switch (token) {
ea541da7d Roman Pen 2018-05-18 121 case IBNBD_OPT_SESSNAME:
ea541da7d Roman Pen 2018-05-18 122 p = match_strdup(args);
ea541da7d Roman Pen 2018-05-18 123 if (!p) {
ea541da7d Roman Pen 2018-05-18 124 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 125 goto out;
ea541da7d Roman Pen 2018-05-18 126 }
ea541da7d Roman Pen 2018-05-18 127 if (strlen(p) > NAME_MAX) {
ea541da7d Roman Pen 2018-05-18 128 pr_err("map_device: sessname too long\n");
ea541da7d Roman Pen 2018-05-18 129 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 130 kfree(p);
ea541da7d Roman Pen 2018-05-18 131 goto out;
ea541da7d Roman Pen 2018-05-18 132 }
ea541da7d Roman Pen 2018-05-18 133 strlcpy(sessname, p, NAME_MAX);
ea541da7d Roman Pen 2018-05-18 134 kfree(p);
ea541da7d Roman Pen 2018-05-18 135 break;
ea541da7d Roman Pen 2018-05-18 136
ea541da7d Roman Pen 2018-05-18 137 case IBNBD_OPT_PATH:
ea541da7d Roman Pen 2018-05-18 138 if (p_cnt >= max_path_cnt) {
ea541da7d Roman Pen 2018-05-18 @139 pr_err("map_device: too many (> %lu) paths "
ea541da7d Roman Pen 2018-05-18 140 "provided\n", max_path_cnt);
ea541da7d Roman Pen 2018-05-18 141 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 142 goto out;
ea541da7d Roman Pen 2018-05-18 143 }
ea541da7d Roman Pen 2018-05-18 144 p = match_strdup(args);
ea541da7d Roman Pen 2018-05-18 145 if (!p) {
ea541da7d Roman Pen 2018-05-18 146 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 147 goto out;
ea541da7d Roman Pen 2018-05-18 148 }
ea541da7d Roman Pen 2018-05-18 149
ea541da7d Roman Pen 2018-05-18 150 ret = ibtrs_addr_to_sockaddr(p, strlen(p), IBTRS_PORT,
ea541da7d Roman Pen 2018-05-18 151 &paths[p_cnt]);
ea541da7d Roman Pen 2018-05-18 152 if (ret) {
ea541da7d Roman Pen 2018-05-18 153 pr_err("Can't parse path %s: %d\n", p, ret);
ea541da7d Roman Pen 2018-05-18 154 kfree(p);
ea541da7d Roman Pen 2018-05-18 155 goto out;
ea541da7d Roman Pen 2018-05-18 156 }
ea541da7d Roman Pen 2018-05-18 157
ea541da7d Roman Pen 2018-05-18 158 p_cnt++;
ea541da7d Roman Pen 2018-05-18 159
ea541da7d Roman Pen 2018-05-18 160 kfree(p);
ea541da7d Roman Pen 2018-05-18 161 break;
ea541da7d Roman Pen 2018-05-18 162
ea541da7d Roman Pen 2018-05-18 163 case IBNBD_OPT_DEV_PATH:
ea541da7d Roman Pen 2018-05-18 164 p = match_strdup(args);
ea541da7d Roman Pen 2018-05-18 165 if (!p) {
ea541da7d Roman Pen 2018-05-18 166 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 167 goto out;
ea541da7d Roman Pen 2018-05-18 168 }
ea541da7d Roman Pen 2018-05-18 169 if (strlen(p) > NAME_MAX) {
ea541da7d Roman Pen 2018-05-18 170 pr_err("map_device: Device path too long\n");
ea541da7d Roman Pen 2018-05-18 171 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 172 kfree(p);
ea541da7d Roman Pen 2018-05-18 173 goto out;
ea541da7d Roman Pen 2018-05-18 174 }
ea541da7d Roman Pen 2018-05-18 175 strlcpy(pathname, p, NAME_MAX);
ea541da7d Roman Pen 2018-05-18 176 kfree(p);
ea541da7d Roman Pen 2018-05-18 177 break;
ea541da7d Roman Pen 2018-05-18 178
ea541da7d Roman Pen 2018-05-18 179 case IBNBD_OPT_ACCESS_MODE:
ea541da7d Roman Pen 2018-05-18 180 p = match_strdup(args);
ea541da7d Roman Pen 2018-05-18 181 if (!p) {
ea541da7d Roman Pen 2018-05-18 182 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 183 goto out;
ea541da7d Roman Pen 2018-05-18 184 }
ea541da7d Roman Pen 2018-05-18 185
ea541da7d Roman Pen 2018-05-18 186 if (!strcmp(p, "ro")) {
ea541da7d Roman Pen 2018-05-18 187 *access_mode = IBNBD_ACCESS_RO;
ea541da7d Roman Pen 2018-05-18 188 } else if (!strcmp(p, "rw")) {
ea541da7d Roman Pen 2018-05-18 189 *access_mode = IBNBD_ACCESS_RW;
ea541da7d Roman Pen 2018-05-18 190 } else if (!strcmp(p, "migration")) {
ea541da7d Roman Pen 2018-05-18 191 *access_mode = IBNBD_ACCESS_MIGRATION;
ea541da7d Roman Pen 2018-05-18 192 } else {
ea541da7d Roman Pen 2018-05-18 193 pr_err("map_device: Invalid access_mode:"
ea541da7d Roman Pen 2018-05-18 194 " '%s'\n", p);
ea541da7d Roman Pen 2018-05-18 195 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 196 kfree(p);
ea541da7d Roman Pen 2018-05-18 197 goto out;
ea541da7d Roman Pen 2018-05-18 198 }
ea541da7d Roman Pen 2018-05-18 199
ea541da7d Roman Pen 2018-05-18 200 kfree(p);
ea541da7d Roman Pen 2018-05-18 201 break;
ea541da7d Roman Pen 2018-05-18 202
ea541da7d Roman Pen 2018-05-18 203 case IBNBD_OPT_IO_MODE:
ea541da7d Roman Pen 2018-05-18 204 p = match_strdup(args);
ea541da7d Roman Pen 2018-05-18 205 if (!p) {
ea541da7d Roman Pen 2018-05-18 206 ret = -ENOMEM;
ea541da7d Roman Pen 2018-05-18 207 goto out;
ea541da7d Roman Pen 2018-05-18 208 }
ea541da7d Roman Pen 2018-05-18 209 if (!strcmp(p, "blockio")) {
ea541da7d Roman Pen 2018-05-18 210 *io_mode = IBNBD_BLOCKIO;
ea541da7d Roman Pen 2018-05-18 211 } else if (!strcmp(p, "fileio")) {
ea541da7d Roman Pen 2018-05-18 212 *io_mode = IBNBD_FILEIO;
ea541da7d Roman Pen 2018-05-18 213 } else {
ea541da7d Roman Pen 2018-05-18 214 pr_err("map_device: Invalid io_mode: '%s'.\n",
ea541da7d Roman Pen 2018-05-18 215 p);
ea541da7d Roman Pen 2018-05-18 216 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 217 kfree(p);
ea541da7d Roman Pen 2018-05-18 218 goto out;
ea541da7d Roman Pen 2018-05-18 219 }
ea541da7d Roman Pen 2018-05-18 220 kfree(p);
ea541da7d Roman Pen 2018-05-18 221 break;
ea541da7d Roman Pen 2018-05-18 222
ea541da7d Roman Pen 2018-05-18 223 default:
ea541da7d Roman Pen 2018-05-18 224 pr_err("map_device: Unknown parameter or missing value"
ea541da7d Roman Pen 2018-05-18 225 " '%s'\n", p);
ea541da7d Roman Pen 2018-05-18 226 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 227 goto out;
ea541da7d Roman Pen 2018-05-18 228 }
ea541da7d Roman Pen 2018-05-18 229 }
ea541da7d Roman Pen 2018-05-18 230
ea541da7d Roman Pen 2018-05-18 231 for (i = 0; i < ARRAY_SIZE(ibnbd_opt_mandatory); i++) {
ea541da7d Roman Pen 2018-05-18 232 if ((opt_mask & ibnbd_opt_mandatory[i])) {
ea541da7d Roman Pen 2018-05-18 233 ret = 0;
ea541da7d Roman Pen 2018-05-18 234 } else {
ea541da7d Roman Pen 2018-05-18 235 pr_err("map_device: Parameters missing\n");
ea541da7d Roman Pen 2018-05-18 236 ret = -EINVAL;
ea541da7d Roman Pen 2018-05-18 237 break;
ea541da7d Roman Pen 2018-05-18 238 }
ea541da7d Roman Pen 2018-05-18 239 }
ea541da7d Roman Pen 2018-05-18 240
ea541da7d Roman Pen 2018-05-18 241 out:
ea541da7d Roman Pen 2018-05-18 242 *path_cnt = p_cnt;
ea541da7d Roman Pen 2018-05-18 243 kfree(options);
ea541da7d Roman Pen 2018-05-18 244 return ret;
ea541da7d Roman Pen 2018-05-18 245 }
ea541da7d Roman Pen 2018-05-18 246
:::::: The code at line 139 was first introduced by commit
:::::: ea541da7d8b2518d2b1d68d23d19bb13cca1119b ibnbd: client: sysfs interface functions
:::::: TO: Roman Pen <roman.penyaev@profitbricks.com>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62305 bytes --]
next prev parent reply other threads:[~2018-05-21 5:33 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 13:03 [PATCH v2 00/26] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD) Roman Pen
2018-05-18 13:03 ` [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu() Roman Pen
2018-05-18 16:56 ` Linus Torvalds
2018-05-19 20:25 ` Roman Penyaev
2018-05-19 21:04 ` Linus Torvalds
2018-05-19 16:37 ` Paul E. McKenney
2018-05-19 20:20 ` Roman Penyaev
2018-05-19 20:56 ` Linus Torvalds
2018-05-20 0:43 ` Paul E. McKenney
2018-05-21 13:50 ` Roman Penyaev
2018-05-21 15:16 ` Linus Torvalds
2018-05-21 15:33 ` Paul E. McKenney
2018-05-22 9:09 ` Roman Penyaev
2018-05-22 16:36 ` Paul E. McKenney
2018-05-22 16:38 ` Linus Torvalds
2018-05-22 17:04 ` Paul E. McKenney
2018-05-21 15:31 ` Paul E. McKenney
2018-05-22 9:09 ` Roman Penyaev
2018-05-22 17:03 ` Paul E. McKenney
2018-05-18 13:03 ` [PATCH v2 02/26] sysfs: export sysfs_remove_file_self() Roman Pen
2018-05-18 15:08 ` Tejun Heo
2018-05-18 13:03 ` [PATCH v2 03/26] ibtrs: public interface header to establish RDMA connections Roman Pen
2018-05-18 13:03 ` [PATCH v2 04/26] ibtrs: private headers with IBTRS protocol structs and helpers Roman Pen
2018-05-18 13:03 ` [PATCH v2 05/26] ibtrs: core: lib functions shared between client and server modules Roman Pen
2018-05-18 13:03 ` [PATCH v2 06/26] ibtrs: client: private header with client structs and functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 07/26] ibtrs: client: main functionality Roman Pen
2018-05-18 13:03 ` [PATCH v2 08/26] ibtrs: client: statistics functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 09/26] ibtrs: client: sysfs interface functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 10/26] ibtrs: server: private header with server structs and functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 11/26] ibtrs: server: main functionality Roman Pen
2018-05-18 13:03 ` [PATCH v2 12/26] ibtrs: server: statistics functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 13/26] ibtrs: server: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation Roman Pen
2018-05-20 22:14 ` kbuild test robot
2018-05-21 6:36 ` kbuild test robot
2018-05-22 5:05 ` Leon Romanovsky
2018-05-22 9:27 ` Roman Penyaev
2018-05-22 13:18 ` Leon Romanovsky
2018-05-22 16:12 ` Roman Penyaev
2018-05-18 13:04 ` [PATCH v2 15/26] ibtrs: a bit of documentation Roman Pen
2018-05-18 13:04 ` [PATCH v2 16/26] ibnbd: private headers with IBNBD protocol structs and helpers Roman Pen
2018-05-18 13:04 ` [PATCH v2 17/26] ibnbd: client: private header with client structs and functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 18/26] ibnbd: client: main functionality Roman Pen
2018-05-18 13:04 ` [PATCH v2 19/26] ibnbd: client: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 20/26] ibnbd: server: private header with server structs and functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 21/26] ibnbd: server: main functionality Roman Pen
2018-05-18 13:04 ` [PATCH v2 22/26] ibnbd: server: functionality for IO submission to file or block dev Roman Pen
2018-05-18 13:04 ` [PATCH v2 23/26] ibnbd: server: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 24/26] ibnbd: include client and server modules into kernel compilation Roman Pen
2018-05-20 17:21 ` kbuild test robot
2018-05-20 22:14 ` kbuild test robot
2018-05-21 5:33 ` kbuild test robot [this message]
2018-05-18 13:04 ` [PATCH v2 25/26] ibnbd: a bit of documentation Roman Pen
2018-05-18 13:04 ` [PATCH v2 26/26] MAINTAINERS: Add maintainer for IBNBD/IBTRS modules Roman Pen
2018-05-22 16:45 ` [PATCH v2 00/26] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD) Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201805211118.RXWb3Rqd%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@sandisk.com \
--cc=danil.kipnis@profitbricks.com \
--cc=dledford@redhat.com \
--cc=hch@infradead.org \
--cc=jinpu.wang@profitbricks.com \
--cc=kbuild-all@01.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=roman.penyaev@profitbricks.com \
--cc=sagi@grimberg.me \
--cc=swapnil.ingle@profitbricks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.