From nobody Sun Feb 8 09:40:57 2026 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 965B821324D for ; Tue, 1 Apr 2025 18:24:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743531885; cv=none; b=XCB0SGb3siAgV3X/Aw2i5humIqJbVE6kF1DoC5ttAYiHaCMfVKl5auexAUDi2+VHtgglmoBf2Pi4DOsgnqtpV51BVIsZ8SRQ+oT93d+AE8bTj/765uI/WJqH6NI/U7IuogkvtK52xXukMffNZ0ZRk3yBCc3VTgk4adex2eASkqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743531885; c=relaxed/simple; bh=nXp5NVw8ZWXmsMvB5pE9U5xeZ45CVeKd2OU9K5iWouQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=bfEcgqhdJ4Zf2Ubb+ixB7R6l1Nbot+j0Q4RNxsgp2Z0r9hODqiBvKMc2Tb/M4nKy71GVFfQZFhh9fhkY0yCy5Ak1QgKRkmd9tTaSIfDe2fuBKxScI29s2w0x1lMw2Q/Y4Ezq5g3mOOVwbclaXzm0yfPqYnBk5GXfyelTmO5YGAY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iMlrtNsR; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iMlrtNsR" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-225ab228a37so103521235ad.2 for ; Tue, 01 Apr 2025 11:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1743531883; x=1744136683; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=bVxTOI2rMy74E5I1GCMK0hz9Q6EgaUNiUbpk59hX6VA=; b=iMlrtNsRhbP1AFW8i2M0ZDfI37nDvLGUEz8dNzq9k4RNH9yM3YjdRDjRXu3TTVTU1F OKBBMjSierR8L//55YAdYPDxhaSVDy7CnbUBlT/RVSyFBJI/WdBrbwCZtDO9bXVCVC/O F4M1Rp8S0mRqXfzdcf8IKmu80iicnc+Li78M2+QyNp0G3KXslaYmnwBMCn6gMhIgTt5J F3b5kHJcfXp7sLChTHiwAHpCoTE1wi5QeaQsXYw9ziUM39DLUadZjuJmTIKTXcVYhHLF bLuSb+0SFedOnwZnoDHHZkOr5JeO56+1EJa3wzBNDbXv0MYvSBlMPrm0ykfgWmMRqSWi wlwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743531883; x=1744136683; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bVxTOI2rMy74E5I1GCMK0hz9Q6EgaUNiUbpk59hX6VA=; b=DMwZfCtgfi4OgBbkeZMcmYIyFXgSsVwWbGF4NzVBI4La+A+PgdXu1FLYUGanF78w/J EbH5hpicxTEa0JvFhT+wYbY6qcI18zZIQ6L+SKm/jgLTOUKghsjAfcb0rPOommywvHzO M1NJ4CM3KUeAAxFHOkkKN19xG2J7rlpm+ewKCNGDGF7Q5TyTND74Kkye5BJv8uUz0Myk vzUyjthphQUPPi4krrxfEaN06YN9w75FruXXOW8Clv75QmvrU5WpTOYdnDQfNVH9tBU+ Vz/A+bqF6B6xXxUO9A8RO+An+l8F2UMaSv7yuplQwi+wSphjhcTfO5F9bx9WDmp8QUOj 10Lg== X-Forwarded-Encrypted: i=1; AJvYcCXbx4S5t/gvaOXbONWwWaico1DbrZM0S0aUcXaOr3hHMKTgGvfX09TY0XjyjRPzuVSsF4u1G4kqYHq1gJ8=@vger.kernel.org X-Gm-Message-State: AOJu0YyUUIZqZwJ12u60Jurv1eH6PbbOjNWqwBELZ9+a2KGFsIm7Cqff OCS5poGE9r7YpD/hQfv/F1RutQylgllbbKQ9VONGVBkAfkKVFXdXXxsoNMqL8GgAiUP3J/1wx6D jZWAB8w== X-Google-Smtp-Source: AGHT+IE/R/FUWdBKFYsppwkRwS7FEQKz3QhCXqgTnVjNJsrzfSerhDPlhvxPM0XuhZf8Dg7Zd48cy0mqhLr/ X-Received: from plck11.prod.google.com ([2002:a17:902:f28b:b0:223:501f:f398]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:da2d:b0:220:fe50:5b44 with SMTP id d9443c01a7336-2292f98769cmr202554215ad.31.1743531882714; Tue, 01 Apr 2025 11:24:42 -0700 (PDT) Date: Tue, 1 Apr 2025 11:23:01 -0700 In-Reply-To: <20250401182347.3422199-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250401182347.3422199-1-irogers@google.com> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog Message-ID: <20250401182347.3422199-4-irogers@google.com> Subject: [PATCH v1 03/48] arm64: cputype: Silence -Wshorten-64-to-32 warnings From: Ian Rogers To: Yury Norov , Rasmus Villemoes , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , 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 , "=?UTF-8?q?Krzysztof=20=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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clang warning -Wshorten-64-to-32 can be useful to catch inadvertent truncation. In some instances this truncation can lead to changing the sign of a result, for example, truncation to return an int to fit a sort routine. Silence the warning by making the implicit truncation explicit. Signed-off-by: Ian Rogers --- tools/arch/arm64/include/asm/cputype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/incl= ude/asm/cputype.h index 488f8e751349..d7289b9d2758 100644 --- a/tools/arch/arm64/include/asm/cputype.h +++ b/tools/arch/arm64/include/asm/cputype.h @@ -227,7 +227,7 @@ =20 #include =20 -#define read_cpuid(reg) read_sysreg_s(SYS_ ## reg) +#define read_cpuid(reg) ((u32)read_sysreg_s(SYS_ ## reg)) =20 /* * Represent a range of MIDR values for a given CPU model and a --=20 2.49.0.504.g3bcea36a83-goog