Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8036155ybi; Tue, 23 Jul 2019 01:43:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNA2K6On/lDKzlC4LeKjyKGUe7IC/pNavpZPlWLQN3UqIqhzcZ4e8Kyzjnij50Khm3sCAe X-Received: by 2002:a65:6108:: with SMTP id z8mr44093558pgu.289.1563871382382; Tue, 23 Jul 2019 01:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563871382; cv=none; d=google.com; s=arc-20160816; b=N1aDgWsGVm0loJSSHCPknwBiEtJ4cuL2PuytA4X2vN29IB27wy+nyDN/EsuTfQW46m b4gkgJrslcWEEvpRq8FpBHVfffG3BMIP+tUTl2nFXEe6eXuLB9rHxxQeSizxDqv20S41 fqkulxzky8tPaARQHf5ydzDOpiJRvO13EH47scZDceWs1uSYzFGXq/0gYDtWB8Pz8075 9loYoxrEfv+76wmG2dPz2XelcSCmtDGYlM7uVvnDsfxrjX+/BcjyXX4pwjrraJymhcIE sPHMfjszmI0W04YLlJSCjMDcAMvcOPO1q5Z6M3xFpI1cdfqMNSPoBCr3/L55ZL8IHlwQ +O8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=GGmEPSkh9xNAnpW6RGvSVSfZeU5k/ZYTvfnb9cv23v8=; b=I0Hv3RlkjSf1c7wni+5JjEH9eq8uVG51OLVMNrgAW/K9LziuogqRfs2QG2AVsk6xmf 4hiAYJyFsSus7DW9H5F8MzqhHEdSxSVT7xa0Ix/u3bR0njhT/ArmK3ifL9RtnONorJmC jEu2orZPK8v9ObEjF7skz/eNUHYPqk0f9P1hnYKN639N9am1s/Frwcb8vGj1b7Yk8qAc GpFXuXnkC7Tyz6/SpDdeZlPgSVbngbr5OtwYj4mGEf2Yml/+KT1pbsZPSdcQ8crWRexH QAJWnvJobbzhSmRf/wvuFR0iEAIwhZuX+amJ2r5CddjAtsBvheJ5+mj9qArsC6NsXQ9I b/Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si10693314pgt.119.2019.07.23.01.42.46; Tue, 23 Jul 2019 01:43:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729439AbfGWAeB (ORCPT + 99 others); Mon, 22 Jul 2019 20:34:01 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:44119 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726770AbfGWAeB (ORCPT ); Mon, 22 Jul 2019 20:34:01 -0400 X-IronPort-AV: E=Sophos;i="5.64,297,1559512800"; d="scan'208";a="392907466" Received: from c-73-22-29-55.hsd1.il.comcast.net (HELO hadrien) ([73.22.29.55]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 02:33:57 +0200 Date: Mon, 22 Jul 2019 19:33:55 -0500 (CDT) From: Julia Lawall X-X-Sender: jll@hadrien To: Miquel Raynal cc: kbuild-all@01.org, linux-kernel@vger.kernel.org Subject: drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:142:1-10: WARNING: Use devm_platform_ioremap_resource for ecc -> base Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, The calls to platform_get_resource and devm_ioremap_resource can be merged. julia ---------- Forwarded message ---------- Date: Tue, 23 Jul 2019 06:07:33 +0800 From: kbuild test robot To: kbuild@01.org Cc: Julia Lawall Subject: drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:142:1-10: WARNING: Use devm_platform_ioremap_resource for ecc -> base CC: kbuild-all@01.org CC: linux-kernel@vger.kernel.org TO: Miquel Raynal tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7b5cf701ea9c395c792e2a7e3b7caf4c68b87721 commit: 72c5af00272339af6bbed6fe7275cd731f57be2d mtd: rawnand: Clarify Kconfig entry MTD_NAND date: 3 months ago :::::: branch date: 6 hours ago :::::: commit date: 3 months ago If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Julia Lawall >> drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:142:1-10: WARNING: Use devm_platform_ioremap_resource for ecc -> base git remote add linus https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git git remote update linus git checkout 72c5af00272339af6bbed6fe7275cd731f57be2d vim +142 drivers/mtd/nand/raw/ingenic/ingenic_ecc.c 15de8c6efd0effe Paul Cercueil 2019-03-19 126 15de8c6efd0effe Paul Cercueil 2019-03-19 127 int ingenic_ecc_probe(struct platform_device *pdev) 15de8c6efd0effe Paul Cercueil 2019-03-19 128 { 15de8c6efd0effe Paul Cercueil 2019-03-19 129 struct device *dev = &pdev->dev; 15de8c6efd0effe Paul Cercueil 2019-03-19 130 struct ingenic_ecc *ecc; 15de8c6efd0effe Paul Cercueil 2019-03-19 131 struct resource *res; 15de8c6efd0effe Paul Cercueil 2019-03-19 132 15de8c6efd0effe Paul Cercueil 2019-03-19 133 ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); 15de8c6efd0effe Paul Cercueil 2019-03-19 134 if (!ecc) 15de8c6efd0effe Paul Cercueil 2019-03-19 135 return -ENOMEM; 15de8c6efd0effe Paul Cercueil 2019-03-19 136 15de8c6efd0effe Paul Cercueil 2019-03-19 137 ecc->ops = device_get_match_data(dev); 15de8c6efd0effe Paul Cercueil 2019-03-19 138 if (!ecc->ops) 15de8c6efd0effe Paul Cercueil 2019-03-19 139 return -EINVAL; 15de8c6efd0effe Paul Cercueil 2019-03-19 140 15de8c6efd0effe Paul Cercueil 2019-03-19 141 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 15de8c6efd0effe Paul Cercueil 2019-03-19 @142 ecc->base = devm_ioremap_resource(dev, res); 15de8c6efd0effe Paul Cercueil 2019-03-19 143 if (IS_ERR(ecc->base)) 15de8c6efd0effe Paul Cercueil 2019-03-19 144 return PTR_ERR(ecc->base); 15de8c6efd0effe Paul Cercueil 2019-03-19 145 15de8c6efd0effe Paul Cercueil 2019-03-19 146 ecc->ops->disable(ecc); 15de8c6efd0effe Paul Cercueil 2019-03-19 147 15de8c6efd0effe Paul Cercueil 2019-03-19 148 ecc->clk = devm_clk_get(dev, NULL); 15de8c6efd0effe Paul Cercueil 2019-03-19 149 if (IS_ERR(ecc->clk)) { 15de8c6efd0effe Paul Cercueil 2019-03-19 150 dev_err(dev, "failed to get clock: %ld\n", PTR_ERR(ecc->clk)); 15de8c6efd0effe Paul Cercueil 2019-03-19 151 return PTR_ERR(ecc->clk); 15de8c6efd0effe Paul Cercueil 2019-03-19 152 } 15de8c6efd0effe Paul Cercueil 2019-03-19 153 15de8c6efd0effe Paul Cercueil 2019-03-19 154 mutex_init(&ecc->lock); 15de8c6efd0effe Paul Cercueil 2019-03-19 155 15de8c6efd0effe Paul Cercueil 2019-03-19 156 ecc->dev = dev; 15de8c6efd0effe Paul Cercueil 2019-03-19 157 platform_set_drvdata(pdev, ecc); 15de8c6efd0effe Paul Cercueil 2019-03-19 158 15de8c6efd0effe Paul Cercueil 2019-03-19 159 return 0; 15de8c6efd0effe Paul Cercueil 2019-03-19 160 } 15de8c6efd0effe Paul Cercueil 2019-03-19 161 EXPORT_SYMBOL(ingenic_ecc_probe); 15de8c6efd0effe Paul Cercueil 2019-03-19 162 15de8c6efd0effe Paul Cercueil 2019-03-19 163 MODULE_LICENSE("GPL v2"); :::::: The code at line 142 was first introduced by commit :::::: 15de8c6efd0effef3a5226bd5ab7f101c9f4948f mtd: rawnand: ingenic: Separate top-level and SoC specific code :::::: TO: Paul Cercueil :::::: CC: Miquel Raynal --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation