Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp250805rdb; Thu, 2 Nov 2023 02:35:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1ENjC+0F1UMiIsE/7k/fukPrJOcI1aM+mgo+SyXzhJ7ZHejJnEa0TUQXL8F7N93v/qw0v X-Received: by 2002:a05:6a00:1d99:b0:690:9a5a:e34e with SMTP id z25-20020a056a001d9900b006909a5ae34emr8299799pfw.12.1698917756618; Thu, 02 Nov 2023 02:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698917756; cv=none; d=google.com; s=arc-20160816; b=EJznH+hlq51/Q5Wbc6Z/BJjTH46wBOiziBhVeVUQtT7te9AvbGnoI1le+pcs85tmB/ 98PuaitsJcFlyIn1O+Y6XRIC+icFiD3zn4jUONiN0jDxLghTOHGDj/nW34S4Hz6e7gVo UQJYBdgyNK7nDXprC8/STZOBy4GiHahpFlKA7YcfiocvU87h4tRAg0XqcHSoTJMMwmzR lmpvF2CSrxbpQQBcni4L1iEctNF67gDtMI0D4Dj6bRbOlVREkcjWdS4yKn7+Gv8ASVJa nBvHxp3NYmdH1NpxhRtMIFTiPTOITi6wjZ6D0Lr1GO4oXStllvVzrfTzTZhMhGZDJUCg D0nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=xQWhxFZIPdsVz1nQo7rLBMebwRo29Udnwfx1k4MxK8w=; fh=/PbTZnxTnnLqQaXGUi7AymsR+7VVplLAi+ZUEGAx3Lk=; b=vSTyj6RfWu9aS3telkDRaj3jYYpMkQt9ONdOv5M4DviZGb6T9zBLi9vA0YTb+l+fVp 0opXQmFRU6NphtNt8mvMLMCkBEPOkFAxCPViqIXHctV4rrO1TOpeUeIvJy/vbYdIC3HR VtaBH98Dp9my1rAAjJcqStCQ4V8oibxAqXyd1UGW5BSz2yihxPg45uqDl7LnTk97VUrC 8qUJKTFbOkLUn/KIpNgXQwpXlAKPXtEj7hhFvJhycLdawM6LflWlrgnPNwLe8cIgVA/3 ug/A27ZZR/7OWWR1nasb5X/fu0H/4ET0yMCryTNA34wHoLMLYc+QbHiLr9LSQ6n7bYrZ Dvug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k14-20020a056a00134e00b006bd27e41c17si3337950pfu.314.2023.11.02.02.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:35:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id E46CB80842D3; Thu, 2 Nov 2023 02:35:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345524AbjKBJf2 (ORCPT + 99 others); Thu, 2 Nov 2023 05:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjKBJf0 (ORCPT ); Thu, 2 Nov 2023 05:35:26 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E943133; Thu, 2 Nov 2023 02:35:21 -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 1D9E12F4; Thu, 2 Nov 2023 02:36:03 -0700 (PDT) Received: from [10.57.70.106] (unknown [10.57.70.106]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 98A813F67D; Thu, 2 Nov 2023 02:35:19 -0700 (PDT) Message-ID: Date: Thu, 2 Nov 2023 09:35:18 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] coresight: etm4x: Fix width of CCITMIN field Content-Language: en-US To: Anshuman Khandual , coresight@lists.linaro.org, suzuki.poulose@arm.com Cc: stable@vger.kernel.org, Mike Leach , Alexander Shishkin , Mathieu Poirier , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231030102940.115078-1-james.clark@arm.com> From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 02:35:37 -0700 (PDT) On 02/11/2023 04:14, Anshuman Khandual wrote: > > > On 10/30/23 15:59, James Clark wrote: >> 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; > > Thanks James, so this takes care of the Smatch static checker > warning as reported by Dan Carpenter earlier. > I didn't see that report, but it was in "[linux-next:master] BUILD REGRESSION c503e3eec382ac708ee7adf874add37b77c5d312" > Reviewed-by: Anshuman Khandual