Received: by 2002:ab2:6046:0:b0:1fb:d597:ff75 with SMTP id a6csp2885lqm; Tue, 4 Jun 2024 17:39:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZH7V5EG7jsc08G6Lra/jCFNiuzJSmeEg1UyQXz49CglV1o4QPNQgwLIXRuK+hKnsPUS7/JYhxzdLHKAHqRj78mt0VZprkm9yQKiqWOA== X-Google-Smtp-Source: AGHT+IGPtKCybwDsTzEhCAwpRjzJI8AzR55+RcWm1TLc3HoEezHadvxVUfxompRKmqUpZv7bnE4t X-Received: by 2002:a17:906:c45a:b0:a68:b557:5f8e with SMTP id a640c23a62f3a-a699fac5cfamr51650266b.42.1717547951656; Tue, 04 Jun 2024 17:39:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717547951; cv=pass; d=google.com; s=arc-20160816; b=M9vGTukAJ01Ds+LJ2Tss84pcU708U+OHvPncnTIwGL+0PXmqdsdJUKRKFG02S+xf0b +m7nMG6TWAv2vjR7RCaUCQq36ENniYmLZn/3qgGevi5/QhNpx5GnVhL03rSfrOkafMgX QCCGuDGAN0hFs57MP+EZ6Qy3vbVUOdolseccdDBbcLeG5VQhjrXGfPcBQ7JlA5XNwRw6 gLEJUoSn70klnOc/phoX8zUft7bRe0WpLmmJLo0vlJCBKxGcX6H2s5LLdh1C71KmfEPw GWf6hyNT9BH8+XqgN6o1w7MIepKAJK6WMmcLa2nsYUCWQNtmlU9muqv036qklNhyqtpt 8Keg== 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=7J5zgdpsPhcHsRBPwiKeIrIwy90pClK1sMRAZtF5i8c=; fh=laZk44jytjdAv6PFyyXX5qdCvvBPUJpIX7cYNzQ8tXY=; b=AO+3FwOrKNL544Tsf7jsImu/eFqgt1ssiF/tCTpe2oc6s5ubfLgvUAjlL47b0AAUVz Rv1f2lhMNVt39ZqFY+nXYXcAar6hk1xvkGoz9AMfF9ZeSswF0iKLwVokStQnzqf6NeS4 G0RZQ/qAR+dWGUomC6JtvVrOzyVRk+4IcUdNt8ukil/o7+CxuocVds6byzXY4R4Bs8xe +13RPlpFpZYOfg5/ZZcMo85PMnenPLFXA6+b0hjckcUwSnfz3Shvka9Jp7Mb1LMHkZXZ jAkUGvcOlnfA5+fa75NlYygGWICUtcBM4CgBhGArlMcFxs1q9KBQ1NOiQO/zc+qj5R5q 0E/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XpGACfJL; 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-201625-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201625-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 a640c23a62f3a-a68b3ff90d5si413089266b.1052.2024.06.04.17.39.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:39:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201625-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=XpGACfJL; 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-201625-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201625-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 381321F232F8 for ; Wed, 5 Jun 2024 00:39:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B46892F43; Wed, 5 Jun 2024 00:39:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="XpGACfJL" 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 2D1DE323D; Wed, 5 Jun 2024 00:38:59 +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=1717547941; cv=none; b=S+sKhXQpOksxbQXB1Fe3Xhc7IN4Ua0WAkyinQ5Zvecp/FeEAA4nu6+dV+pswCWdiufXKA9+k5s/LvRg50X1xpxraGdTjWvQ9uBlS35bJPTeZSgZHtG8q6Kj3m3ijJh/8H7BgTQ/9/52W37Ns7sw142BqVC3I3Mmvna9X56i0NV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547941; c=relaxed/simple; bh=EXUEIRS9624hyKCJA7psottKLEzIfA5p+GtERCtockY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JdnAwTl0/lcL6ENQCIHH3AbFFC/+h4qohzYK5inOU99G3dl2LCrJqGLzONC15sVuGk5TwO72LsE2hwEK6dMYZiKev9XAv75h0jCfnwfI0AmS9tPxqS2ye8AdS4xGvvW10AZ3q3iLmQAzjcnMTonEHa8/q+1+whkYGQ0zoDYLg5Y= 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=XpGACfJL; 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 454Gr94l009519; Wed, 5 Jun 2024 00:38:41 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=7J5zgdpsPhcHsRBPwiKeIr Iwy90pClK1sMRAZtF5i8c=; b=XpGACfJL8dw1gfqpUc15HcKPRlQc82mJMafLuG N7lZimNGV9hy62cVcem4Y9i8+yYr5ATPMCBRBm7IQT57AGRLYwtqzrDkvh+C8TR5 lguyMCnCyhgTO5OgH7Nxj6o4qHZkghdZWv+uBWrpHSEQ4rR9cFpToR7PXwkeyHdE AoPIlaj5i9eE+DOdZnojVPV6PqUx6FtzXUu+UqVdGimKKXlGdCy43+z6F8PIrl13 dmLCiWOEDAT5TuSSPdZgKC5lMEVLSkHa2xseX81vOhFNVUOt8xE3+H17gkDK37Z9 dtgFIHlK80em3NQ02nfyLao5rs2yN8VIDm7JoUe6A3cgjO+g== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yj6u78vk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 00:38:41 +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 4550cd5v029253 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 5 Jun 2024 00:38:39 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 17:38:39 -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 v3] drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes Date: Tue, 4 Jun 2024 17:38:28 -0700 Message-ID: <20240605003829.4120343-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: P4jDMhdz7djqjMN0AG4NOkxt5dpiqjL2 X-Proofpoint-GUID: P4jDMhdz7djqjMN0AG4NOkxt5dpiqjL2 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=1015 malwarescore=0 adultscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406050002 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 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 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 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..a958e2b3c025 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -8,19 +8,15 @@ #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[] __attribute((__unused__)); +static const unsigned int *gen7_2_0_external_core_regs[] __attribute((__unused__)); +static const unsigned int *gen7_9_0_external_core_regs[] __attribute((__unused__)); +static struct gen7_sptp_cluster_registers gen7_9_0_sptp_clusters[] __attribute((__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; -- 2.44.0