Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1333634lqd; Thu, 25 Apr 2024 12:11:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8DqjJidNJl0KV8EJ3N5tMxqni3Zb2o2DBqsn9oJEjIqAv0h8Tt5X9neJA9tMHjylymczbDkHJld58y94woIxr/pPxyIXLW+hHvbbdXA== X-Google-Smtp-Source: AGHT+IFj6rOUM9tKjv1ZmCXJtCgiSiIlAaGUHJ+N/Rd2l8E/nAQr9VKh5Dsmq25hi3e0ZJIzVRZi X-Received: by 2002:a05:6870:8a28:b0:23a:66db:bc5f with SMTP id p40-20020a0568708a2800b0023a66dbbc5fmr340718oaq.32.1714072307528; Thu, 25 Apr 2024 12:11:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714072307; cv=pass; d=google.com; s=arc-20160816; b=DPmFQhNQSc8NbqgidkP5Tv6xBZCMMEJU0CzgzPZIvMaVFXTHXfbWyippfOROdzeZIL vjcgXLm6llkvBhNSC1hy2IK+KvGnZXAvwhO00D2dgaOV/C+OgVTIu1zU9GXkc3cKjTba Yw0cquMvjRGY3hAkhuAxfGbQlHYiM1yxdz3Lc72QKNv5OkzpECrWVC51PVB9g2Hox/uo szrNgIELh32UnXPjTu78Uz0FtN8c8j+UHRgYRo82eH5D16No62Lws8tMnn3aVNpVDj13 HCu+/wUYha8YWDaIaJUsIru67j4CETViyR+X6ztEW+XMpf9B2qVXL5H9VRM0DsAA4c19 L4kg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=S+CfDSUKDWMFi6696XWhw/F7Vcz9ViYAQl2uJokcaMA=; fh=M2yRRKQjFYIjgEBw2wPz2fcCHAo9Ev6mmmUDohLpppw=; b=uoqK3htfLAMFaogt4rqo+lkTO0raKPxD7/072V7Z3UibXb7pPs9u1iHwCCse6mOTSh 0GJAmJBi0b1zidAYDuJkGp3zQZczvemS1hJLsPyNRZ6zUR9+uoBIl2NKmOIo9si9rAQl hVhXFh7Sv871ElKuvEcYGyb189mcPQM48UfOG5LFvvTxkY86GQI8mmDuYW2gwziQ2XSj h54r3vxshwy/iliJlrvPlWXjKDLdYYtYPGW/2SXzBdlTVZinIG8oT+86DlBxSc0WhCyQ RKAMT8FDLVflU/0H3F+B+X8/VRzYhaYBz/zLDxB0G+7KS5QF4wRp8Bv1+YGla50phrLe WQ4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Iq9a5Joh; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-159052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159052-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k192-20020a633dc9000000b005fd89007e7dsi9065426pga.825.2024.04.25.12.11.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 12:11:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Iq9a5Joh; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-159052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159052-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A7AF7B21F03 for ; Thu, 25 Apr 2024 19:01:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 782911514C9; Thu, 25 Apr 2024 19:01:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Iq9a5Joh" Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 0F8C314F116 for ; Thu, 25 Apr 2024 19:01:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071694; cv=none; b=Dt9j5BEFTeMrdms3o4/DgqIQCNrxQg7zJ9AAOJDhvZ8dgKCbIHqlKPsqiyXHHUdYiGsQhClaKDxhkwgnBvixt0Ox4c3BRZ4J8I2xiOXJFfzPwNFkvTl/meM2XvJ0kO43E+GXN7bJONzzTamXmTZj1hPBgxq5hlJi9+HNO5lTBNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071694; c=relaxed/simple; bh=JeXz2/TFeNnXiSq/81VOk+f7TlrQg/8jpIhKlDJ3Qcc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G+2fXxGpNS810dUMbbg62jQbhiLSeVTaU6N1+w/0x0IxTpfIR1GxSZZgaXdktfrt48aD/90vr5yBNmIa7h7AbiPpJmNAzww1qJ90K8AHENjEe4Fuq0CmV7PqnzMdznCjjocgpCy2nzDhwx/z5o/QDpyqvDjAE853ISL51Y+z+dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=Iq9a5Joh; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-56e477db7fbso1947249a12.3 for ; Thu, 25 Apr 2024 12:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1714071691; x=1714676491; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=S+CfDSUKDWMFi6696XWhw/F7Vcz9ViYAQl2uJokcaMA=; b=Iq9a5JohsTpZ1Plw8lZtgNq/zWMOnM/vDa6gZR988KJL3wzjPGq9S1AdIubOwOi8CH NPpmx9mtAibp77SJE81y/Z4W08avKFQ5qUZQ8IR2OfV8DUFBdPKD7igii1OzhoNYfDFr PzqrW1WJmyNn5Z5FOd5FWMytOdAVjucQnXWuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714071691; x=1714676491; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S+CfDSUKDWMFi6696XWhw/F7Vcz9ViYAQl2uJokcaMA=; b=Quktd02UrDV6MrWfe3WqX1oLeKyLsg5HdBqlnFPtAV3wEJDc13DULjqrRXtSaePY6C LrNIU8srdGYRT8gT09sJYXAa6UIX/vFs5Tyv2OZjaApdhc3d/cROmVx3UdvnxMMR1CLQ 6XsUway49VY0ARW3FsCNISCG5hexNw81+F1wxj5OKz1UZsIs2IeCUtiqMy03Uwn54XjO PN7EgOCDCG6o9kl/Wtr4IloFoOV8musDui7lCEhpbqnI2j+JsZAnSVczfluUCjyjwERu 6eEoXSDnMMcE809NCoPaRYMFYfY/WDCU/2B3tuIeqacd2VH8fqxxXMoZeFhQI+A5UBjW /LrQ== X-Forwarded-Encrypted: i=1; AJvYcCUiQXnGywyW5+BrxRDgkEM6DpTagfwBeKuCOnS96jal1MjkiB9kZix12MKkxp+2yStv/oI9RQvboJQcPkj4Ikgxr4oFe5ObqKbasmko X-Gm-Message-State: AOJu0YzrNXUJSmc6UNb+z43WvK5iZkw+8o4eX/R5NnhJQobnY7yfT4xJ 7EPZK/x3EkDSdAireE+uIT+XSGLFEtIHAQgnpa8D5LMv/0/qd2WdrC81+FRPItrV/MijP8O0gcH 9MJtb3A== X-Received: by 2002:a50:f68f:0:b0:571:be31:500b with SMTP id d15-20020a50f68f000000b00571be31500bmr406020edn.25.1714071691007; Thu, 25 Apr 2024 12:01:31 -0700 (PDT) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id c26-20020aa7c99a000000b00572405680e8sm709026edt.21.2024.04.25.12.01.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Apr 2024 12:01:29 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a524ecaf215so174274266b.2 for ; Thu, 25 Apr 2024 12:01:29 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVvXwgWJ5uRnVevPYNi2VEgahKwFHpz8GeLhpeYAFI4i0VkW1QK/hTCUHjI+YWz5EfzSYa2I8vtKZvs+vzFCRvGaLAMq9+4RLE2saIw X-Received: by 2002:a17:907:76a4:b0:a57:b828:5f4b with SMTP id jw4-20020a17090776a400b00a57b8285f4bmr452572ejc.58.1714071688536; Thu, 25 Apr 2024 12:01:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Thu, 25 Apr 2024 12:01:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] ACPI fixes for v6.9-rc6 To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" On Thu, 25 Apr 2024 at 11:58, Linus Torvalds wrote: > > When that macro now has had TWO independent bugs, how about you just > write it out with explicit types and without any broken "helpers": > > static inline u64 MASK_VAL(const struct cpc_reg *reg, u64 val) > { > u64 mask = (1ull << reg->bit_width)-1; > return (val >> reg->bit_offset) & mask; > } > > which is a few more lines, but doesn't that make it a whole lot more readable? > > And maybe this time, it's not a buggy mess? Just to clarify: that was written in the MUA, and entirely untested. Somebody should still verify it, but really, with already now two bugs, that macro needs fixing for good, and the "for good" should be looking at least _something_ like the above. And despite needing fixing, I've done the pull, since bug #2 is at least less bad than bug#1 was. Linus