pan/decode: Remove SHORT_SLIDE indirection
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 24 Jan 2020 13:25:08 +0000 (08:25 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Jan 2020 18:53:31 +0000 (18:53 +0000)
../src/panfrost/pandecode/decode.c: In function ‘pandecode_compute_fbd’:
../src/panfrost/pandecode/decode.c:789:35: warning: taking address of packed member of ‘struct mali_compute_fbd’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  789 |         pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num))
      |                                  ~^~~~~~~~~
../src/panfrost/pandecode/decode.c:800:9: note: in expansion of macro ‘SHORT_SLIDE’
  800 |         SHORT_SLIDE(1);
      |         ^~~~~~~~~~~

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3543>

src/panfrost/pandecode/decode.c

index 80ac64440f5085e02043d239232d5f7bb5817f53..74a123b2897a2a19794270bcb77a91db943a3fef 100644 (file)
@@ -774,20 +774,6 @@ pandecode_sfbd(uint64_t gpu_va, int job_no, bool is_fragment, unsigned gpu_id)
         return info;
 }
 
-static void
-pandecode_u32_slide(unsigned name, const u32 *slide, unsigned count)
-{
-        pandecode_log(".unknown%d = {", name);
-
-        for (int i = 0; i < count; ++i)
-                pandecode_log_cont("%X, ", slide[i]);
-
-        pandecode_log("},\n");
-}
-
-#define SHORT_SLIDE(num) \
-        pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num))
-
 static void
 pandecode_compute_fbd(uint64_t gpu_va, int job_no)
 {
@@ -797,7 +783,12 @@ pandecode_compute_fbd(uint64_t gpu_va, int job_no)
         pandecode_log("struct mali_compute_fbd framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
         pandecode_indent++;
 
-        SHORT_SLIDE(1);
+        pandecode_log(".unknown1 = {");
+
+        for (int i = 0; i < ARRAY_SIZE(s->unknown1); ++i)
+                pandecode_log_cont("%X, ", s->unknown1[i]);
+
+        pandecode_log("},\n");
 
         pandecode_indent--;
         pandecode_log_cont("},\n");