Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6032805pxb; Mon, 14 Feb 2022 13:36:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRNjkyUjTvHUJVZ9Em1frzYWoYm+TcKXZ9hwvDJZbNnho4fq4d4ZkqlYxl2WtToVoUtCdf X-Received: by 2002:a17:90b:4b06:: with SMTP id lx6mr726724pjb.54.1644874573485; Mon, 14 Feb 2022 13:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644874573; cv=none; d=google.com; s=arc-20160816; b=pHNIiVresI2sFnuk0Rf2A9kOm3FOZb95BvJw2vUUWT3woG40HJpWeF/UEENCrxeImr Y1aPwsiqhSGwVZWpwtyn2qtBi5ZLET9LJVkQodYIx/QZ2/1OBMwbe/Mdafh14e4p46gC SnZqLG5vwkn1RGyv+7uhwLqP6lfqh6oFTL2wsz9vSlJ52VfqbFjUQyBGi69C/fGbZHDq C2CtOuF7TzMdZ2c6xpNwwXEK1mGUrGY6GIrGL1X/c/ADdymTl2NfXUdhuO7LdDCfnYGb GJLOWdDFm0CglgKNA0++rZWGSWXmVYr1nmUHlo06s4HADWLm18B/HGUOt19okcrFFkXk Kd6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8Inwqcj5albhR7dsXzS8OiGTR+dLbdgXaGnl3majY8I=; b=WLGgcvmYP0LzorYt9FOB8GlZzJcYS4PzLy5FeJ8T3uuS9T5O+Tc9pTfGyitySWc2+n AQYKgOVF31pEEKTKIKnCvA579X0eEJ95ThHTT+zYxemc9/k2XHQghTMubTSrgso0T/w0 NS+867E8IkivwBzXrmt+u4XXnzpzQPPKBkLutJUoX6nXix1NSiSYzvciN85uMiL6It/d /4sxII2NKN7Kvfsax+vZlWOraaNtQ3tOseiXd1wh9F3dmPoklFhmGgZPCDnPHGuhXOI2 74qeUNmm22uVlInruwWv2VRc99HZff+0vwvP+lan9hWlzyMWcXsarjBCDkCvT3zqDc86 EVGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cu7J1A8t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k13si816992pgj.399.2022.02.14.13.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:36:13 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cu7J1A8t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F1F9118633; Mon, 14 Feb 2022 12:59:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbiBNU6V (ORCPT + 99 others); Mon, 14 Feb 2022 15:58:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbiBNU6K (ORCPT ); Mon, 14 Feb 2022 15:58:10 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F6B5110EEF; Mon, 14 Feb 2022 12:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644872260; x=1676408260; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=+ZOSDcI2qdIWgBn8a33RycD675mh/DMLTMtB1BKSO68=; b=Cu7J1A8t5paQM1GqwgCcVmlmdK0objzjfsNA+cBKoJszkbaPz8r31ggE kGemuABrYYLJHfIaRZ6Bs3E3GaibUrER3gHScEdMNDuR/Mx+EN9sdDJA/ hMvP3stXA81IRXW0vF1dyj+b2mkH4AORXyKZChO0c97DGNidTAQy+KXvL PVl/IYiwTNSUGRh0gqPdHGfs+OF4VXwbJDnB9T1SbCj692QnvS/3FHfwk 5QHRCUBbVKNVHjeqey2e4aeg+0PRuiJc+OHDB5rPcUr+/Vbw8TryzBo+w 3smuAEJtEsyaV1+nHlls8C1wztq+6Q2EJg1kHAlpO7Bh4CM7aTyoJxadJ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="310916638" X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="310916638" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 12:35:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="635415061" Received: from lkp-server01.sh.intel.com (HELO d95dc2dabeb1) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 14 Feb 2022 12:35:19 -0800 Received: from kbuild by d95dc2dabeb1 with local (Exim 4.92) (envelope-from ) id 1nJi46-0008vY-HT; Mon, 14 Feb 2022 20:35:18 +0000 Date: Tue, 15 Feb 2022 04:34:24 +0800 From: kernel test robot To: Ivan Bornyakov Cc: kbuild-all@lists.01.org, mdf@kernel.org, hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, system@metrotek.ru, Ivan Bornyakov Subject: Re: [PATCH] fpga: microsemi-spi: add Microsemi FPGA manager Message-ID: <202202150434.i0eTuy1u-lkp@intel.com> References: <20220214133835.25097-1-i.bornyakov@metrotek.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220214133835.25097-1-i.bornyakov@metrotek.ru> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ivan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.17-rc4 next-20220214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 754e0b0e35608ed5206d6a67a791563c631cec07 config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150434.i0eTuy1u-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 11.2.0 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 # https://github.com/0day-ci/linux/commit/19d9c174f03a9b8387ba654d558351cac9d63d24 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923 git checkout 19d9c174f03a9b8387ba654d558351cac9d63d24 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/fpga/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: drivers/fpga/microsemi-spi.c: In function 'microsemi_fpga_ops_write': >> drivers/fpga/microsemi-spi.c:244:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=] 244 | dev_err(dev, "Failed to find bitstream start %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:244:17: note: in expansion of macro 'dev_err' 244 | dev_err(dev, "Failed to find bitstream start %d\n", | ^~~~~~~ drivers/fpga/microsemi-spi.c:244:63: note: format string is defined here 244 | dev_err(dev, "Failed to find bitstream start %d\n", | ~^ | | | int | %ld In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: drivers/fpga/microsemi-spi.c:252:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=] 252 | dev_err(dev, "Failed to parse bitstream size %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:252:17: note: in expansion of macro 'dev_err' 252 | dev_err(dev, "Failed to parse bitstream size %d\n", | ^~~~~~~ drivers/fpga/microsemi-spi.c:252:63: note: format string is defined here 252 | dev_err(dev, "Failed to parse bitstream size %d\n", | ~^ | | | int | %ld In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=] 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err' 259 | dev_err(dev, | ^~~~~~~ drivers/fpga/microsemi-spi.c:260:70: note: format string is defined here 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ~^ | | | int | %ld In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=] 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err' 259 | dev_err(dev, | ^~~~~~~ drivers/fpga/microsemi-spi.c:260:89: note: format string is defined here 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ~^ | | | int | %ld In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: >> drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err' 259 | dev_err(dev, | ^~~~~~~ drivers/fpga/microsemi-spi.c:260:107: note: format string is defined here 260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", | ~^ | | | int | %ld In file included from include/linux/device.h:15, from include/linux/spi/spi.h:10, from drivers/fpga/microsemi-spi.c:7: drivers/fpga/microsemi-spi.c:274:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=] 274 | "Failed to write bitstream frame number %d of %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/microsemi-spi.c:273:25: note: in expansion of macro 'dev_err' 273 | dev_err(dev, | ^~~~~~~ drivers/fpga/microsemi-spi.c:274:80: note: format string is defined here 274 | "Failed to write bitstream frame number %d of %d\n", | ~^ | | | int | %ld vim +244 drivers/fpga/microsemi-spi.c 225 226 static int microsemi_fpga_ops_write(struct fpga_manager *mgr, const char *buf, 227 size_t count) 228 { 229 ssize_t bitstream_start = 0, bitstream_size; 230 struct microsemi_fpga_priv *priv = mgr->priv; 231 struct spi_device *spi = priv->spi; 232 struct device *dev = &mgr->dev; 233 u8 tmp_buf[SPI_FRAME_SIZE + 1]; 234 int ret, i; 235 236 if (crc_ccitt(0, buf, count)) { 237 dev_err(dev, "CRC error\n"); 238 239 return -EINVAL; 240 } 241 242 bitstream_start = lookup_block_start(BITSTREAM_ID, buf, count); 243 if (bitstream_start < 0) { > 244 dev_err(dev, "Failed to find bitstream start %d\n", 245 bitstream_start); 246 247 return bitstream_start; 248 } 249 250 bitstream_size = parse_bitstream_size(buf, count); 251 if (bitstream_size < 0) { 252 dev_err(dev, "Failed to parse bitstream size %d\n", 253 bitstream_size); 254 255 return bitstream_size; 256 } 257 258 if (bitstream_start + bitstream_size * SPI_FRAME_SIZE > count) { 259 dev_err(dev, > 260 "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n", 261 bitstream_start, bitstream_size * SPI_FRAME_SIZE, count); 262 263 return -EFAULT; 264 } 265 266 for (i = 0; i < bitstream_size; i++) { 267 tmp_buf[0] = SPI_FRAME; 268 memcpy(tmp_buf + 1, buf + bitstream_start + i * SPI_FRAME_SIZE, 269 SPI_FRAME_SIZE); 270 271 ret = microsemi_spi_write(spi, tmp_buf, sizeof(tmp_buf)); 272 if (ret) { 273 dev_err(dev, 274 "Failed to write bitstream frame number %d of %d\n", 275 i, bitstream_size); 276 277 return ret; 278 } 279 } 280 281 return 0; 282 } 283 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org