Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp370478rwb; Thu, 10 Nov 2022 01:55:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM4Fs6C/zle+SMraOjbVg+kU9/HK3jZdGb8jW4FsMjwV9gn8miOq8hv7E1fMrPn6AmBKnrqv X-Received: by 2002:a50:ab10:0:b0:461:c3c9:38e6 with SMTP id s16-20020a50ab10000000b00461c3c938e6mr2009926edc.350.1668074109443; Thu, 10 Nov 2022 01:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668074109; cv=none; d=google.com; s=arc-20160816; b=rPFV2BM6XJsZGv3OtDmMdcn5vvOcNNBowJby7W25iqvehBeHEWVKD7rCwAzgLAxLdp Uaw9B1rVqRq8IwU2bvHXZtUGN+nOBWErYsuZhE8cydV1GLlflV8vtbdxuybxMCaVnbCz OfNe1+nVH7DXJQqRh53aDlOvpZE7Tz9SQSoYMG54k1XXOxE+w26xCU43J6zxrFq7QDRV p3sO9X0wS8mlieSUlEvFgOG2/CoHIKFZsYnbIXiRQ4W4fN4uSrP9RANSITGJJNAkTcT+ zV1iR0wzb1w+ftZA4X54hg1FAKCunhULEkJi/zeg2KWd0ERWzsME5goxJIXdZSh1LTYf ljvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=MC8KTveD7uIqs3xgL/Eg63zrW8B3h5Umi9NF01k9/w0=; b=z+BbnzEsGhbxFQAsmROejWk4z2xBS6ZTG5MJe6oRHsZ4Z8L/RyVnWB1qxogxjXIvxy x17S2XW2q+um4xbgHyXQjETD9HfQ6bd70zkcuk646g+torVdQXtUg1ap+wGBUghoqUuo ovGYgsI4NvddJKqroSXrl01bNuuI2SzsjF4OhtXJIpyNZrpk70bySXEKxSjlI6o6bmpE YJLJMyKmOLMGgikUod3cW7sU08WCAwf0Adn637NKE4d96byWiPqD1q/M1tfh5iZTTETZ TjKjQbClV6K5umJmQrSmQsPBgvKcupjL0P2hkus8w8m2awD+3N+bMwZUPdaN0u0cbovT XQYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020aa7daca000000b0045d4015cdaesi16066621eds.372.2022.11.10.01.54.47; Thu, 10 Nov 2022 01:55:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbiKJJYF (ORCPT + 92 others); Thu, 10 Nov 2022 04:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbiKJJYE (ORCPT ); Thu, 10 Nov 2022 04:24:04 -0500 X-Greylist: delayed 1815 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 10 Nov 2022 01:24:02 PST Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E69CBDF50 for ; Thu, 10 Nov 2022 01:24:02 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N7GcK0MQnz4xVnk; Thu, 10 Nov 2022 17:24:01 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AA9NeBE000821; Thu, 10 Nov 2022 17:23:40 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Thu, 10 Nov 2022 17:23:42 +0800 (CST) Date: Thu, 10 Nov 2022 17:23:42 +0800 (CST) X-Zmail-TransId: 2afa636cc31efffffffff0d0f058 X-Mailer: Zmail v1.0 Message-ID: <202211101723428058432@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , Subject: =?UTF-8?B?W1BBVENIXSBpMmM6IGlteDogdXNlIGRldm1fcGxhdGZvcm1fZ2V0X2FuZF9pb3JlbWFwX3Jlc291cmNlKCk=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2AA9NeBE000821 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 636CC331.000 by FangMail milter! X-FangMail-Envelope: 1668072241/4N7GcK0MQnz4xVnk/636CC331.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636CC331.000/4N7GcK0MQnz4xVnk X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Minghao Chi Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/i2c/busses/i2c-imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 3082183bd66a..1ce0cf7a323f 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1449,8 +1449,7 @@ static int i2c_imx_probe(struct platform_device *pdev) if (irq < 0) return irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1