From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel
Date: Tue, 7 Feb 2017 16:53:34 +0100 [thread overview]
Message-ID: <20170207155334.fq4emlhpj4hkhets@lukather> (raw)
In-Reply-To: <20170206132620.GB28955-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Mon, Feb 06, 2017 at 02:26:20PM +0100, Thierry Reding wrote:
> > +#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__}) / sizeof(int))
> > +#define st7789v_send(ctx, cmd, ...) \
> > + st7789v_write_command_data(ctx, cmd, NUMARGS(__VA_ARGS__), \
> > + ##__VA_ARGS__)
>
> How is this going to work if any of the arguments happens to not be an
> int? What if you have something like this:
>
> u8 value = 0x2;
>
> st7789v_write_command_data(ctx, cmd, 0x1, value, 0x3);
>
> ? Wouldn't that invalidly read "value" as int and wrongly increment the
> ap by three bytes too many?
Hmmm, it might be. I'll remove it, and take all your other changes
into account.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2017-02-07 15:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 9:59 [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Maxime Ripard
2017-02-03 9:59 ` [PATCH 1/2] dt-bindings: display: panel: Add bindings for the Sitronix ST7789V panel Maxime Ripard
[not found] ` <097eb2ad92f68f0f1a7c035c9b6b094afaf34dc1.1486115846.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-02-06 13:05 ` Thierry Reding
2017-02-07 15:44 ` Maxime Ripard
2017-02-07 16:42 ` Thierry Reding
2017-02-03 9:59 ` [PATCH 2/2] drm/panel: Add driver for sitronix " Maxime Ripard
2017-02-03 18:53 ` Noralf Trønnes
2017-02-06 10:50 ` Maxime Ripard
2017-02-06 12:13 ` Noralf Trønnes
[not found] ` <8096d309-d341-a3ba-8ddb-096a13967f64-L59+Z2yzLopAfugRpC6u6w@public.gmane.org>
2017-02-06 12:25 ` Thierry Reding
2017-02-06 13:26 ` Thierry Reding
[not found] ` <20170206132620.GB28955-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2017-02-07 15:53 ` Maxime Ripard [this message]
[not found] ` <cover.d573d2c400f1a8ef8d2696fda74f3e860bff50ca.1486115846.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-02-03 18:48 ` [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Noralf Trønnes
2017-02-06 10:39 ` Maxime Ripard
2017-02-06 11:29 ` Noralf Trønnes
2017-02-07 15:34 ` Maxime Ripard
2017-02-07 16:46 ` Thierry Reding
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=20170207155334.fq4emlhpj4hkhets@lukather \
--to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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