Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1454073ybe; Mon, 2 Sep 2019 21:49:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz29Ouq+tVQh+ONAvLZt35e1ycoAxtC+oV2rXQIfV+mvtZBlUwvQxfSVM//X6mIEdU/alqQ X-Received: by 2002:a17:902:6843:: with SMTP id f3mr31977941pln.97.1567486145921; Mon, 02 Sep 2019 21:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567486145; cv=none; d=google.com; s=arc-20160816; b=L7UnYV8faIgz7XMqy1fQacexEZewi6ayUg+1B7ht6xGlkwpmWHdmugpeEXyZ448EKw BRG6Rf8ZbrHtCKOvXqoZrr8kBhIo0fEyW8hhGtQ+eYSBqHj9G6HikQa1qKD5yAmQkP6U dS9CTklN1AL3muY8kMbeJALoPAw6KXQ/+3Hc/yjTkadxtVrllPrdMNnelIfW4SZ8b0Ka HYjCKl7g/Z+h9DcFLbP+2dC+nzrdZR3bB1xUToWDvzjy4ENcLRQQm7Pwatlf76vnRvB/ bjBGY7KnfV2361l1TyCwhuBm5qXc8wDUubshQmG76pzEJrAaIFpwfAUwDbcDJs5SaflD AyTA== 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=B8nlV4fhP7YLMKbg+LkmoAkqqdqG5jA0npMaLIJYBO8=; b=ykqS71QzCtT0RD+63m4hK/4Wb4gpiz7ojxIx4TfHLTsxlueuj53T7Jbm/kFSnT+Sh6 sm94cPBgRT7WMm1yJwENPp/tG6cpmWTIKecit+AVGGP/X6xM5rdW5wqzjTDGefZ2jrsY sAEFHoRSaGti1BCXBAtJiurZVT3IhtsDe/NIn5cwjRuMDLUYPClIvtWDcYMiMOKklMxc 6k2j4EOxTgAMxssbqACDO8ULnkaaMjhdbUS6t7ol/27Mmw2U/YPPyEhz+jE2WHNfBb+n b67Q7lpHNIlbcYiWN9B5IyJ2UmfZfXFdql/owp6MmPDbgoza3NUtpAoJmKJpG5xWIIPn D9DQ== 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 14si13453012pga.452.2019.09.02.21.48.47; Mon, 02 Sep 2019 21:49:05 -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 S1725919AbfICEry (ORCPT + 99 others); Tue, 3 Sep 2019 00:47:54 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:35132 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbfICEry (ORCPT ); Tue, 3 Sep 2019 00:47:54 -0400 X-IronPort-AV: E=Sophos;i="5.64,461,1559512800"; d="scan'208";a="318029627" Received: from abo-12-105-68.mrs.modulonet.fr (HELO hadrien) ([85.68.105.12]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2019 06:47:52 +0200 Date: Tue, 3 Sep 2019 06:47:52 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Jisheng Zhang cc: Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] hwmon: 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 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: 658e687b4218 ("hwmon: Add Synaptics AS370 PVT sensor driver") CC: Jisheng Zhang Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next head: 9c551fac9ea9629cdc6deb205292c2bbe7b38917 commit: 658e687b4218b42d03a5b0b79a292c9c48f1ddaf [32/34] hwmon: Add Synaptics AS370 PVT sensor driver :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago Please take the patch only if it's a positive warning. Thanks! as370-hwmon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/hwmon/as370-hwmon.c +++ b/drivers/hwmon/as370-hwmon.c @@ -103,7 +103,6 @@ static const struct hwmon_chip_info as37 static int as370_hwmon_probe(struct platform_device *pdev) { - struct resource *res; struct device *hwmon_dev; struct as370_hwmon *hwmon; struct device *dev = &pdev->dev; @@ -112,8 +111,7 @@ static int as370_hwmon_probe(struct plat if (!hwmon) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hwmon->base = devm_ioremap_resource(&pdev->dev, res); + hwmon->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hwmon->base)) return PTR_ERR(hwmon->base);