Patch "drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-msm-a6xx-use-__unused__-to-fix-compiler-warnings.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5a12ef09cbd1c102a4cfb032eb71d6391be9d162
Author: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
Date:   Wed Jun 5 11:34:15 2024 -0700

    drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes
    
    [ Upstream commit 71d9b458b2bfe79197194d914aa9bada46fb9e14 ]
    
    GCC diagnostic pragma method throws below warnings in some of the versions
    
    drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:16:9: warning: unknown
    option after '#pragma GCC diagnostic' kind [-Wpragmas]
      #pragma GCC diagnostic ignored "-Wunused-const-variable"
              ^
    In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:18:0:
    drivers/gpu/drm/msm/adreno/adreno_gen7_0_0_snapshot.h:924:19: warning:
    'gen7_0_0_external_core_regs' defined but not used [-Wunused-variable]
      static const u32 *gen7_0_0_external_core_regs[] = {
                        ^
    In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:19:0:
    drivers/gpu/drm/msm/adreno/adreno_gen7_2_0_snapshot.h:748:19: warning:
    'gen7_2_0_external_core_regs' defined but not used [-Wunused-variable]
      static const u32 *gen7_2_0_external_core_regs[] = {
                        ^
    In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:20:0:
    drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1188:43: warning:
    'gen7_9_0_sptp_clusters' defined but not used [-Wunused-variable]
      static struct gen7_sptp_cluster_registers gen7_9_0_sptp_clusters[] = {
                                                ^
    drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1438:19: warning:
    'gen7_9_0_external_core_regs' defined but not used [-Wunused-variable]
      static const u32 *gen7_9_0_external_core_regs[] = {
    
    Remove GCC version dependency by using __unused__ for the unused gen7_* includes.
    
    Changes in v2:
            - Fix the warnings in the commit text
            - Use __attribute((__unused__)) instead of local assignment
    
    changes in v3:
            - drop the Link from the auto add
    
    changes in v4:
            - replace __attribute((__unused__)) with __always_unused
    
    Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
    Suggested-by: Rob Clark <robdclark@xxxxxxxxxxxx>
    Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/597265/
    [Add gen7_9_0_cx_debugbus_blocks as well]
    Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index 0a7717a4fc2fd..789a11416f7a4 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -8,19 +8,16 @@
 #include "a6xx_gpu_state.h"
 #include "a6xx_gmu.xml.h"
 
-/* Ignore diagnostics about register tables that we aren't using yet. We don't
- * want to modify these headers too much from their original source.
- */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-const-variable"
+static const unsigned int *gen7_0_0_external_core_regs[] __always_unused;
+static const unsigned int *gen7_2_0_external_core_regs[] __always_unused;
+static const unsigned int *gen7_9_0_external_core_regs[] __always_unused;
+static struct gen7_sptp_cluster_registers gen7_9_0_sptp_clusters[] __always_unused;
+static const u32 gen7_9_0_cx_debugbus_blocks[] __always_unused;
 
 #include "adreno_gen7_0_0_snapshot.h"
 #include "adreno_gen7_2_0_snapshot.h"
 #include "adreno_gen7_9_0_snapshot.h"
 
-#pragma GCC diagnostic pop
-
 struct a6xx_gpu_state_obj {
 	const void *handle;
 	u32 *data;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux