Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp896493pxb; Tue, 1 Feb 2022 12:41:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyT0zMeRDIDqnCq3ogC1Y8UxMMs5/0mXKdEX4qGIOCedb7hXitEbFNHLvCjcEmVrSPx4O4g X-Received: by 2002:a17:90a:8544:: with SMTP id a4mr4310097pjw.171.1643748068309; Tue, 01 Feb 2022 12:41:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748068; cv=none; d=google.com; s=arc-20160816; b=wm8hlF8b5o9yslYhFV/F1zIcqFpKh8cAdYFpNy0iOYIRhSOxP8y2lDIrbDYk9SbKcC PI8j5C+dA4ZX9heB7dx61wPKKNHdh4x5KsXapoPcBuXCE0hM1QTp90asfVrWpB1wJB+8 qwzQIjj+zy32mcvdWm+0DIRVWh5uuX7qiwn6hpC3B6yTMkKoZ4w7ed6RMF1VDpmY0hM3 YF8f8vTqQn3bRmNu2p55rk0Z+5FiKxvG/pRRaO57hOQgeDs3fk7wJEJlUVn9UTwko95z aNVtqbVHznAiquJNKd9gyr7r1afu+pTyH+YfHCIWiagB7laEYtJQ+ne5p1w7Uo3JcwlI X/FA== 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=kcBx9dXdY0c2zK4i3Sei0vNgBz0A1g9K3Aa5dTnCHDQ=; b=0HKqfYPf5G/XnDrjLooEtTkJc52O/hqJ+RrfBybrfrVlw7snmOBeIe1eD4lDErSumw O9tYrY/2hVnzyBLBjdw3vOdGE/45NWNjYksaSQXD7gQV3nKPRSaPiCJnds/0GQXcbFsc GD++qwTXXj6FQgVn6M8WsfttH4VPzxlwY6/AHReMszADdtVKwRLpn/HrA8WVdN6kwPaM yIpmf51y93j4kWSmLx7cU2nWBTrYt2R3T/9CuPNuQOLrItVuvtqVx85P+qQ1W8E39fpA 7c3giDOVISgFz5H47gWfgHId3biXuVBKTLafOOnd2qS9RkJGMVsmIgpcY4eSq0A0IFDT c/4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lhj5mheD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si18421607plg.246.2022.02.01.12.40.56; Tue, 01 Feb 2022 12:41:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lhj5mheD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349136AbiAaOue (ORCPT + 99 others); Mon, 31 Jan 2022 09:50:34 -0500 Received: from mga12.intel.com ([192.55.52.136]:33601 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242163AbiAaOua (ORCPT ); Mon, 31 Jan 2022 09:50:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643640630; x=1675176630; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Kjxgvtg0vA5ioKCecgDjmRu4lWOUQ43UzEpU3sKhBqI=; b=lhj5mheDeRTEssGXO+NfI/v4jsPLNgBc/9w0KtqCt09VeWakP2WwAkXq 9CHco4fcrSPuB9UK8JYnbhvU4gQauZY7UMZWhMiu+/4jSZ8ksUpBsYRHg E/T2X5axAyqqWJuzTz00DS3KVgGKSTli6gRgGFI7VOB2xFloN8h/b+0of A9q/YR586KBT0CW+wAv6Gp2dgSHee2lTarOW/6m5QiYMwDiV39ecxCwq2 UYFZVig2G4vkjqLmG95VrMjCbEujO4jyWjbuG1OOaqrZctIzCy/eQMV7G 0lMIO0NfQMEb5WkLn3InUZ8PLb4GUtgfevR3bcQd7hMG/UnAc3+R0gkGr g==; X-IronPort-AV: E=McAfee;i="6200,9189,10243"; a="227444015" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="227444015" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 06:50:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="534193833" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 31 Jan 2022 06:50:27 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nEY0g-000S1u-Pg; Mon, 31 Jan 2022 14:50:26 +0000 Date: Mon, 31 Jan 2022 22:49:34 +0800 From: kernel test robot To: Pratyush Yadav , Mark Brown Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Pratyush Yadav , Tudor Ambarus , Michael Walle , Miquel Raynal , Takahiro Kuwano , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: spi-mem: check if data buffers are on stack Message-ID: <202201312233.QPZMOWRk-lkp@intel.com> References: <20220131114508.1028306-1-p.yadav@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220131114508.1028306-1-p.yadav@ti.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pratyush, I love your patch! Yet something to improve: [auto build test ERROR on broonie-spi/for-next] [also build test ERROR on v5.17-rc2 next-20220131] [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/Pratyush-Yadav/spi-spi-mem-check-if-data-buffers-are-on-stack/20220131-195211 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next config: arm-socfpga_defconfig (https://download.01.org/0day-ci/archive/20220131/202201312233.QPZMOWRk-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2cdbaca3943a4d6259119f185656328bd3805b68) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/0b93f667f8445e744ca4b8f80ce9a1ad4c981a2e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Pratyush-Yadav/spi-spi-mem-check-if-data-buffers-are-on-stack/20220131-195211 git checkout 0b93f667f8445e744ca4b8f80ce9a1ad4c981a2e # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/spi/spi-mem.c:212:6: error: implicit declaration of function 'object_is_on_stack' [-Werror,-Wimplicit-function-declaration] object_is_on_stack(op->data.buf.in)) ^ 1 error generated. vim +/object_is_on_stack +212 drivers/spi/spi-mem.c 193 194 static int spi_mem_check_op(const struct spi_mem_op *op) 195 { 196 if (!op->cmd.buswidth || !op->cmd.nbytes) 197 return -EINVAL; 198 199 if ((op->addr.nbytes && !op->addr.buswidth) || 200 (op->dummy.nbytes && !op->dummy.buswidth) || 201 (op->data.nbytes && !op->data.buswidth)) 202 return -EINVAL; 203 204 if (!spi_mem_buswidth_is_valid(op->cmd.buswidth) || 205 !spi_mem_buswidth_is_valid(op->addr.buswidth) || 206 !spi_mem_buswidth_is_valid(op->dummy.buswidth) || 207 !spi_mem_buswidth_is_valid(op->data.buswidth)) 208 return -EINVAL; 209 210 /* Buffers must be DMA-able. */ 211 if (op->data.dir == SPI_MEM_DATA_IN && > 212 object_is_on_stack(op->data.buf.in)) 213 return -EINVAL; 214 215 if (op->data.dir == SPI_MEM_DATA_OUT && 216 object_is_on_stack(op->data.buf.out)) 217 return -EINVAL; 218 219 return 0; 220 } 221 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org