From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 CFA6B1A6834 for ; Fri, 1 May 2026 08:30:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777624257; cv=none; b=UzPgrIcyhhyhfiGkFuyj8l7z2zH2JZrBnioQi3SW8A3xH4q1JlWAioN1w32go2zQG61ge3OAwUrShQOw4FAEjm8WqmHLB6QDR6TUzdWc9PHiFwRGRrgqBy1F2hwMeWH2CzCiR7gWXCvz/o5RIUiPN4jRiNZF3rgfX1rcUenFdN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777624257; c=relaxed/simple; bh=vi4Y4FrM2u7/NGWEpyOvXjv9CtvV21IppSt/L2UJ634=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dWKytl275yGmKURl8As9hntjLJtBctDTEHxzBiOVhqgpbQj93nk0ECYhFSTq8xibtcF4/phgScnfSBOWefp3WSFebyDuZE6rdGPzBGZurwNqnUEKgvzexsjZRguPD1MnN2aO03hoYT+73JwfwJF3Aw1PhEQ5fORJGh3VoBVrxy4= 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=DOVcZ3hE; arc=none smtp.client-ip=209.85.221.43 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="DOVcZ3hE" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-44509921fbcso937004f8f.3 for ; Fri, 01 May 2026 01:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777624254; x=1778229054; 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=xvsqEGiRr2aMUPxm2PwD7DIcDzBPYJDFXn2qMdcwOC0=; b=DOVcZ3hEYm6Gtwl+SGtINr5b0rCungfOrPr/G1hxKsjuk2XTXWJTmuDCWqt0RHr7Uz T723fsKz20raPfwgfNOwIzd3Fix1xV/9YYLRzZcI27x/Hq3jEYorNdtauk+dvLqLhvo8 4O7Qor2iyVuSLv2aVqnO6W2Qp9dSg/fvunDEHppmx/j/DC/zVs0lteQ6KpUH8JUo8N1J BvMJVfBlsGZ1hSz2Ad0qKdailaRrz/TL8gXKXsW+jT8gdLzYlqSnjqa7AEu59f+X7iiU QM6759SxxOkcWcZXxh/7v/Kjg6EI1Nd69AQz2uJdkZxwK/orjPmTchwq/SKGZOMwAGEk Ibow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777624254; x=1778229054; 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=xvsqEGiRr2aMUPxm2PwD7DIcDzBPYJDFXn2qMdcwOC0=; b=XaOQtWN1DaCSn9sFKHy4X2prhv/v/b3M8SZEkQzVFGIB8hGYnssPrPXO+0bJ8hALIQ gu34AemP/ze9GXjnMYXDQErlt7kK0GX4AzvvcSW7xlxTgriCMrCVPck2gAjZ4/l4Dknm zg5rqvwnmlZZmKOrQyyg+qh4o+uMeQLWPyQepYy2mQzAm2d5tuuxau+u/d+tQin4ql/J aWlgpQ7H8Wit72PozHN4Yci7xy25TE5RgnkMa6cXEylrKriPRD98KscaIulTXqY2Zioj 8k7dfmZcn3z4tZDUXJi02+nqG2CzuBZERiOW6i90t9Q+L9PHszscgs1G6q7XjDeGgofj Rwyg== X-Forwarded-Encrypted: i=1; AFNElJ8HHV1doS1vHVei619XA0PKZ3GQpZDCRb+5jgaG4u+FY2Rs2Q+EejONg9WQSbw7jQ68R8dm5XMWRpMtzEc=@vger.kernel.org X-Gm-Message-State: AOJu0YxWTejOy0ufHbpLZhriUeNvNpQkDFU9rA9R+kjW6rqe71YTytjl p5xgegI5sQDQz6j4YxOpemS9ADzqLGnW1snP/xvOtwht7yYnYmTvlPzU X-Gm-Gg: AeBDievgDB5fmv2jURYvjrBMd6GTee/BB8wDYiEKXqw5tF2lfP+/TtThK0qaEz+9mzl xI4a7fLB4JRaPUZnXrH7kV6n3BwiQnaMCzdntdLDDNdNCZbC29Gpcp9ZH+qcYqcA+uc9a02J8H7 PD7N3xxPhvGfYB/wl6kKdCVBdr6rSNdG48avDkoWpdzxV6HM0oi1wmo1L0CmEnRuRYzgxxXtiUe F8HvogsfT3R46Sca68DGgMiGoD35z+LBoY6GdVWgOyoCQlvTH8LBH24mskM5sG3I3FO+mX8qYx1 aImkKK8dmPzawARsOEyOq+w/aiCLMowMzDc/vBS0EH3DX+ji2bPxVijEg4kk9FAgJOLebQzouY8 1A4/WyE5/Cm7e4jMZHv8UiQqMHe/qjOsURjhdlEv3z5DJgUknVi/NRWF8AXuHCt5+ob4wfnNgA0 W1Y8/CBJ3C1rX7DX4LPAPGU7OZDLEqLixo/Zdk9bwctBlo4C/Y/eDF1hYjMX9t/G1Q41m/9aL1g kTVglVniy5LTA== X-Received: by 2002:a05:6000:2582:b0:44a:2cb3:b633 with SMTP id ffacd0b85a97d-44a2cb3b668mr6019597f8f.12.1777624252671; Fri, 01 May 2026 01:30:52 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-44a981defbfsm3336950f8f.17.2026.05.01.01.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 01:30:52 -0700 (PDT) Date: Fri, 1 May 2026 09:30:50 +0100 From: David Laight To: Hans Zhang <18255117159@163.com> Cc: broonie@kernel.org, sunny.luo@amlogic.com, xianwei.zhao@amlogic.com, neil.armstrong@linaro.org, khilman@baylibre.com, han.xu@nxp.com, haibo.chen@nxp.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, lhjeff911@gmail.com, hayashi.kunihiko@socionext.com, mhiramat@kernel.org, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 00/10] spi: Use FIELD_MODIFY() for bitfield operations Message-ID: <20260501093050.3f97cd3e@pumpkin> In-Reply-To: <20260430155456.36998-1-18255117159@163.com> References: <20260430155456.36998-1-18255117159@163.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@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 Thu, 30 Apr 2026 23:54:46 +0800 Hans Zhang <18255117159@163.com> wrote: > Replace open-coded bitfield modifications with the standard FIELD_MODIFY() > macro across multiple SPI controller drivers. This improves readability and > adds compile-time checking without functional changes. I don't think these changes are worth the effort. The readability doesn't change much - you need to know what a slightly more obscure 'helper' does. The extra compile-time checks are pretty unlikely to ever find a problem and mostly just slow down the compile. The generated code is likely be slightly worse. And, with the best will in the world, it is easy to make silly mistakes. David > > Each patch modifies a single driver, allowing independent review and > application. > > Hans Zhang (10): > spi: amlogic-spifc-a1: Use FIELD_MODIFY() > spi: amlogic-spisg: Use FIELD_MODIFY() > spi: cadence-xspi: Use FIELD_MODIFY() > spi: meson-spicc: Use FIELD_MODIFY() > spi: nxp-xspi: Use FIELD_MODIFY() > spi: sn-f-ospi: Use FIELD_MODIFY() > spi: stm32-ospi: Use FIELD_MODIFY() > spi: stm32-qspi: Use FIELD_MODIFY() > spi: sunplus-sp7021: Use FIELD_MODIFY() > spi: uniphier: Use FIELD_MODIFY() > > drivers/spi/spi-amlogic-spifc-a1.c | 5 ++--- > drivers/spi/spi-amlogic-spisg.c | 13 +++++-------- > drivers/spi/spi-cadence-xspi.c | 3 +-- > drivers/spi/spi-meson-spicc.c | 5 ++--- > drivers/spi/spi-nxp-xspi.c | 12 ++++-------- > drivers/spi/spi-sn-f-ospi.c | 5 ++--- > drivers/spi/spi-stm32-ospi.c | 7 +++---- > drivers/spi/spi-stm32-qspi.c | 5 ++--- > drivers/spi/spi-sunplus-sp7021.c | 3 +-- > drivers/spi/spi-uniphier.c | 13 +++++-------- > 10 files changed, 27 insertions(+), 44 deletions(-) > > > base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b