From: Markus Elfring <Markus.Elfring@web.de>
To: dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@linux.ie>,
Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Aditya Pakki <pakki001@umn.edu>,
Kangjie Lu <kjlu@umn.edu>, Navid Emamdoost <emamd001@umn.edu>,
Stephen McCamant <smccaman@umn.edu>
Subject: drm/gma500: Checking a get_config_mode() call in mdfld_dsi_output_init()
Date: Sun, 20 Oct 2019 10:20:26 +0200 [thread overview]
Message-ID: <0f501ca6-0b4f-0ccd-c366-bed2a10fde03@web.de> (raw)
Hello,
I tried another script for the semantic patch language out.
This source code analysis approach points a call of the member
function “get_config_mode” out for further considerations
according to the implementation of the function “mdfld_dsi_output_init”.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/gma500/mdfld_dsi_output.c?id=531e93d11470aa2e14e6a3febef50d9bc7bab7a1#n523
https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/gma500/mdfld_dsi_output.c#L523
…
dsi_config->fixed_mode = p_vid_funcs->get_config_mode(dev);
if (p_vid_funcs->get_panel_info(dev, pipe, &dsi_panel_info))
goto dsi_init_err0;
…
dsi_config->mode = dsi_config->fixed_mode;
…
if (!dsi_config->fixed_mode) {
DRM_ERROR("No pannel fixed mode was found\n");
goto dsi_init_err0;
}
…
How do you think about to move the condition check for the data structure
member “fixed_mode” directly after the corresponding assignment?
Can it be helpful to reorder these statements a bit?
Regards,
Markus
reply other threads:[~2019-10-20 8:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f501ca6-0b4f-0ccd-c366-bed2a10fde03@web.de \
--to=markus.elfring@web.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=patrik.r.jakobsson@gmail.com \
--cc=smccaman@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®