Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2288119rdb; Mon, 5 Feb 2024 01:32:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf25r4hL8/hS98mmO3IgGUCqn8ESXnkIhvpg3AYPJmtVz2GrtGsU/Pte/8SwHvKhZbMEKS X-Received: by 2002:a05:6a20:c526:b0:19c:74d1:b314 with SMTP id gm38-20020a056a20c52600b0019c74d1b314mr10658105pzb.17.1707125566896; Mon, 05 Feb 2024 01:32:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707125566; cv=pass; d=google.com; s=arc-20160816; b=fkbJjOiZyxGCIyAT9G6mrVPTU+TreeaRZ7htyjAh6HBcUAcjtLO3E/BfxVjlIG3Jgq t3H9gCOKie4QBFGz0G7/ETBUxSv5npZclSVi9pwYm+kMqCgn3o8A4oWxtj1YZqcgUWrN IzE7jNJ/83q+oiIjWdVWowhrh5S9jXJWaE1QKB9zjIfKMS51TcjWrrg5FwnGNGdm8FaU TsazCokvuZUivV1Z5mRXFq4laemt4ehhgbMiNuEFwncsSN8pe5bUaIpNIyTBVGq3V35T uNZMqAizXpnOg95e75j9Z8g/Gr8jBqQ+3p55NC6kWRErAfgke8dwlneRORVRc9kwgwzq 9bvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:subject:from:cc :content-language:to:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=AwarvWj5WyHlzQ9gQlssZ3VM2E34GegAq9rLwrtR+YY=; fh=BHmmoDB3oOeHNFdX+S4miZflNgmiWRNlGcY5AcCQX18=; b=ND3RuqWeAj3AudNVhKrFzI6VNpA8fVvVQEWlRXzF7C6bFmtTdVNtlNm31Tf34OTzlJ 1tB8XtF6YoDmLujDU+rTcctF+WiqzE6nfDxJzOTCRPTqRzGYdxKkGIydPg9dtnwdVJ5b msKxwsaPli42EwKtlzu3rj2OPgUZKLv3vkJJEz5IwZjbdQC8U52pim6DjkCpPWbeotCG dBhmDmwk3oWXT8MbzyyzxLdEqM8PZ/4jg0fShHReJAaIIj6kbI3SZK8Ht6jF2FsboDdw Gm9IG448jc7Juz7aT7X9XnJs+5ftcE37U+Db2I6gcxb6qKQDKfjndfnCe+GC58LJQUFP fytw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=ovux59WT; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-52300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de X-Forwarded-Encrypted: i=1; AJvYcCUaAncovl2xG7wtkU+9e/2UUXEVI8OlGiOvxbCzfTsA4sjuRptbKKfWxvDavGXrr0S+oL7aTukRnCPMkVocNIvRX4M1m17GNj21+2lZRA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c16-20020aa78e10000000b006e04dc3a8f3si396138pfr.97.2024.02.05.01.32.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 01:32:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=ovux59WT; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-52300-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4EDE9281ACC for ; Mon, 5 Feb 2024 09:32:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD3E012B9D; Mon, 5 Feb 2024 09:32:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="ovux59WT" Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75C4A12B71; Mon, 5 Feb 2024 09:32:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707125556; cv=none; b=mqvNERv5ELyNx9NdQfFAIMWRVRjU2l1keR9vdfAf8CdfJH9WvlPboYCdNFtbojFyAFQt0pR9M9Ft6f54yy8gXHKVOiKnBnobXz3l+0RBP19dOWh0pKAhOrtKDSMsiaH+dU5belGpwauEHeSgGEUxhH5JzXPJC6UFg0a0R/PfOq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707125556; c=relaxed/simple; bh=GEntBRcn/VvV5CPwy8i6X54F9AV/5jvw0rbYXd4l4oQ=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=M2r0rrlZn0vrh1dtKxUfuiQaW2of8iCzehxomaEj/zE4lDwi1ORrW0UxQyV4M6e/cC5aN9EUNRf5fo8fsBoudokgTsBsRdKgUJD3sMIDqfmuau/gJ9E6FcfpX4QtNmhS0/rrnWLNn084nv+z57ZPceVFYvKxf7N7K1tecw1r4Pk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=ovux59WT; arc=none smtp.client-ip=212.227.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1707125533; x=1707730333; i=markus.elfring@web.de; bh=GEntBRcn/VvV5CPwy8i6X54F9AV/5jvw0rbYXd4l4oQ=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=ovux59WTPEtWvqN8rRPh8tPJL/y2zUri9qeSupWxr7mTWII6DPCIXoTEnUM69zib gI7LPQUVxjvCIuXqiIsbOIy0AXB0J68XnavX67heKWA7I6Cp7BPEShIPb9rfGl279 7bREACCY4YqZ99V84eGeX7J4QBZAqj0zdOHEUShVERwV8/qbQkMYYyT7zY/jdV2w8 qUFu5DNT8qs1WvRLlq6XTnxN2TGAthDBdnemf5aX3BWdq4ktsu/FnlZ0YGLcr5Nzo 6TjEtQQzu19Q3t8LJwBRIqV6xnsgDFpJVac8wpEuxi9xKWTtyYO5Ce1KthvfSUMyn tPTdXnXAQk0B2bbbrw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MRW2R-1rLBlo1cqj-00NcQg; Mon, 05 Feb 2024 10:32:13 +0100 Message-ID: <2a4ecf78-20e7-4678-a67d-0d66956b07cc@web.de> Date: Mon, 5 Feb 2024 10:32:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, Angelo Gioacchino Del Regno , Chun-Kuang Hu , Daniel Vetter , Daniel Vetter , Matthias Brugger , Philipp Zabel Content-Language: en-GB Cc: LKML From: Markus Elfring Subject: [PATCH] drm/mediatek: Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:WNiOKf02rYQX2wRHyD+44vgsxq4gvfzYMMnvPUEMljK8TxTVSZE crq19rcOVrfbBjGR4a2tr2LgwUdDKYHxZnfmOLYAwN7Q/U+6PCuurLhtYANurbla/ARGuuO EJRLtucvVTbdVD2WNcaEYmUGQzl8VgZJMsJ57eCz2srWUjfkWUv1JTFX6zkmehC+72rjhJc 1KLOLVClOJ33TGxdHXMcQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:WOh8rUEyD44=;2uUXQdcmdakS8l1q5N6ORN+MzQd PTEI2vpWHlHk1lzz5qPwlhQR30W8ymGIbUmylBV2BFLL0S9+0rcNjv7ZCziWx9bcp7FttBn9F 8ZqjRa3EvtkSzT8JIVQjRcg7HIXr82VbWOYyqLbzgh3xCYNYnoEqD0S//M75LE0DGP6rMvTDS 5efmaFuiDm4WUY5MQ7zpG2ro0E45Z5Svh5Z3OIiTH7VTrfhhKd00a2OsO5GRk84wppABZqMlX c6AcmKZV1qPTW/IT736+BpZRSo/yWfv3YVvKfyqDszssPNBQV9+l11Qr228pF5W8B2YC3bck3 RscinEKcvO91A2MRNCzSNmYOkbQMkwlfepYHAZ1bNjPLepwrFcX2aqPw/HXxNwYmSyIxd8U/a X3y1VaXg1z/qsw1KFry5vJeplw3izdgHnQG4h4Vs0ta5bnzITl+3JspE82oNSY4mdbfiJLiFo haUnWxAJcXmm3nlpBKNkK0Q/9FnJK64GbT+HHTwGC33RSxmdI5nP0qjoyuFF+0c9z6mCudfDQ vwxYXuFXqix6/VlVKuANKkNPdN6MRhQqltrGht+T2IxqfPYoECFQNotY5xEH5s3xlwX5UI9qG xXiFRGtaBQXbx7XhOqd/B3Q5elC+G+8NSu0tlWVgiPmoHoDgHZUPaFkaO3SufpXUrH1x8WNy4 qzkOnMypTqSAz/jlt9YYBLgyqh9H6E/U5ZxOALCXYNxafNxJQxA1gJ8ShrMvNh8aVBLecyTPR ITVGwM3ZqbrVSepwy105IemQUkZKzlcXlH4q8Iw0Za1lEAzp6rD881qoBssa6z8vJTifmgtAI UE0lmtKqNNkpFxPzRSxAbUSEJWT5fgCDKH+H4LCarI6fU= From: Markus Elfring Date: Mon, 5 Feb 2024 10:18:47 +0100 A wrapper function is available since the commit 890cc39a879906b63912482df= c41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate source code= . This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring =2D-- drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c b/drivers/gpu/drm/med= iatek/mtk_hdmi_ddc.c index 54e46e440e0f..52d55861f954 100644 =2D-- a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c @@ -284,8 +284,7 @@ static int mtk_hdmi_ddc_probe(struct platform_device *= pdev) return PTR_ERR(ddc->clk); } - mem =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - ddc->regs =3D devm_ioremap_resource(&pdev->dev, mem); + ddc->regs =3D devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(ddc->regs)) return PTR_ERR(ddc->regs); =2D- 2.43.0