From nobody Thu Dec 18 19:09:19 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 58583C83F01 for ; Wed, 30 Aug 2023 19:31:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241874AbjH3Tbf (ORCPT ); Wed, 30 Aug 2023 15:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343819AbjH3RIh (ORCPT ); Wed, 30 Aug 2023 13:08:37 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE7AD19A for ; Wed, 30 Aug 2023 10:08:33 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,214,1688396400"; d="scan'208";a="178203450" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 31 Aug 2023 02:08:33 +0900 Received: from localhost.localdomain (unknown [10.226.92.150]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 1462D4005B33; Thu, 31 Aug 2023 02:08:27 +0900 (JST) From: Biju Das To: Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Douglas Anderson , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Zhu Wang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Laurent Pinchart , Helen Koike Subject: [PATCH v5 1/3] drm/bridge/analogix/anx78xx: Drop ID table Date: Wed, 30 Aug 2023 18:08:17 +0100 Message-Id: <20230830170819.309269-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> References: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The driver has an ID table, but it uses the wrong API for retrieving match data and that will lead to a crash, if it is instantiated by user space or using ID. From this, there is no user for the ID table and let's drop it from the driver as it saves some memory. Signed-off-by: Biju Das Reviewed-by: Douglas Anderson Reviewed-by: Laurent Pinchart Reviewed-by: Andy Shevchenko Reviewed-by: Helen Koike --- v4->v5: * Added Rb tag from Andy and Helen. v3->v4: * Added Rb tag from Laurent and Douglas Anderson. v2->v3: * Updated commit header. v1->v2: * Dropped ID table support. --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/g= pu/drm/bridge/analogix/analogix-anx78xx.c index 800555aef97f..6169db73d2fe 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c @@ -1367,12 +1367,6 @@ static void anx78xx_i2c_remove(struct i2c_client *cl= ient) kfree(anx78xx->edid); } =20 -static const struct i2c_device_id anx78xx_id[] =3D { - { "anx7814", 0 }, - { /* sentinel */ } -}; -MODULE_DEVICE_TABLE(i2c, anx78xx_id); - static const struct of_device_id anx78xx_match_table[] =3D { { .compatible =3D "analogix,anx7808", .data =3D anx7808_i2c_addresses }, { .compatible =3D "analogix,anx7812", .data =3D anx781x_i2c_addresses }, @@ -1389,7 +1383,6 @@ static struct i2c_driver anx78xx_driver =3D { }, .probe =3D anx78xx_i2c_probe, .remove =3D anx78xx_i2c_remove, - .id_table =3D anx78xx_id, }; module_i2c_driver(anx78xx_driver); =20 --=20 2.25.1 From nobody Thu Dec 18 19:09:19 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 6053CC83F15 for ; Wed, 30 Aug 2023 18:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344075AbjH3S44 (ORCPT ); Wed, 30 Aug 2023 14:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343820AbjH3RIm (ORCPT ); Wed, 30 Aug 2023 13:08:42 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E4C281A1 for ; Wed, 30 Aug 2023 10:08:38 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,214,1688396400"; d="scan'208";a="174495930" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 31 Aug 2023 02:08:38 +0900 Received: from localhost.localdomain (unknown [10.226.92.150]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9E9954005B33; Thu, 31 Aug 2023 02:08:33 +0900 (JST) From: Biju Das To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Douglas Anderson Subject: [PATCH v5 2/3] drm/bridge: Drop conditionals around of_node pointers Date: Wed, 30 Aug 2023 18:08:18 +0100 Message-Id: <20230830170819.309269-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> References: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The commit c9e358dfc4a8 ("driver-core: remove conditionals around devicetree pointers") supposed to remove conditionals around of_node pointer, but it missed out drm/bridge.h. So drop #if conditionals by adding struct device_node forward declaration. Suggested-by: Douglas Anderson Signed-off-by: Biju Das Reviewed-by: Douglas Anderson Reviewed-by: Laurent Pinchart --- v5: * Split from patch#2 * Updated commit description * Added struct device_node forward declaration. --- include/drm/drm_bridge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index c339fc85fd07..843736627f60 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -32,6 +32,8 @@ #include #include =20 +struct device_node; + struct drm_bridge; struct drm_bridge_timings; struct drm_connector; @@ -716,10 +718,8 @@ struct drm_bridge { struct drm_encoder *encoder; /** @chain_node: used to form a bridge chain */ struct list_head chain_node; -#ifdef CONFIG_OF /** @of_node: device node pointer to the bridge */ struct device_node *of_node; -#endif /** @list: to keep track of all added bridges */ struct list_head list; /** --=20 2.25.1 From nobody Thu Dec 18 19:09:19 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 B4D0BC83F28 for ; Wed, 30 Aug 2023 18:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239589AbjH3Skg (ORCPT ); Wed, 30 Aug 2023 14:40:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343821AbjH3RIr (ORCPT ); Wed, 30 Aug 2023 13:08:47 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E7A219A for ; Wed, 30 Aug 2023 10:08:43 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,214,1688396400"; d="scan'208";a="174495934" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 31 Aug 2023 02:08:43 +0900 Received: from localhost.localdomain (unknown [10.226.92.150]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id EF12C4000925; Thu, 31 Aug 2023 02:08:38 +0900 (JST) From: Biju Das To: Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Douglas Anderson , Zhu Wang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH v5 3/3] drm/bridge/analogix/anx78xx: Drop conditionals around of_node pointers Date: Wed, 30 Aug 2023 18:08:19 +0100 Message-Id: <20230830170819.309269-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> References: <20230830170819.309269-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Having conditional around the of_node pointers turns out to make driver code use ugly #ifdef and #if blocks. So drop the conditionals. Suggested-by: Douglas Anderson Signed-off-by: Biju Das Reviewed-by: Douglas Anderson --- v5: * Split from patch#2 --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/g= pu/drm/bridge/analogix/analogix-anx78xx.c index 6169db73d2fe..ad8241758896 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c @@ -1231,9 +1231,7 @@ static int anx78xx_i2c_probe(struct i2c_client *clien= t) =20 mutex_init(&anx78xx->lock); =20 -#if IS_ENABLED(CONFIG_OF) anx78xx->bridge.of_node =3D client->dev.of_node; -#endif =20 anx78xx->client =3D client; i2c_set_clientdata(client, anx78xx); --=20 2.25.1