Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp391851lqb; Tue, 4 Jun 2024 14:51:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5Lls3RRsp0A9LgeY+pgh2ZBsO+876pigy7RTOcIWTIByAXbuQG4dHsbqlb1GB2c3Tgd7K5I3jlNA6Lrx+3kJx2l0gQQAjHZ0k0Jy/EA== X-Google-Smtp-Source: AGHT+IESrEO7eW0GNl+ayqYq0PP8oBYRTXpaTA4IHu6T4XNdyNpOj1iM7KSkAJ+vL+d+AcThM4wK X-Received: by 2002:a50:8a92:0:b0:578:67db:7516 with SMTP id 4fb4d7f45d1cf-57a8bcb5db5mr518612a12.37.1717537902358; Tue, 04 Jun 2024 14:51:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717537902; cv=pass; d=google.com; s=arc-20160816; b=i8lSxiQmMQGYFLEDgV2ul6X1L47V+PPTwX8tLn7d1G4fd2utyy3jT7RTCZ1JsyxCHP 9BItPqyoryRvfgdSN3lpCkHv8eugaQQrPgiQ6DhbHombzenGmuDzQdSZ2s+gkNM7GZiA JIBvuHPnh5S2T+2GBjRIp4R10NehOhGBx6A7qprnUBasR1LRYCqCak3p3z+NIzIiBCn+ 66BiG5VfITHvWi3230dOjDnmac1G1Ayl8606U2aGmJyWtJq+BYHD+8YP7FRj5BIRQ/N9 G6VVYxRjcwBWqCeWoj/hXxMbTm8YHLoq4gPbXTnqu2UFVzNJ3sK9NscaafBuhzf8/JwB 1jfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YLq+m/pw8D/FB1z2FxCUtvUa9O85tXqCcv0sNFbrjkc=; fh=laZk44jytjdAv6PFyyXX5qdCvvBPUJpIX7cYNzQ8tXY=; b=WdBc334dEJKTnYWlg+gsZ7K7uPbgSw8N0SEzU9dS/kCkYVoA5RIyrTgrgy/Rf+FbQr B7/Q7ff8lHeJh8w8hJbMKEcXQW5sh1eLMu5JKz/mXKfMAzNloY8M/OKjoTenxUta/FIc OUmJdqfSUMS0pIW5LHWu9PmaOw+P+d76YNkJ/+DDc+NURIvf3vJcXyDffGeinDu8EjKn 4XIbPEeIhDPCg5CXoQ2fXVRxnWP8n5Y8XrGOzJkSvPyeNQoYmqYWd5E5RnlPskATZ9Nt NVI5IoB7vzWu+trrbynf4+4U65Hn0wqW06ysq0vwFPjSNhrJ4bNnplDl/YwgY24NmKP/ c7eA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="AJq/IzHv"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-201428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c75ac1si5382586a12.364.2024.06.04.14.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 14:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="AJq/IzHv"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-201428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E230C1F25E4B for ; Tue, 4 Jun 2024 21:51:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7D0614C5AA; Tue, 4 Jun 2024 21:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="AJq/IzHv" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17AB313CABB; Tue, 4 Jun 2024 21:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717537893; cv=none; b=I/NxaRaS0QKXNFjrV9DF4EuZ0eTB0l+sj9FVGvIedI/l3rjsPmvgfMyanl8POFhPyZ6/fT1s/agcLP6RPbO6HjBSmr+AtTVFn/GlJ9qBJVwywFS7tdONqFx4AvseC5EAvuh51/Q+JOjw483GHd7QbTGtLp50qO304gvLVaWTwWY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717537893; c=relaxed/simple; bh=NKrVVaT2VSenG5RCbKYSlOUEbICJ7JwfxOaMfSP1uts=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gCYwoxoa2kzbMQE8Cg3UOD7MqfgRZ/uJZoNthcck4S3keHGj02oRv4t+Y9WfqOUFveg8lmpf23spDUbY2wZh4TB9SoD0S+3uxfHeQMoyzlA7FxA6x4PgSv7hRvRmtPc8T7hPMAo5AbfA45+LS2pJ7z0SGpvR0HSnYNNKz9LzhXo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=AJq/IzHv; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 454Gr0hU009373; Tue, 4 Jun 2024 21:51:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=YLq+m/pw8D/FB1z2FxCUtv Ua9O85tXqCcv0sNFbrjkc=; b=AJq/IzHvYdlut9OFfNu0bXOuLwdixNBghCq2WB mmLZica0lyoxqZImLQhJ5IWYuX3DQuzCmpM+2HdPYX9BoXl/RhAjku4INMzvUT/W 7Q3fhKQ57sQHfWE1f/mfbhhqchQ4yOPsLsQs4LV32tkfoXttyjEmdpVlrWhDXqZ6 tQ1c14ueqx5rSg+sDFc/z02N+wS3wjs/V/ji/e4giqdovFZ28NnRcDEabFH4lqB/ 7ilpYJS9KsmngD6E0ipvxmRmuBiEkcrqUE6cNL5CZCBoayS4vYHRlPTR4FdVhTEG nWT0vmWxaCEp0MSQf+RP0/2rc7tl7VBLiKgkPtjhv3NzI66A== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yj6u78mcx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Jun 2024 21:51:22 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 454LpLqb027421 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Jun 2024 21:51:21 GMT Received: from abhinavk-linux1.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 4 Jun 2024 14:51:21 -0700 From: Abhinav Kumar To: , Rob Clark , "Sean Paul" , Konrad Dybcio , "Abhinav Kumar" , Dmitry Baryshkov , Marijn Suijten , David Airlie , "Daniel Vetter" , Connor Abbott CC: , , , Rob Clark , , Subject: [PATCH] drm/msm/a6xx: use __always_unused to fix compiler warnings for gen7_* includes Date: Tue, 4 Jun 2024 14:51:04 -0700 Message-ID: <20240604215105.4057278-1-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: YHtPMzSLTHxjnNphM8gVa4gqld3yRZp2 X-Proofpoint-GUID: YHtPMzSLTHxjnNphM8gVa4gqld3yRZp2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_11,2024-06-04_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 clxscore=1011 malwarescore=0 adultscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406040177 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__always_unused' defined but not used [-Wunused-variable] static const u32 *gen7_0_0_external_core_regs__always_unused[] = { ^ 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 dependency by using __always_unused for the unused gen7_* includes. Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx") Suggested-by: Rob Clark Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c index 0a7717a4fc2f..62ca0cf24005 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -8,19 +8,10 @@ #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" - #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; @@ -1350,6 +1341,10 @@ static void a7xx_get_registers(struct msm_gpu *gpu, int index = 0; const u32 *pre_crashdumper_regs; const struct gen7_reg_list *reglist; + __always_unused const u32 **external_core_regs7_0_0 = gen7_0_0_external_core_regs; + __always_unused const u32 **external_core_regs_7_2_0 = gen7_2_0_external_core_regs; + __always_unused const u32 **external_core_regs_7_9_0 = gen7_9_0_external_core_regs; + __always_unused struct gen7_sptp_cluster_registers *sptp_gen7 = gen7_9_0_sptp_clusters; if (adreno_is_a730(adreno_gpu)) { reglist = gen7_0_0_reg_list; -- 2.44.0