mbox series

[v2,00/12] Remove redundant checks on existence of 'bridge->encoder'

Message ID 20240513153109.46786-1-sui.jingfeng@linux.dev (mailing list archive)
Headers show
Series Remove redundant checks on existence of 'bridge->encoder' | expand

Message

Sui Jingfeng May 13, 2024, 3:30 p.m. UTC
The checks on the existence of bridge->encoder in the implementation of
drm_bridge_funcs::attach() is not necessary, as it has already been checked
in the drm_bridge_attach() function call by previous bridge or KMS driver.
The drm_bridge_attach() will quit with a negative error code returned if
it fails for some reasons, hence, it is guaranteed that the .encoder member
of the drm_bridge instance is not NULL when various bridge attach functions
are called.

V1 -> V2:
	* Gather all similar patches to form a series (Laurent)
	* Fix various spell error (Laurent)
	* Correct commit message for bridges of i.MX (Ying)

Sui Jingfeng (12):
  drm/bridge: simple-bridge: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: tfp410: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: nxp-ptn3460: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: panel: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: it6505: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: adv7511: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: cdns-mhdp8546: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Remove a redundant check
    on existence of bridge->encoder
  drm/bridge: synopsys: dw-mipi-dsi: Remove a redundant check on
    existence of bridge->encoder
  drm/bridge: lt9611uxc: Remove a redundant check on existence of
    bridge->encoder
  drm/bridge: imx: Remove redundant checks on existence of
    bridge->encoder
  drm/bridge: analogix: Remove redundant checks on existence of
    bridge->encoder

 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c           |  5 -----
 drivers/gpu/drm/bridge/analogix/analogix-anx6345.c     |  5 -----
 drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c     |  5 -----
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c     |  5 -----
 drivers/gpu/drm/bridge/analogix/anx7625.c              | 10 ----------
 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c    |  5 -----
 drivers/gpu/drm/bridge/imx/imx-ldb-helper.c            |  5 -----
 drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c    |  5 -----
 drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c        |  5 -----
 drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c           |  5 -----
 drivers/gpu/drm/bridge/ite-it6505.c                    |  5 -----
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c             |  5 -----
 .../gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   |  5 -----
 drivers/gpu/drm/bridge/nxp-ptn3460.c                   |  5 -----
 drivers/gpu/drm/bridge/panel.c                         |  5 -----
 drivers/gpu/drm/bridge/simple-bridge.c                 |  5 -----
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c          |  5 -----
 drivers/gpu/drm/bridge/ti-tfp410.c                     |  5 -----
 18 files changed, 95 deletions(-)

Comments

Robert Foss May 13, 2024, 4:35 p.m. UTC | #1
On Mon, 13 May 2024 23:30:57 +0800, Sui Jingfeng wrote:
> The checks on the existence of bridge->encoder in the implementation of
> drm_bridge_funcs::attach() is not necessary, as it has already been checked
> in the drm_bridge_attach() function call by previous bridge or KMS driver.
> The drm_bridge_attach() will quit with a negative error code returned if
> it fails for some reasons, hence, it is guaranteed that the .encoder member
> of the drm_bridge instance is not NULL when various bridge attach functions
> are called.
> 
> [...]

Applied, thanks!

[01/12] drm/bridge: simple-bridge: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=f0a83a2cf9eb
[02/12] drm/bridge: tfp410: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=482ade3ec1c5
[03/12] drm/bridge: nxp-ptn3460: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=0f4bca4e1be3
[04/12] drm/bridge: panel: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=a8f856bf054a
[05/12] drm/bridge: it6505: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=8761a39e3f9d
[06/12] drm/bridge: adv7511: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=41e6ed85e457
[07/12] drm/bridge: cdns-mhdp8546: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=b24fd6e9eb66
[08/12] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=0a59deb2fedb
[09/12] drm/bridge: synopsys: dw-mipi-dsi: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=80221a89ff95
[10/12] drm/bridge: lt9611uxc: Remove a redundant check on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=91942a37ebba
[11/12] drm/bridge: imx: Remove redundant checks on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=ec74951a7507
[12/12] drm/bridge: analogix: Remove redundant checks on existence of bridge->encoder
        https://cgit.freedesktop.org/drm/drm-misc/commit/?id=591255853a37



Rob