From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A109C433F5 for ; Thu, 24 Feb 2022 01:28:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56E278D0002; Wed, 23 Feb 2022 20:28:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 52D498D0001; Wed, 23 Feb 2022 20:28:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3958A8D0002; Wed, 23 Feb 2022 20:28:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0243.hostedemail.com [216.40.44.243]) by kanga.kvack.org (Postfix) with ESMTP id 0DA6F8D0001 for ; Wed, 23 Feb 2022 20:28:01 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 92DD1181DB388 for ; Thu, 24 Feb 2022 01:28:00 +0000 (UTC) X-FDA: 79175937120.25.46E9B84 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf27.hostedemail.com (Postfix) with ESMTP id 45D3840002 for ; Thu, 24 Feb 2022 01:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645666079; x=1677202079; h=date:from:to:cc:subject:message-id:mime-version: content-transfer-encoding; bh=nZoyXBEkZHnaqFDqTU7Y57leJ+5wkh6rallh9FFXIug=; b=ju9Bq2pNkJQOr1nMaGdu8byOT4JyGuU6iQoOX2QYibpNj1TFTLCrtYQL nqieR7Rm6PZGk/SqWKaKdp+GOkqBzm3R6KSErXx3sq0aDpaFa3KTYLFaD iLB4SJENOS8DwejTY1cNJmHzFBkQrAWOz8kfZqgiv867Y/+eYeN3Xldc1 aNPVV/CxcqonSVe3w4CZs/5vdtgBdVWr5fVlf776kXSJbYGpqLJHPja7a 9EI/Go46inKxJW3G7TsGC3SJ/s5ZwW5jFQ/9Y8f7f53dyfckyQcJSEs0R zSf568FdpxMAoxznck+0T1uQNipFvQJl/j1aP3I+Ta6dysd7FCOIfQWk8 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="252316587" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="252316587" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 17:27:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="491417490" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 23 Feb 2022 17:27:56 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nN2vD-00024W-FV; Thu, 24 Feb 2022 01:27:55 +0000 Date: Thu, 24 Feb 2022 09:27:21 +0800 From: kernel test robot To: =?iso-8859-1?Q?Andr=E9?= Almeida Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , Mark Brown Subject: [linux-next:master 5015/7526] drivers/spi/spi-amd.c:296:21: warning: cast to smaller integer type 'enum amd_spi_versions' from 'const void *' Message-ID: <202202240908.Oxy0WRXe-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ju9Bq2pN; spf=none (imf27.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 45D3840002 X-Stat-Signature: 5qtifueqo1iqtoodby75cene31beg9cp X-HE-Tag: 1645666079-262699 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Andr=E9, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master head: 196d330d7fb1e7cc0d85641c89ce4602cb36f12e commit: 209043554915d7c51ac112a668ad1a255e1bea61 [5015/7526] spi: amd: Ad= d support for version AMDI0062 config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/2= 0220224/202202240908.Oxy0WRXe-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271= fc04d5b97b12e6b797c6067d3c96a8d7470e) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next= .git/commit/?id=3D209043554915d7c51ac112a668ad1a255e1bea61 git remote add linux-next https://git.kernel.org/pub/scm/linux/ke= rnel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 209043554915d7c51ac112a668ad1a255e1bea61 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/spi/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/spi/spi-amd.c:296:21: warning: cast to smaller integer type 'e= num amd_spi_versions' from 'const void *' [-Wvoid-pointer-to-enum-cast] amd_spi->version =3D (enum amd_spi_versions) device_get_match_= data(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~ 1 warning generated. vim +296 drivers/spi/spi-amd.c 272=09 273 static int amd_spi_probe(struct platform_device *pdev) 274 { 275 struct device *dev =3D &pdev->dev; 276 struct spi_master *master; 277 struct amd_spi *amd_spi; 278 int err =3D 0; 279=09 280 /* Allocate storage for spi_master and driver private data */ 281 master =3D spi_alloc_master(dev, sizeof(struct amd_spi)); 282 if (!master) { 283 dev_err(dev, "Error allocating SPI master\n"); 284 return -ENOMEM; 285 } 286=09 287 amd_spi =3D spi_master_get_devdata(master); 288 amd_spi->io_remap_addr =3D devm_platform_ioremap_resource(pdev, 0= ); 289 if (IS_ERR(amd_spi->io_remap_addr)) { 290 err =3D PTR_ERR(amd_spi->io_remap_addr); 291 dev_err(dev, "error %d ioremap of SPI registers failed\n", err); 292 goto err_free_master; 293 } 294 dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr); 295=09 > 296 amd_spi->version =3D (enum amd_spi_versions) device_get_match_dat= a(dev); 297=09 298 /* Initialize the spi_master fields */ 299 master->bus_num =3D 0; 300 master->num_chipselect =3D 4; 301 master->mode_bits =3D 0; 302 master->flags =3D SPI_MASTER_HALF_DUPLEX; 303 master->setup =3D amd_spi_master_setup; 304 master->transfer_one_message =3D amd_spi_master_transfer; 305=09 306 /* Register the controller with SPI framework */ 307 err =3D devm_spi_register_master(dev, master); 308 if (err) { 309 dev_err(dev, "error %d registering SPI controller\n", err); 310 goto err_free_master; 311 } 312=09 313 return 0; 314=09 315 err_free_master: 316 spi_master_put(master); 317=09 318 return err; 319 } 320=09 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org