From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8E63C433FE for ; Thu, 10 Nov 2022 12:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V6lgpCCTSrqdVX4mj/TE1LVlgKSSEHt2AoMTlCAmDMo=; b=PEcmXZcWKp5NpW tIi+caKzHE0fmf+a1IGrLGT8Xd/09A+wKF7M5QiYFvNR+4ZMFkSx1hEA1G3pfuZIhhA41Y5pMRx+T 1Inds8DErqRKWb10oxa+i/edr9pan5mG5eSo5KShuLsLdFfDB/HYa0lb+XNuQIdH/HY3SsE6qJi69 igU6ipe0W5Ik9yosHpiavWSJlsNRphmGXely1rYdguephhsC9TxzhHy5O4cKw1mbwt0rx65hv5LY2 fzcuapHfUR+909vkmWS+zNqpcn5njmT3XjgJQYHqU1tGkuNm7z+Owmz8xOzg8n3jaAt+xaIvciRpJ Nvw8Voljsm50I5NZevdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot6Ei-005bSp-Fg; Thu, 10 Nov 2022 12:00:49 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot6A1-005ZCf-RV for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 11:55:59 +0000 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> 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_035557_942853_FDC71367 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel