From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 A8E5634FF65 for ; Wed, 21 Jan 2026 18:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769021949; cv=none; b=cbHZ6PaZYPS6WUEhPN1jnvPIxAmde0p1DgYxtEk9kIkFkxDIm3xRTHOAnClvk9R1XzaFi7KZ8GomkkRoVRmsOuuETq85kFcPDfDQ0oOKusPYB6/NRYd3VZpfrLdiLxszCMZvBMjI4D8FitMuScDCE3xKKVo5E5gwDnIo7H/M3nc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769021949; c=relaxed/simple; bh=wrxxGjfP+5GnkRibkSGpyCxIsIz43rN4YQvaQ7oPfIo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k6MaxKM+0UFBhtC/fMkZajJpUQcLQO5aT/9ON19eRSDNu3PXeWhDFa29f9rkcTHkWj/s2EDB546TEBZvEJG07YD6u/ZIbSHFjgd0Anh9Z8XDnjbuFESrq7oa2wkT/qOwRMmDF5tirQBE2U8sOPhWlNThCQPiFqnQpv6b2nV+MhY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QCobc10W; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QCobc10W" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4801d24d91bso1739155e9.2 for ; Wed, 21 Jan 2026 10:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769021946; x=1769626746; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=v3CiRXfW7OiyeqDRS/V5H9jo7jqnwu85t2dfMJoFCM0=; b=QCobc10W8qh+W1kpAc54iwiZcOtuAkIgrjliU3QHFE3QfrE0ZElvW/B8q4Fu0Avo6b J7Tl1wtv6oz7OvvXArZGOh4PNag0ch/56cJdZye2pvyjoe/bCkh3s+suNIa4Se4XPsxm 68PFZ8kuHOFYnLxowd7ufvcJFD9phNt8cDE3yn+1+2dMXsdv9Iw3ajMS3CXhfnoQOFOH jg0XBcX29zU5DTN8AH6VNwG1MpBbptPi0kdlsrRo7UvE93VMghaAoyWQsjsOer9R0h1q nGdD3TcAVvC3iiOg7/1h+0QZYom3x61VXzj0wrUt0m5s8/jpcN7TlC0mrspnNbvuXpKs a/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769021946; x=1769626746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=v3CiRXfW7OiyeqDRS/V5H9jo7jqnwu85t2dfMJoFCM0=; b=JccnX2p1NmWgrA8j9lu6RhkDmyKkxaC29IQAtbd7BqjM3y70vm/0q1KW+J9dAGgh0y yYKzTMVO9605YdremTDREbnnGLHpTyZb/CBCBkM1+CWajXKb4bre260/IYICrTZN2L5z PwDJia3IfNXcUsRmsaQG+NosT0kDQSFhc+xhkTWx98kRXCUdmYvTpJ+701vJNNrZ74eY qSoMfwNUNWeLdueP171O4jQ1x05YFSYrXTC3rFxpjYtsdIbPiRM3Mop/UgYsCsYoWdNA y3zDjUQoflnmhp2et31OwQ+LjI7iGKkWGkxLqx6N8vP6xI7tmItsKaSA7EqopkVJLHfF EDcg== X-Forwarded-Encrypted: i=1; AJvYcCVePtKffMK8NkEZkwEwxM0MA8lVvWNF4jk3Uyq6nFYX+P5+4zpdyeCbKenZqbk0WYMRACk4RT8MDiQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxIHWC43SNldFDW1UQmHAEpHd+eWOV8k4C8mZBAL3FOFqXrRz7a mOx5ojl/EQpIkx/k5r83NUvtAONhnw1uqkzGC2qXx3i5NbjkdFVI6YnW X-Gm-Gg: AZuq6aIOWtRsPjHd7jY/wPB/q1nca+Fa2KpZbKTm3bsiDcPHQiytQs9j0Ye8ZhqP14Q 2k2d1/YXZHcD3ttdMEu6qgyykxhAH5sJ9l8Sk1L72d6cNbtuhikyZINPi5nFGD1vyPaWUGge+f4 6bWubjODSmHqYBwEoJNeNpkOuKrTRi9LzTKk9QOYKp4HIfrZMWwfyZuz9wu27/ymAJWTvWjZIXn UYnMWmnGr/hzNMkCoV5vIbwtyNis/XLIxVYeOl9COfwyZLOudyRU9Ep9rVGumjOeDN9aaiwRVQF oRJoEJargVub7yoMDb3DZLsY/w8colp24Wn+ga8XK0uQiBDB7W933IHx403/P9rEewuD/pulN3e w5pEOlKBNf1A/KgWa3Cj9syp+arCLTpg2bYLZECTYEoMj7jPctPGkpha57Ih5nmzo9FELo3ngnO RAzJzLrxponcrg7Xuei71eWLVc0VEIIIZxg9c/v9QFZzk2TILWyUmc X-Received: by 2002:a05:600c:1f87:b0:480:1e92:dc65 with SMTP id 5b1f17b1804b1-4803e7f3c8emr99522385e9.31.1769021945554; Wed, 21 Jan 2026 10:59:05 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804245320dsm9691175e9.0.2026.01.21.10.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 10:59:05 -0800 (PST) Date: Wed, 21 Jan 2026 18:59:03 +0000 From: David Laight To: Geert Uytterhoeven Cc: Yury Norov , Rasmus Villemoes , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Alexandre Belloni , Jonathan Cameron , Crt Mori , Richard Genoud , Andy Shevchenko , Luo Jie , Peter Zijlstra , Jakub Kicinski , netdev@vger.kernel.org, "David S . Miller" , Mika Westerberg , Andreas Noever , Yehezkel Bernat , Nicolas Frattaroli Subject: Re: [PATCH v2 03/16] bitmap: Use FIELD_PREP() in expansion of FIELD_PREP_WM16() Message-ID: <20260121185903.201abe71@pumpkin> In-Reply-To: References: <20251212193721.740055-1-david.laight.linux@gmail.com> <20251212193721.740055-4-david.laight.linux@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 21 Jan 2026 17:52:29 +0100 Geert Uytterhoeven wrote: > On Wed, 21 Jan 2026 at 17:50, Geert Uytterhoeven wrote: > > On Fri, 12 Dec 2025 at 20:38, wrote: > > > From: David Laight > > > > > > Instead of directly expanding __BF_FIELD_CHECK() (which really ought > > > not be used outside bitfield) and open-coding the generation of the > > > masked value, just call FIELD_PREP() and add an extra check for > > > the mask being at most 16 bits. > > > The extra check is added after calling FIELD_PREP() to get a sane > > > error message if 'mask' isn't constant. > > > > > > Remove the leading _ from the formal parameter names. > > > Prefix the local variables with _wm16_ to hopefully make them > > > unique. > > > > > > Signed-off-by: David Laight > > > > Reviewed-by: Geert Uytterhoeven > > Oops, just noticed commit 2fb6915fa22dc552 > ("compiler_types.h: add "auto" as a macro for "__auto_type""), > so you want to do s/__auto_type/auto/g. That wasn't there when I was writing the series. I knew it was coming but didn't want build breakages. David > > Gr{oetje,eeting}s, > > Geert >