Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp519030rwb; Thu, 10 Nov 2022 04:11:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf5BxnWvtKitoi/MS8v1FSApQkH+7S+6cIfe8j59W0LsOXEV9rEmQkROGwA8/Ui5iCOFQ0ZC X-Received: by 2002:a17:902:70c1:b0:188:7918:a70c with SMTP id l1-20020a17090270c100b001887918a70cmr22927387plt.22.1668082272009; Thu, 10 Nov 2022 04:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668082272; cv=none; d=google.com; s=arc-20160816; b=BxGzib2F0kZZv48IssVgEUd6+blWISxsjVO8CRG+EOvh8PttuvUDnlL9Dw/F4ttJGd RW/KZk3xYc+7XQQWY0SOjA0kIZjFXxhj7QiZme4dbSsZD96VYdHBjBgED9J2i3fpXxiq 0Cw4IU/cbnE3ZWGhW8TlZdr7R5S8NaaQcAHTfbbUv06kDskLRfDusnE6XqUG3V3O28I1 p8pVc3eSAwOoRb9rz10pLOc0MS+RZz5WJ+zUIryXTCoHuhh1QaaJTqoRMG/PyrTnqzya B8jYohKzQVK/6xWUa2O/Tw3fspFvIowWDPjv6Oo/briSLPsT8wNc2NjsOOQwZJofU/Oc v4tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9nC1aGGRYutdDQBBOYtClzZFvLDZHcMMkdK1y/i78r4=; b=Dj92k7yLSrxFPFEiGKceP0ERbk/lqkhN8XGPEedK9VVxZzp9KtyuhVruBfJNLfmbG2 3aa00X9/JYYgLreD9jowC5FgSn0rshTBF/jXzF/TNm2/Fpjw9wzFWJHERH+RGvSqvx/Y x0V6LBWcmxWyDrh05XQ2YG7Yq3hm2CbJDbrZzyKYOErrXYnQsSEi1IR6dt8gKYGQAiNC FZR2sedM3RCTgbLEBIq+t+1qIDE5zZYYFOF7k5t7JnlhfwYyOYkbLUtanbmL/4efH2Wi 7c5VNv0XultSQuhJvBGlVIkrOxsRa4m5Sxa4fcbxlXNNsL67gwZ5F35oesgkkoQvRzXF biyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PNBlN5Jh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a170902cccc00b00172c1c6abc1si20611732ple.172.2022.11.10.04.10.57; Thu, 10 Nov 2022 04:11:12 -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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PNBlN5Jh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbiKJL4H (ORCPT + 92 others); Thu, 10 Nov 2022 06:56:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbiKJL4G (ORCPT ); Thu, 10 Nov 2022 06:56:06 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24C8B5D6B6; Thu, 10 Nov 2022 03:56:06 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AABS89A025979; Thu, 10 Nov 2022 11:55:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=9nC1aGGRYutdDQBBOYtClzZFvLDZHcMMkdK1y/i78r4=; b=PNBlN5JhnEX9cY2yDfp7w1Www7g7XtL/Ce6nUeDU4juHDwyvJLphy4yauoRhL9y+zlAk bDqxy6PW0BG4I0pecgzqzLVJ0FLa4wB+Gxxs5zHHbg/ttlK1NTK3rLEhV4/XJ7WjhVAg 0UdiOeNhMS78yLo2tUilv9VdMwhhv1F+EH8qZ3pyXv/YXu/p+nFn/7uCxmKF6NlCpuON Lh+S//eL1YOz8G2aPzAr91t5t9VNJJAmrabHQv0T3UPcl+9Pc6Pnu+GEzull28CJ40lp lg5Wih0+PWj9lOP421IjJb40owkLRpAgP9vC5vK/5+glRCJ5z29Z4oaxPZpr2Ceqrm3+ ZQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3krw7n0gb6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Nov 2022 11:55:55 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2AABtsZ6015842 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Nov 2022 11:55:54 GMT Received: from [10.214.66.81] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 10 Nov 2022 03:55:51 -0800 Message-ID: <93735187-801f-8cc0-787c-3522800a079c@quicinc.com> Date: Thu, 10 Nov 2022 17:25:49 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH] i2c: imx: use devm_platform_get_and_ioremap_resource() Content-Language: en-US To: , CC: , , , , , References: <202211101723428058432@zte.com.cn> From: Mukesh Ojha In-Reply-To: <202211101723428058432@zte.com.cn> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: -Kd5uQzVROutHVUMuO9ZUClvUjwEMeV5 X-Proofpoint-ORIG-GUID: -Kd5uQzVROutHVUMuO9ZUClvUjwEMeV5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-10_08,2022-11-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 mlxlogscore=758 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1011 mlxscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211100087 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Hi, On 11/10/2022 2:53 PM, ye.xingchen@zte.com.cn wrote: > 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); > LGTM. Reviewed-by: Mukesh Ojha _Mukesh