Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2640235rdh; Mon, 30 Oct 2023 03:30:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkmLJDm80zqXAaZSqa5YgVk3DGWl/eU5M9dF8rfHSUXw/z+AJpkgi5Y6ykv/bTPpV/Gvm3 X-Received: by 2002:a05:6a20:a489:b0:171:4f38:b475 with SMTP id y9-20020a056a20a48900b001714f38b475mr6090408pzk.58.1698661841211; Mon, 30 Oct 2023 03:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698661841; cv=none; d=google.com; s=arc-20160816; b=Bkt/nZaOFq0dEDPmoNMnsuAGPg24ssFpT6tBC9qy0BuViLnQNf9/yJvGT6s1Ov5e60 nao5813KWZfOS7q/yX4ZhtFHaolGCZJvE86TXeuwnlEYS+3YE5EWnjYpkTP5bzI+xKBf /7u551K9N1LvKqHwsDzv0v6nyP8PQpEQMB7zg0E3LNg+H788ZVSyhJNP54SnDt6Ymg+r uV2xJiMgP6tY2aREk8AeU1avYbizOXVLRCs9zdmL4XKh798NK58LTD0aRzTlB/Gms6UT MIYBPBeFVjbujHSWpK+W0osZYGLc7cw60l+W3DA46B0vYH10x7ONZgUT9CffU5qT6qno pwoA== 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 :message-id:date:subject:cc:to:from; bh=r4vXmuQ0D2xLwBK6Q7lLg0yZM4HcZt5xVc4bgqK+qac=; fh=DhEJu1A4Q5tzA5TTtpJQs2CDF8RS3SjvKH8W+a6S/yY=; b=uw5bYAGMEW02I95nq555Iy4UjTpk3TKoaSuqd2NkSNNQawxiWP0YVVWkVyQzNpxquT HV825ftt4DpotiNFc7kwqBvoWPGMV2KUIkJFdy3Ja5uj7Gg4IX7BZrPqqoC5IkcLMvWd 16veiT0tdbuWskeeo7ck+8/6gQ5J0QDa1T8i22UnwO3qYC5rh4esF9Hi9xwuPG3mZ8kN le2n5qd29f14M8y698E7TT8JzVoMXzDe9Oifkizh1LAz4sOgv/amR85jMtxbaAnw+42b PqDAK1MAo1mvqoNA0zu3X1msVGcJpAGJR1zhvbZCShykI+MtF/NeqG6nd8XAVuiW2zVO AZhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q19-20020a170902f35300b001c9b3c3ce7asi4672867ple.300.2023.10.30.03.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 03:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 53CBE8063D61; Mon, 30 Oct 2023 03:30:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232929AbjJ3KaQ (ORCPT + 99 others); Mon, 30 Oct 2023 06:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbjJ3KaK (ORCPT ); Mon, 30 Oct 2023 06:30:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C4EB6DA; Mon, 30 Oct 2023 03:29:59 -0700 (PDT) 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 15EABFEC; Mon, 30 Oct 2023 03:30:40 -0700 (PDT) Received: from e127643.broadband (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BC5613F67D; Mon, 30 Oct 2023 03:29:56 -0700 (PDT) From: James Clark To: coresight@lists.linaro.org, suzuki.poulose@arm.com, anshuman.khandual@arm.com Cc: James Clark , stable@vger.kernel.org, Mike Leach , Alexander Shishkin , Mathieu Poirier , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] coresight: etm4x: Fix width of CCITMIN field Date: Mon, 30 Oct 2023 10:29:40 +0000 Message-Id: <20231030102940.115078-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 30 Oct 2023 03:30:34 -0700 (PDT) CCITMIN is a 12 bit field and doesn't fit in a u8, so extend it to u16. This probably wasn't an issue previously because values higher than 255 never occurred. But since commit 0f55b43dedcd ("coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus"), a comparison with 256 was done to enable the errata, generating the following W=1 build error: coresight-etm4x-core.c:1188:24: error: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (drvdata->ccitmin == 256) Cc: stable@vger.kernel.org Fixes: 54ff892b76c6 ("coresight: etm4x: splitting struct etmv4_drvdata") Signed-off-by: James Clark --- drivers/hwtracing/coresight/coresight-etm4x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 20e2e4cb7614..da17b6c49b0f 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -1036,7 +1036,7 @@ struct etmv4_drvdata { u8 ctxid_size; u8 vmid_size; u8 ccsize; - u8 ccitmin; + u16 ccitmin; u8 s_ex_level; u8 ns_ex_level; u8 q_support; -- 2.34.1