Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp284995rdh; Thu, 23 Nov 2023 04:08:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6EPebvv1PS1EUkA0+Jy6Tl/FdAExqC10v7hQxjvj8mzie9GbcEU2/cSjWhcCj2EMz6NQC X-Received: by 2002:a17:902:e842:b0:1cf:6945:7573 with SMTP id t2-20020a170902e84200b001cf69457573mr5395469plg.29.1700741308914; Thu, 23 Nov 2023 04:08:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700741308; cv=none; d=google.com; s=arc-20160816; b=gWGOz4kQuowAKd/P9/4h4Gxtmd+nE4+pDNe9BHUosvlScDrDiztXlhOJTFV8mUtjA3 6L8vfKII0AOqBg4OVLIrGGQ4qBkqjHZG3r9/GtcpKeOUIr/uHMy5GXImB9D0FStTWJOL /KTVB3KFSM9FqIyzSVdUKGLxYHWbd2HFSZoNGkvVAXO6ocTJbA+J2inXbZYJlXD1r9Hj sJxGo/RqpfagVhAHqEpS6/b76gkHwEWvM+SAzndrwmCf4ha2ELnIh6A8aw9zBmonp5X1 L/nTK54ZDYiMm0g4FhtcHXMv/ok1b+Vtk2BWQkorN+q6ZeZOev2DSupXuDttEFfFhS5P nKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PaRhRaJkWJKXngTv6njtzAikrYv5uSmXPtXdBrqYaQk=; fh=L0mtDxzbexvY93/TXVDPqRiMSUezBOF86XyL0RxKhcM=; b=PzDhog/u15JVGMYIC8X3bmYn0S/qjyLUUKWyZ35xB0yNrD4aaDhxhT77ZAdpO0JW61 paJBNklf7cJrZ0Eca36Qzjsip7mNZMtlwrT4gNAv+tBO2sDpA1Vw98Q2v6/AoLNgzjAC 2+v2C5NlVamExV6xCzoHcTlOAHQj7buYeOoum2w5Eb3tQyLwm89Oj3dXg+TQRPAoImJ0 A3WvUECoaaBTHfUTBd9on/j4QXXjeF6hmOFASmISv3ZUfm+HLd/LOdzmJ64AMT6lr+B5 2/vM+orplMYpzF1TiJ+VH3Q95vkSSUdwNJS13kV+NpNyKbLIXi6Wglhc4YPxk9aKPnnd XaVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n10-20020a170902d2ca00b001ce5ba7b228si1041815plc.528.2023.11.23.04.08.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:08:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1F874816EFD5; Thu, 23 Nov 2023 04:07:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345259AbjKWMGg (ORCPT + 99 others); Thu, 23 Nov 2023 07:06:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345237AbjKWMG3 (ORCPT ); Thu, 23 Nov 2023 07:06:29 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C650D5C for ; Thu, 23 Nov 2023 04:06:35 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 842941063; Thu, 23 Nov 2023 04:07:21 -0800 (PST) Received: from e127643.arm.com (unknown [10.57.3.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 830F53F7A6; Thu, 23 Nov 2023 04:06:33 -0800 (PST) From: James Clark To: coresight@lists.linaro.org, suzuki.poulose@arm.com Cc: James Clark , Mike Leach , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 4/4] coresight: Make current W=1 warnings default Date: Thu, 23 Nov 2023 12:04:59 +0000 Message-Id: <20231123120459.287578-5-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231123120459.287578-1-james.clark@arm.com> References: <20231123120459.287578-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 04:07:00 -0800 (PST) Similarly to drivers/gpu/drm/amd/amdgpu/Makefile and fs/btrfs/Makefile, copy the current set of W=1 warnings from Makefile.extrawarn to the coresight makefile to make them default. Unfortunately there is no easy way to do this without copying. In addition to the default set of warnings, add -Wno-sign-compare to disable that warning. That's because Makefile.extrawarn does some extra steps to disable some -Wextra warnings unless W=2 or W=3 are used. That's the only one that's needed for Coresight, so disable it. Signed-off-by: James Clark --- drivers/hwtracing/coresight/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile index 995d3b2c76df..4ba478211b31 100644 --- a/drivers/hwtracing/coresight/Makefile +++ b/drivers/hwtracing/coresight/Makefile @@ -2,6 +2,26 @@ # # Makefile for CoreSight drivers. # + +# Current W=1 warnings +subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter +subdir-ccflags-y += -Wmissing-declarations +subdir-ccflags-y += -Wmissing-format-attribute +subdir-ccflags-y += -Wmissing-prototypes +subdir-ccflags-y += -Wold-style-definition +subdir-ccflags-y += -Wmissing-include-dirs +subdir-ccflags-y += -Wno-sign-compare +condflags := \ + $(call cc-option, -Wrestrict) \ + $(call cc-option, -Wunused-but-set-variable) \ + $(call cc-option, -Wunused-const-variable) \ + $(call cc-option, -Wpacked-not-aligned) \ + $(call cc-option, -Wformat-overflow) \ + $(call cc-option, -Wformat-truncation) \ + $(call cc-option, -Wstringop-overflow) \ + $(call cc-option, -Wstringop-truncation) +subdir-ccflags-y += $(condflags) + obj-$(CONFIG_CORESIGHT) += coresight.o coresight-y := coresight-core.o coresight-etm-perf.o coresight-platform.o \ coresight-sysfs.o coresight-syscfg.o coresight-config.o \ -- 2.34.1