From: Daniel Vetter <daniel@ffwll.ch>
To: Wambui Karuga <wambui.karugax@gmail.com>
Cc: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie,
daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panel: declare variable as __be16
Date: Wed, 1 Jan 2020 21:40:31 +0100 [thread overview]
Message-ID: <20200101204031.GC3856@dvetter-linux.ger.corp.intel.com> (raw)
In-Reply-To: <20191230195609.12386-1-wambui.karugax@gmail.com>
On Mon, Dec 30, 2019 at 10:56:09PM +0300, Wambui Karuga wrote:
> Declare the temp variable as __be16 to address the following sparse
> warning:
> drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: warning: incorrect type in initializer (different base types)
> drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: expected unsigned short [unsigned] [usertype] temp
> drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: got restricted __be16 [usertype] <noident>
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Applied to drm-misc-next, thanks for your patch!
-Daniel
> ---
> drivers/gpu/drm/panel/panel-lg-lg4573.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-lg-lg4573.c b/drivers/gpu/drm/panel/panel-lg-lg4573.c
> index 20235ff0bbc4..b262b53dbd85 100644
> --- a/drivers/gpu/drm/panel/panel-lg-lg4573.c
> +++ b/drivers/gpu/drm/panel/panel-lg-lg4573.c
> @@ -42,7 +42,7 @@ static int lg4573_spi_write_u16(struct lg4573 *ctx, u16 data)
> struct spi_transfer xfer = {
> .len = 2,
> };
> - u16 temp = cpu_to_be16(data);
> + __be16 temp = cpu_to_be16(data);
> struct spi_message msg;
>
> dev_dbg(ctx->panel.dev, "writing data: %x\n", data);
> --
> 2.17.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2020-01-01 20:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 19:56 Wambui Karuga
2020-01-01 20:40 ` Daniel Vetter [this message]
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=20200101204031.GC3856@dvetter-linux.ger.corp.intel.com \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=wambui.karugax@gmail.com \
/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
Powered by JetHome