Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575821

Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel

From Maxime Ripard <maxime.ripard@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel
Date 2017-02-07 17:00 +0100
Message-ID <t8gls-4NN-23@gated-at.bofh.it> (permalink)
References <t6IOR-8nh-1@gated-at.bofh.it> <t6IYy-dX-35@gated-at.bofh.it> <t7RwJ-5sW-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-03 11:00 +0100
  [PATCH v3 2/2] ARM: sun8i: dt: Add mali node Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-03 11:00 +0100
  [PATCH v3 1/2] dt-bindings: gpu: Add Mali Utgard bindings Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-03 11:10 +0100
  [PATCH 1/2] dt-bindings: display: panel: Add bindings for the Sitronix ST7789V panel Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-03 11:10 +0100
    Re: [PATCH 1/2] dt-bindings: display: panel: Add bindings for the  Sitronix ST7789V panel Thierry Reding <thierry.reding@gmail.com> - 2017-02-06 14:10 +0100
      Re: [PATCH 1/2] dt-bindings: display: panel: Add bindings for the  Sitronix ST7789V panel Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-07 16:50 +0100
        Re: [PATCH 1/2] dt-bindings: display: panel: Add bindings for the  Sitronix ST7789V panel Thierry Reding <thierry.reding@gmail.com> - 2017-02-07 17:50 +0100
  [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-03 11:10 +0100
    Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Noralf Trønnes <noralf@tronnes.org> - 2017-02-03 20:00 +0100
      Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-06 12:00 +0100
        Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Noralf Trønnes <noralf@tronnes.org> - 2017-02-06 13:20 +0100
          Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Thierry Reding <thierry.reding@gmail.com> - 2017-02-06 13:30 +0100
    Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Thierry Reding <thierry.reding@gmail.com> - 2017-02-06 14:30 +0100
      Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-07 17:00 +0100
  Re: [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Noralf Trønnes <noralf@tronnes.org> - 2017-02-03 19:50 +0100
    Re: [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-06 11:40 +0100
      Re: [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Noralf Trønnes <noralf@tronnes.org> - 2017-02-06 12:30 +0100
        Re: [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-07 16:40 +0100
          Re: [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Thierry Reding <thierry.reding@gmail.com> - 2017-02-07 17:50 +0100

csiph-web