From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 948FE262FF8 for ; Mon, 28 Apr 2025 11:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745838612; cv=none; b=Ov0fwwCfhRp1xd1AXuYTjSDEsXAjTNcAJ3Y7TgCrs6KU/PanZFaWBF8Ut9FGkJ/t+IfeU3H5vTXPD88S09u7Xo+AK0UhwWaNakoNCKqWq+wtxCnRUOYfL1NfX1VKLkbiBA4CPweVYT2gCbulQsE8YomFBblDAsYMIw2h55QefQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745838612; c=relaxed/simple; bh=A9Okykt1CO9Gdzyw8Gz9j8J09jGfp2GgOobllD66Xws=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IU3E9uNwBLML+ECib+BNor5cBA9rEBf07UWAs1BEto0/ERZh27NkyK+YaUlcIDd/F25WMMdMo6fz+0szcmTXE1bgA1IqnPBNybn4eTIooUpBYyDuJqJhsI6duANaDP8Bel3kFZm3mDnq/6rk76zHQ2byCjbsOrn3PS9sHbHtR1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 0A2F11595; Mon, 28 Apr 2025 04:10:02 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1AB783F673; Mon, 28 Apr 2025 04:10:08 -0700 (PDT) Date: Mon, 28 Apr 2025 12:10:03 +0100 From: Leo Yan To: Ian Rogers Cc: Namhyung Kim , Yury Norov , Rasmus Villemoes , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Thomas Gleixner , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= Almeida , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Yicong Yang , Jonathan Cameron , Nathan Chancellor , Bill Wendling , Justin Stitt , Josh Poimboeuf , Al Viro , Kyle Meyer , Ben Gainey , Athira Rajeev , Kajol Jain , Aditya Gupta , Eder Zulian , Dapeng Mi , Kuan-Wei Chiu , He Zhe , Dirk Gouders , Brian Geffon , Ravi Bangoria , Howard Chu , Charlie Jenkins , Colin Ian King , Dominique Martinet , Jann Horn , Masahiro Yamada , Arnd Bergmann , Yang Jihong , Dmitry Vyukov , Andi Kleen , Graham Woodward , Ilkka Koskinen , Anshuman Khandual , Zhongqiu Han , Hao Ge , Tengda Wu , Gabriele Monaco , Chun-Tse Shao , Casey Chen , "Dr. David Alan Gilbert" , Li Huafei , "Steinar H. Gunderson" , Levi Yun , Weilin Wang , Thomas Falcon , Thomas Richter , Andrew Kreimer , Krzysztof =?utf-8?Q?=C5=81opatowski?= , Christophe Leroy , Jean-Philippe Romain , Junhao He , "Masami Hiramatsu (Google)" , Xu Yang , Steve Clevenger , Zixian Cai , Stephen Brennan , Yujie Liu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH v1 09/48] perf tests: Silence -Wshorten-64-to-32 warnings Message-ID: <20250428111003.GC551819@e132581.arm.com> References: <20250401182347.3422199-1-irogers@google.com> <20250401182347.3422199-10-irogers@google.com> <20250402143541.GM115840@e132581.arm.com> <20250402163807.GP115840@e132581.arm.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Namhyung, Ian, On Thu, Apr 03, 2025 at 08:20:02AM -0700, Ian Rogers wrote: [...] > > > Anyway, I don't have time to do such a larger refactor so > > > somebody else is going to need to pick that up. I did refactor the > > > cases where I thought it mattered more, but as you say that does lead > > > to a feeling of inconsistency in the series. > > > > I'm curious there are any actual errorenous cases other than the return > > type of comparisons from Leo. I am just wandering if we could give priority for errorenous cases. Could you send fixes for these cases firstly and leave out refactoring for later merging? [...] > There are lots of cases like: > ``` > case ARM_SPE_COUNTER: > if (idx == SPE_CNT_PKT_HDR_INDEX_TOTAL_LAT) > - decoder->record.latency = payload; > + decoder->record.latency = (u32)payload; This would be fine. Since Arm SPE implements a counter with a maximum of 16 bits, there will never be an overflow when storing the data in a 32-bit unsigned integer. Thanks, Leo