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 D02D9C433FE for ; Thu, 24 Feb 2022 00:25:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1D008D0003; Wed, 23 Feb 2022 19:25:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DC67E8D0001; Wed, 23 Feb 2022 19:25:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C402B8D0003; Wed, 23 Feb 2022 19:25:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id A0C968D0001 for ; Wed, 23 Feb 2022 19:25:58 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4E6BA2314B for ; Thu, 24 Feb 2022 00:25:58 +0000 (UTC) X-FDA: 79175780796.08.1988813 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf05.hostedemail.com (Postfix) with ESMTP id 5BB0C100007 for ; Thu, 24 Feb 2022 00:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645662357; x=1677198357; h=date:from:to:cc:subject:message-id:mime-version; bh=w9Vp4P4Fo4x8u/PLkvuPxldUgC+eTOvY6XvqC8jnJy0=; b=ltZGxP4UoILjz+DAuhs3RDqYAgV7gwKBgnDt7IPFYwBIKKKDEtNEL066 6dOh2Y1yXsi2hR7ormpKEZq5oi+OBjY8+GTJ5UjihNo5iUt6Xk1bUL0h1 ReRoY988OpfOmHCXpgVJqG3RqoZUgzJqNhUX0Dn3kAjv6ikQwP4ep0GCY HXq4frWwbWJ37mk6MQI4Gt6iBsIPBVPc+A/gZppCaXw8ZNwogs4cQ9DSn r90ahqNmyxuN7Iv7lMi2Bf9eUkIXn16vqM9azkdK/pwU3kTXazjBt/jte rssPp5njrkI+dO8Z+m0Xkod2v6Oc5YdB3yrrsTTtENPInWvPoUMo5S75b A==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="250943116" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="250943116" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 16:25:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="707246273" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 23 Feb 2022 16:25:54 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nN1xB-00021E-7c; Thu, 24 Feb 2022 00:25:53 +0000 Date: Thu, 24 Feb 2022 08:25:03 +0800 From: kernel test robot To: Kees Cook Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 4917/7526] drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202202240813.KmAiCopu-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ltZGxP4U; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf05.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 5BB0C100007 X-Stat-Signature: chssb3rprojbfsgtqspousjzj97a7qe3 X-HE-Tag: 1645662357-316386 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 196d330d7fb1e7cc0d85641c89ce4602cb36f12e commit: 28e77cc1c0686621a4d416f599cee5ab369daa0a [4917/7526] fortify: Detect struct member overflows in memset() at compile-time config: s390-randconfig-s031-20220223 (https://download.01.org/0day-ci/archive/20220224/202202240813.KmAiCopu-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=28e77cc1c0686621a4d416f599cee5ab369daa0a git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 28e77cc1c0686621a4d416f599cee5ab369daa0a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash drivers/mtd/nand/raw/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/mtd/nand/raw/hisi504_nand.c:362:26: sparse: sparse: cast removes address space '__iomem' of expression drivers/mtd/nand/raw/hisi504_nand.c:367:26: sparse: sparse: cast removes address space '__iomem' of expression >> drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: got void [noderef] __iomem *mmio >> drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: expected void * drivers/mtd/nand/raw/hisi504_nand.c:465:17: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: expected void * drivers/mtd/nand/raw/hisi504_nand.c:477:17: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: expected void const * drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: got void [noderef] __iomem *mmio drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *mmio @@ drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: expected void * drivers/mtd/nand/raw/hisi504_nand.c:603:9: sparse: got void [noderef] __iomem *mmio vim +465 drivers/mtd/nand/raw/hisi504_nand.c 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 422 5295cf2e047cf6 drivers/mtd/nand/raw/hisi504_nand.c Boris Brezillon 2018-09-06 423 static void hisi_nfc_cmdfunc(struct nand_chip *chip, unsigned command, 5295cf2e047cf6 drivers/mtd/nand/raw/hisi504_nand.c Boris Brezillon 2018-09-06 424 int column, int page_addr) 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 425 { 5295cf2e047cf6 drivers/mtd/nand/raw/hisi504_nand.c Boris Brezillon 2018-09-06 426 struct mtd_info *mtd = nand_to_mtd(chip); d699ed250c0738 drivers/mtd/nand/hisi504_nand.c Boris Brezillon 2015-12-10 427 struct hinfc_host *host = nand_get_controller_data(chip); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 428 int is_cache_invalid = 1; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 429 unsigned int flag = 0; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 430 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 431 host->command = command; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 432 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 433 switch (command) { 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 434 case NAND_CMD_READ0: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 435 case NAND_CMD_READOOB: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 436 if (command == NAND_CMD_READ0) 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 437 host->offset = column; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 438 else 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 439 host->offset = column + mtd->writesize; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 440 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 441 is_cache_invalid = 0; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 442 set_addr(mtd, column, page_addr); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 443 hisi_nfc_send_cmd_readstart(host); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 444 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 445 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 446 case NAND_CMD_SEQIN: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 447 host->offset = column; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 448 set_addr(mtd, column, page_addr); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 449 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 450 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 451 case NAND_CMD_ERASE1: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 452 set_addr(mtd, column, page_addr); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 453 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 454 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 455 case NAND_CMD_PAGEPROG: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 456 hisi_nfc_send_cmd_pageprog(host); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 457 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 458 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 459 case NAND_CMD_ERASE2: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 460 hisi_nfc_send_cmd_erase(host); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 461 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 462 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 463 case NAND_CMD_READID: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 464 host->offset = column; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 @465 memset(host->mmio, 0, 0x10); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 466 hisi_nfc_send_cmd_readid(host); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 467 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 468 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 469 case NAND_CMD_STATUS: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 470 flag = hinfc_read(host, HINFC504_CON); bace41f80f65dc drivers/mtd/nand/raw/hisi504_nand.c Miquel Raynal 2020-08-27 471 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 472 hinfc_write(host, dd58d38fb30aa9 drivers/mtd/nand/hisi504_nand.c Dan Carpenter 2015-02-11 473 flag & ~(HINFC504_CON_ECCTYPE_MASK << 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 474 HINFC504_CON_ECCTYPE_SHIFT), HINFC504_CON); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 475 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 476 host->offset = 0; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 477 memset(host->mmio, 0, 0x10); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 478 hisi_nfc_send_cmd_status(host); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 479 hinfc_write(host, flag, HINFC504_CON); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 480 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 481 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 482 case NAND_CMD_RESET: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 483 hisi_nfc_send_cmd_reset(host, host->chipselect); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 484 break; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 485 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 486 default: 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 487 dev_err(host->dev, "Error: unsupported cmd(cmd=%x, col=%x, page=%x)\n", 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 488 command, column, page_addr); 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 489 } 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 490 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 491 if (is_cache_invalid) { 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 492 host->cache_addr_value[0] = ~0; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 493 host->cache_addr_value[1] = ~0; 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 494 } 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 495 } 54f531f6e33287 drivers/mtd/nand/hisi504_nand.c Zhou Wang 2015-01-25 496 :::::: The code at line 465 was first introduced by commit :::::: 54f531f6e332875bd8a604871532f7f1174adc0e mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc :::::: TO: Zhou Wang :::::: CC: Brian Norris --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org