From: Markus Elfring Subject: drm/gma500: Checking a get_config_mode() call in mdfld_dsi_output_init() Date: Sun, 20 Oct 2019 10:20:26 +0200 Message-ID: <0f501ca6-0b4f-0ccd-c366-bed2a10fde03@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Patrik Jakobsson Cc: LKML , kernel-janitors@vger.kernel.org, Aditya Pakki , Kangjie Lu , Navid Emamdoost , Stephen McCamant List-Id: dri-devel@lists.freedesktop.org Hello, I tried another script for the semantic patch language out. This source code analysis approach points a call of the member function =E2=80=9Cget_config_mode=E2=80=9D out for further considerations according to the implementation of the function =E2=80=9Cmdfld_dsi_output_= init=E2=80=9D. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dr= ivers/gpu/drm/gma500/mdfld_dsi_output.c?id=3D531e93d11470aa2e14e6a3febef50= d9bc7bab7a1#n523 https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/gma500/md= fld_dsi_output.c#L523 =E2=80=A6 dsi_config->fixed_mode =3D p_vid_funcs->get_config_mode(dev); if (p_vid_funcs->get_panel_info(dev, pipe, &dsi_panel_info)) goto dsi_init_err0; =E2=80=A6 dsi_config->mode =3D dsi_config->fixed_mode; =E2=80=A6 if (!dsi_config->fixed_mode) { DRM_ERROR("No pannel fixed mode was found\n"); goto dsi_init_err0; } =E2=80=A6 How do you think about to move the condition check for the data structure member =E2=80=9Cfixed_mode=E2=80=9D directly after the corresponding assig= nment? Can it be helpful to reorder these statements a bit? Regards, Markus