From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.12 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796326823; b=o5GNnHkJx7i59dGKlvyARMEONbaDyLyPnn7+/dPFIiYaPqTkW4lRYp64Jo+ZjRBDMajd fios4uMKdPamp6WYqiTrQ7eXu0Cb15xgCtewdIlgU1RNlJmWAzHUOyzP1tDqzNN38WZF7 Ry5yFyUzWi87usn0vUy1a1drVPTxc5Ef4N5bGgnmg7Ii5raoi+JZ815XPX6KIsxoU7MaD c4qdseN1UXCIcltkK/5fOvzlIbAmHo8IKeUFSwt5uxrhbwtAsqLcjwPRxRsBV99E+gduE DogBhM1tb3e4Fc6qJffynDOiasP1UhZqmgrhS4GCRlYvPfCvxUl4W2E4tmYUwusmRxg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796326823; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:User-Agent; bh=LLfiOVk5sMq/UyNsH5Ss5tP187o96Xfom4YdIYJAP9k=; b=Ont+QC0mSMCysRB/LVJrSle5euJGAkRX8UJqeYdNFBcfKXAG7fTQTUYsSniHuIKMIJMF K7pvLuNdJyhxjvTaFIWPqQ0GxlAC0aTSUlsVJH4DFFPhV8auQCS0v2Gg+qmhxslTFCG67 UNq4wVrVk4kw5StdfmfGZVZlc1Q9YGkz2z5pPCUXEl3SI8YmWIr9Z83fP0DC6jkcgEciP 5+4o4NZshjeBiI65mEcQ0Jj9bOj/fKp49z1sq9Ydzatiug2P8BPl/DkhsVSi3nQWa2jW8 fawc8SZjx+Si3vFHKJA3veVlRBfzM8As8LbCnHpznPCRR+pWl/hXdd9ZrI8CBdowevw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FBtZfuUY; arc=none smtp.remote-ip=198.175.65.12 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5725960A3808 for ; Thu, 3 Dec 2026 19:40:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5725960A3808 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FBtZfuUY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796326824; x=1827862824; h=date:from:to:cc:subject:message-id; bh=LLfiOVk5sMq/UyNsH5Ss5tP187o96Xfom4YdIYJAP9k=; b=FBtZfuUYQCaTO9FBlhRlA89EAL11cxhLCLKVeCwIa2/NEg02Q5RiEEw4 azA7syNy0HQNouNwwrsOS3Na5ITG//H1f6wfMe23MLQUC8KtTrxaWf6Y3 efn5lgz2WAGJS02WN4tRUTDksQV0uXZRwIfGXz4xwEHnpPM/ERUlm16Ef jYZ1cUA5//UYF6RzDA1SOwRkiu62+FbVFNnDcwGI1u1UKGfPxRPew4L/i kLY/aWGGbFeWlKHxVrNBDoHK1xpOOiwMjG6GcOJIjVwJ2/UPWypY6HiiB 0hRIzvoPeDkURbBgxip6ZOOdGanLXE4xIhIxBXisgTxRCwVJr2ZnXt4cW A==; X-CSE-ConnectionGUID: vSSdF5FDSA+fUN9HIDzMhw== X-CSE-MsgGUID: vd3VDvoPQKeGlfkefwXVjw== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5220605" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5220605" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 11:40:22 -0800 X-CSE-ConnectionGUID: wd14WslZSQa43OOZASIFgA== X-CSE-MsgGUID: vPgCkWh6RbeNegI+BZH08w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="14206832" Received: from igk-lkp-server01.igk.intel.com (HELO 146cf1e082f1) ([10.211.93.152]) by fmviesa006.fm.intel.com with ESMTP; 03 Dec 2026 11:40:21 -0800 Received: from kbuild by 146cf1e082f1 with local (Exim 4.98.2) (envelope-from ) id 1xZCfD-000000003tg-0tdL; Thu, 03 Dec 2026 19:40:19 +0000 Date: Thu, 03 Dec 2026 20:40:16 +0100 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com Subject: drivers/mtd/mtd_virt_concat.c:170:16: sparse: sparse: Initializer entry defined twice Message-ID: <20261203202937.iOSgJnmB-lkp@intel.com> User-Agent: s-nail v14.9.25 X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list :::::: :::::: Manual check reason: "sparse: Initializer entry defined twice" :::::: BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: linux-kernel@vger.kernel.org TO: Amit Kumar Mahapatra CC: Miquel Raynal CC: Luca Ceresoli tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 007722b8211f7b34fdf21b1e6a9c32497633ea29 commit: 43db6366fc2de02050e66389f5628d3fdc9af10a mtd: Add driver for concatenating devices date: 9 months ago :::::: branch date: 2 hours ago :::::: commit date: 9 months ago config: alpha-randconfig-r2305-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203202937.iOSgJnmB-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 12.5.0 sparse: v0.6.5-rc1-94-g0d159c10 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203202937.iOSgJnmB-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Fixes: 43db6366fc2d ("mtd: Add driver for concatenating devices") | Reported-by: kernel test robot | Closes: https://lore.kernel.org/r/20261203202937.iOSgJnmB-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/mtd/mtd_virt_concat.c:170:16: sparse: sparse: Initializer entry defined twice drivers/mtd/mtd_virt_concat.c:170:16: sparse: also defined here drivers/mtd/mtd_virt_concat.c:175:23: sparse: sparse: Initializer entry defined twice drivers/mtd/mtd_virt_concat.c:175:23: sparse: also defined here drivers/mtd/mtd_virt_concat.c:191:18: sparse: sparse: Initializer entry defined twice drivers/mtd/mtd_virt_concat.c:191:18: sparse: also defined here drivers/mtd/mtd_virt_concat.c:197:26: sparse: sparse: Initializer entry defined twice drivers/mtd/mtd_virt_concat.c:197:26: sparse: also defined here drivers/mtd/mtd_virt_concat.c:322:32: sparse: sparse: Initializer entry defined twice drivers/mtd/mtd_virt_concat.c:322:32: sparse: also defined here vim +170 drivers/mtd/mtd_virt_concat.c 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 149 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 150 /** 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 151 * mtd_virt_concat_create_item - Create a concat item 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 152 * @parts: pointer to 'device_node' 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 153 * @count: number of mtd devices that make up 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 154 * the concatenated device. 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 155 * 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 156 * Return: 0 on success, -error otherwise. 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 157 */ 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 158 static int mtd_virt_concat_create_item(struct device_node *parts, 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 159 unsigned int count) 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 160 { 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 161 struct mtd_virt_concat_node *item; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 162 struct mtd_concat *concat; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 163 int i; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 164 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 165 for (i = 0; i < (count - 1); i++) { 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 166 if (mtd_is_part_concat(of_parse_phandle(parts, CONCAT_PROP, i))) 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 167 return 0; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 168 } 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 169 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 @170 item = kzalloc(sizeof(*item), GFP_KERNEL); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 171 if (!item) 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 172 return -ENOMEM; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 173 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 174 item->count = count; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 175 item->nodes = kcalloc(count, sizeof(*item->nodes), GFP_KERNEL); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 176 if (!item->nodes) { 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 177 kfree(item); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 178 return -ENOMEM; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 179 } 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 180 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 181 /* 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 182 * The partition in which "part-concat-next" property 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 183 * is defined is the first device in the list of concat 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 184 * devices. 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 185 */ 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 186 item->nodes[0] = parts; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 187 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 188 for (i = 1; i < count; i++) 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 189 item->nodes[i] = of_parse_phandle(parts, CONCAT_PROP, (i - 1)); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 190 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 191 concat = kzalloc(sizeof(*concat), GFP_KERNEL); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 192 if (!concat) { 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 193 kfree(item); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 194 return -ENOMEM; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 195 } 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 196 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 197 concat->subdev = kcalloc(count, sizeof(*concat->subdev), GFP_KERNEL); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 198 if (!concat->subdev) { 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 199 kfree(item); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 200 kfree(concat); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 201 return -ENOMEM; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 202 } 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 203 item->concat = concat; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 204 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 205 list_add_tail(&item->head, &concat_node_list); 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 206 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 207 return 0; 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 208 } 43db6366fc2de0 Amit Kumar Mahapatra 2026-02-04 209 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki