1. 13 11月, 2016 1 次提交
    • J
      drm/sun4i: constify component_ops structures · dfeb693d
      Julia Lawall 提交于
      These component_ops structures are only used as the second argument to
      component_add and component_del, which are declared as const, so the
      structures can be declared as const as well.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      
      static struct component_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      expression e1;
      position p;
      @@
      
      component_add(e1,&i@p)
      
      @ok2@
      identifier r.i;
      expression e1;
      position p;
      @@
      
      component_del(e1, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      struct component_ops e;
      @@
      
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      
      static
      +const
       struct component_ops i = { ... };
      // </smpl>
      
      The result of the size command before the change is (arm):
      
         text       data         bss     dec      hex filename
         5266        236           8    5510     1586 sun4i_backend.o
         6393        236           8    6637     19ed sun4i_tcon.o
         3700        368           8    4076      fec sun4i_tv.o
         1668        108           0    1776      6f0 sun6i_drc.o
      
      and after the change:
      
         text       data         bss     dec     hex filename
         5274        228           8    5510    1586 sun4i_backend.o
         6401        228           8    6637    19ed sun4i_tcon.o
         3708        360           8    4076     fec sun4i_tv.o
         1676        100           0    1776     6f0 sun6i_drc.o
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1478971198-3659-1-git-send-email-Julia.Lawall@lip6.fr
      dfeb693d
  2. 22 9月, 2016 1 次提交
  3. 19 9月, 2016 1 次提交
  4. 08 9月, 2016 2 次提交
  5. 30 5月, 2016 1 次提交
    • A
      drm: sun4i: print DMA address correctly · f1b78f0e
      Arnd Bergmann 提交于
      The newly added sun4i drm driver prints a dma address using the %x
      format string, which cannot work when dma_addr_t is 64 bit,
      and gcc warns about this configuration:
      
      drm/sun4i/sun4i_backend.c: In function 'sun4i_backend_update_layer_buffer':
      drm/sun4i/sun4i_backend.c:193:84: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
        DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr);
      drm/sun4i/sun4i_backend.c:201:84: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
        DRM_DEBUG_DRIVER("Setting buffer address to 0x%x\n", paddr);
      
      This changes the code to use the explicit %pad format string, which
      always prints the right length.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      f1b78f0e
  6. 28 4月, 2016 1 次提交