Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8156911ybi; Tue, 23 Jul 2019 03:48:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq7UVCRkZL2e3QcQCpu0uQgHcv5JEEKLwZJ1dCvkSFmwfyyYJ58Kf+57BG5R2v+9P6hlpU X-Received: by 2002:a62:8c81:: with SMTP id m123mr5112566pfd.240.1563878936717; Tue, 23 Jul 2019 03:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563878936; cv=none; d=google.com; s=arc-20160816; b=GgyxR5rZVYzTY/Sbk4OYl5IsR++xTix0/XjIrqpXJof1C+s1+QWPN4jylXAfs9aGpF aL8b0DFw5PHAUo2sBF418n3TdIIkKvF7BVuoKLFzrqVWQMJx9e0hIGnbktiYNvQGCc2D 2tIwAu+3A2RNJe+JTL2SCw3YnZ56vdx0X4ufOHgInniEtF/csa3XqG3uaHAtFVeCcqht Pv00LO5ed/dtow2YwqHQxMKtqjj0kVWoGUMu+qSCpUO6m8PkXDJ8fcMwANSAaFZNebhz 4GixYIASUWN31WeMk30EMwZ1RfaggQ/wvj/3AjY72GOX1BUfGI54prd1HlEOuPWmgyH3 gsuA== 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=VJFhS0eGHcG48sd9/5huj3qAwdhsjAQ+A+9NqbxzUzA=; b=ReQbv9KUjGxbe1FWbD/AmAIK67KTNBW+42H62d74HKZYZuyvJSe//h9r6E/ju1HEx3 bNS4fOlfctCNfcRauvf/5t1lMyzTqgoBrPtcAJ1gUqow3ekR+irJ8qaNRIqDa0tXCr+h 6QGr+vJ2VupF9zreIl/MWmoQY9fmVzyafVt95vHrhlaQwqYzGxJ46e2FNlKDGubTXfrj rDrGB5S7XIn47sNFVltqF1dY9+vdq3Zp+RLpb8HSunAeUCHebGra/i63xl93f0Nw7Boi JuISo5knPq7Bm/N1Am/Dj5/PqHYp3qCseQ+7svXZ5q4vAK5AgkTa+0383TOuDqZ0Gyr3 WZpQ== 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 p8si9940233plq.53.2019.07.23.03.48.41; Tue, 23 Jul 2019 03:48:56 -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 S1731352AbfGVXjm (ORCPT + 99 others); Mon, 22 Jul 2019 19:39:42 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:50818 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727021AbfGVXjm (ORCPT ); Mon, 22 Jul 2019 19:39:42 -0400 X-IronPort-AV: E=Sophos;i="5.64,296,1559512800"; d="scan'208";a="392905680" 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 01:39:37 +0200 Date: Mon, 22 Jul 2019 18:39:34 -0500 (CDT) From: Julia Lawall X-X-Sender: jll@hadrien To: Paul Cercueil cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra , Boris Brezillon , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, himanshujha199640@gmail.com Subject: [PATCH] mtd: rawnand: ingenic: fix devm_platform_ioremap_resource.cocci warnings 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 From: kbuild test robot drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c:330:1-9: WARNING: Use devm_platform_ioremap_resource for cs -> base Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci Fixes: c403ec33b613 ("mtd: rawnand: ingenic: Fix ingenic_ecc dependency") CC: Paul Cercueil Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7b5cf701ea9c395c792e2a7e3b7caf4c68b87721 commit: c403ec33b613a15d9fd8dde37f246b79cd56b5df mtd: rawnand: ingenic: Fix ingenic_ecc dependency :::::: branch date: 6 hours ago :::::: commit date: 3 weeks ago Please take the patch only if it's a positive warning. Thanks! ingenic_nand_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c @@ -310,7 +310,6 @@ static int ingenic_nand_init_chip(struct struct device *dev = &pdev->dev; struct ingenic_nand *nand; struct ingenic_nand_cs *cs; - struct resource *res; struct nand_chip *chip; struct mtd_info *mtd; const __be32 *reg; @@ -326,8 +325,7 @@ static int ingenic_nand_init_chip(struct jz4780_nemc_set_type(nfc->dev, cs->bank, JZ4780_NEMC_BANK_NAND); - res = platform_get_resource(pdev, IORESOURCE_MEM, chipnr); - cs->base = devm_ioremap_resource(dev, res); + cs->base = devm_platform_ioremap_resource(pdev, chipnr); if (IS_ERR(cs->base)) return PTR_ERR(cs->base);