From nobody Thu Sep 11 19:21:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABA1DC001DB for ; Mon, 7 Aug 2023 13:43:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbjHGNnb (ORCPT ); Mon, 7 Aug 2023 09:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234454AbjHGNnI (ORCPT ); Mon, 7 Aug 2023 09:43:08 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE75BE54 for ; Mon, 7 Aug 2023 06:42:40 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RKHTT2fHmzNmlS; Mon, 7 Aug 2023 21:38:37 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 7 Aug 2023 21:42:04 +0800 From: Ruan Jinjie To: , Liam Girdwood , Mark Brown CC: Subject: [PATCH -next] regulator: rpi-panel-attiny-regulator: Remove redundant of_match_ptr() Date: Mon, 7 Aug 2023 21:41:27 +0800 Message-ID: <20230807134127.2380390-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here, and __maybe_unused can also be removed. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with and without it. Signed-off-by: Ruan Jinjie --- drivers/regulator/rpi-panel-attiny-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regul= ator/rpi-panel-attiny-regulator.c index e9719a378a0b..ed046cc998c6 100644 --- a/drivers/regulator/rpi-panel-attiny-regulator.c +++ b/drivers/regulator/rpi-panel-attiny-regulator.c @@ -397,7 +397,7 @@ static struct i2c_driver attiny_regulator_driver =3D { .driver =3D { .name =3D "rpi_touchscreen_attiny", .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, - .of_match_table =3D of_match_ptr(attiny_dt_ids), + .of_match_table =3D attiny_dt_ids, }, .probe =3D attiny_i2c_probe, .remove =3D attiny_i2c_remove, --=20 2.34.1