From: Daniel Vetter <daniel@ffwll.ch>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
linux-fbdev@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/6] video: fbdev: controlfb: fix sparse warning about using incorrect type
Date: Tue, 24 Mar 2020 20:45:21 +0000 [thread overview]
Message-ID: <20200324204521.GL2363188@phenom.ffwll.local> (raw)
In-Reply-To: <20200324134508.25120-2-b.zolnierkie@samsung.com>
On Tue, Mar 24, 2020 at 02:45:03PM +0100, Bartlomiej Zolnierkiewicz wrote:
> Use in_le32() instead of le32_to_cpup() to fix sparse warning about
> improper type of the argument.
>
> Also add missing inline keyword to control_par_to_var() definition
> (to match function prototype).
>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
> drivers/video/fbdev/controlfb.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
> index 38b61cdb5ca4..9625792f4413 100644
> --- a/drivers/video/fbdev/controlfb.c
> +++ b/drivers/video/fbdev/controlfb.c
> @@ -313,7 +313,7 @@ static int controlfb_blank(int blank_mode, struct fb_info *info)
> container_of(info, struct fb_info_control, info);
> unsigned ctrl;
>
> - ctrl = le32_to_cpup(CNTRL_REG(p,ctrl));
> + ctrl = in_le32(CNTRL_REG(p, ctrl));
> if (blank_mode > 0)
> switch (blank_mode) {
> case FB_BLANK_VSYNC_SUSPEND:
> @@ -952,7 +952,8 @@ static int control_var_to_par(struct fb_var_screeninfo *var,
> * Convert hardware data in par to an fb_var_screeninfo
> */
>
> -static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
> +static inline void control_par_to_var(struct fb_par_control *par,
Just quick drive-by bikeshed, feel free to ignore: static inline within a
.c file imo doesn't make sense anymore, compilers are smart enough
nowadays. I'd just drop this.
-Daniel
> + struct fb_var_screeninfo *var)
> {
> struct control_regints *rv;
>
> --
> 2.24.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2020-03-24 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200324134518eucas1p1440c92398ddcbe5ea72d6db3703d3f97@eucas1p1.samsung.com>
2020-03-24 13:45 ` [PATCH v2 0/6] video: fbdev: controlfb: small cleanup Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134518eucas1p16e1a39c14dfd101f5a6d86218a9e19af@eucas1p1.samsung.com>
2020-03-24 13:45 ` [PATCH v2 1/6] video: fbdev: controlfb: fix sparse warning about using incorrect type Bartlomiej Zolnierkiewicz
2020-03-24 20:45 ` Daniel Vetter [this message]
2020-04-17 14:07 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134518eucas1p2441fc1b4d095d4320afe5e8a86e3430f@eucas1p2.samsung.com>
2020-03-24 13:45 ` [PATCH v2 2/6] video: fbdev: controlfb: add COMPILE_TEST support Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134519eucas1p2d606db263a636433bf1545c836bed138@eucas1p2.samsung.com>
2020-03-24 13:45 ` [PATCH v2 3/6] video: fbdev: controlfb: remove obsolete module support Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134519eucas1p1e9b54c01e452330425f49c442e4c1b4e@eucas1p1.samsung.com>
2020-03-24 13:45 ` [PATCH v2 4/6] video: fbdev: controlfb: remove function prototypes part #1 Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134519eucas1p24bc9d0be4182b2f0046c002920bf7cc3@eucas1p2.samsung.com>
2020-03-24 13:45 ` [PATCH v2 5/6] video: fbdev: controlfb: remove function prototypes part #2 Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200324134520eucas1p2d95faa6d58939b45765ebca40d137f71@eucas1p2.samsung.com>
2020-03-24 13:45 ` [PATCH v2 6/6] video: fbdev: controlfb: remove function prototypes part #3 Bartlomiej Zolnierkiewicz
2020-04-17 14:07 ` [PATCH v2 0/6] video: fbdev: controlfb: small cleanup Bartlomiej Zolnierkiewicz
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=20200324204521.GL2363188@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=a.hajda@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/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;
as well as URLs for NNTP newsgroup(s).