[{"id":3684884,"web_url":"http://patchwork.ozlabs.org/comment/3684884/","msgid":"<20260430180857.GA421892@bhelgaas>","list_archive_url":null,"date":"2026-04-30T18:08:57","subject":"Re: [RESEND PATCH 00/16] PCI: Use FIELD_MODIFY() to simplify\n bitfield operations","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Fri, May 01, 2026 at 12:24:04AM +0800, Hans Zhang wrote:\n> Replace open-coded bitmask clear + FIELD_PREP() sequences with the\n> dedicated FIELD_MODIFY() macro.  FIELD_MODIFY() performs the same\n> operation but is shorter, less error-prone, and includes compile-time\n> checks to prevent field overflow.\n> \n> This series touches the PCI core, PCIe extended capabilities (PTM, IDE,\n> TPH, MSI, REBAR, IOV, CardBus), and several DesignWare-based and\n> other PCI host controllers.  No functional change is intended.\n> \n> The patches are split per subsystem or per driver to ease review:\n\nA \"resend\" implies that this is the same series as posted earlier but\nforgotten for some reason.  But the original was only twelve minutes\nearlier, and this adds more instances.  This should be a \"v2\" with a\nnote about what changed from the original posting.  In any event, I'll\nignore the original posting in favor of this one.\n\nLooks like a good candidate for coccinelle.\n\n> Hans Zhang (16):\n>   PCI: Use FIELD_MODIFY()\n>   PCI/PTM: Use FIELD_MODIFY()\n>   PCI/IDE: Use FIELD_MODIFY()\n>   PCI/IOV: Use FIELD_MODIFY()\n>   PCI/TPH: Use FIELD_MODIFY()\n>   PCI/MSI: Use FIELD_MODIFY()\n>   PCI/REBAR: Use FIELD_MODIFY()\n>   PCI/CARDBUS: Use FIELD_MODIFY()\n>   PCI: al: Use FIELD_MODIFY()\n>   PCI: eswin: Use FIELD_MODIFY()\n>   PCI: s32g: Use FIELD_MODIFY()\n>   PCI: tegra194: Use FIELD_MODIFY()\n>   PCI: qcom: Use FIELD_MODIFY()\n>   PCI: dwc: Use FIELD_MODIFY()\n>   PCI: mvebu: Use FIELD_MODIFY()\n>   PCI: mediatek-gen3: Use FIELD_MODIFY()\n> \n>  drivers/pci/controller/dwc/pcie-al.c          | 12 ++----\n>  .../controller/dwc/pcie-designware-debugfs.c  | 23 ++++-------\n>  .../pci/controller/dwc/pcie-designware-ep.c   |  3 +-\n>  drivers/pci/controller/dwc/pcie-designware.c  |  3 +-\n>  drivers/pci/controller/dwc/pcie-eswin.c       |  3 +-\n>  drivers/pci/controller/dwc/pcie-nxp-s32g.c    |  3 +-\n>  drivers/pci/controller/dwc/pcie-qcom-common.c | 40 +++++++------------\n>  drivers/pci/controller/dwc/pcie-qcom-ep.c     |  6 +--\n>  drivers/pci/controller/dwc/pcie-tegra194.c    |  8 ++--\n>  drivers/pci/controller/pci-mvebu.c            |  3 +-\n>  drivers/pci/controller/pcie-mediatek-gen3.c   |  3 +-\n>  drivers/pci/ide.c                             |  6 +--\n>  drivers/pci/iov.c                             |  3 +-\n>  drivers/pci/msi/msi.c                         | 11 ++---\n>  drivers/pci/pci.c                             |  3 +-\n>  drivers/pci/pcie/ptm.c                        |  3 +-\n>  drivers/pci/rebar.c                           |  6 +--\n>  drivers/pci/setup-cardbus.c                   |  3 +-\n>  drivers/pci/tph.c                             | 10 ++---\n>  19 files changed, 51 insertions(+), 101 deletions(-)\n> \n> \n> base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b\n> -- \n> 2.34.1\n>","headers":{"Return-Path":"\n <linux-pci+bounces-53532-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=mf7yxmPi;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-53532-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"mf7yxmPi\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g62HN302fz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 04:09:04 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id B5ABD30285F1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 18:09:01 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id EF0343FE37C;\n\tThu, 30 Apr 2026 18:08:58 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id CC27B2C236B;\n\tThu, 30 Apr 2026 18:08:58 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 7B0BFC2BCB3;\n\tThu, 30 Apr 2026 18:08:58 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777572538; cv=none;\n b=dPtlV3OToki9j4D/wHSvfvYX+FyxI4jh7LyFoLNcqxNczMMrU+F2uF+IY6HI1XqiQW4359sis6EjboGtNx3ifSFrhSlIpVqUBfKXJVvhsEzEi/pcdAZeE+PUSl3xy++R2PLegHntgY/kaHFla6wxi6rH9KDz/hv6LleHDzYJbg0=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777572538; c=relaxed/simple;\n\tbh=dZ6rh6cH5EmBYhYJEewoXLuYpzoZltyzjdN7FwOzwBY=;\n\th=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:\n\t Content-Disposition:In-Reply-To;\n b=YAtm2E2S2NlgR3ljk4DDsvFETUdk2aXCQxUKr+XWhoP9cCyy9Wlml+feIbt8JVr3L1DDSB/itjxAXV47K5erNXmZSEekvsFW3ObVDkqZmQMKWGbdZdz1vhUVvb/FAbDK9wZJSoz6OC6AT6IK6sWi1HgK2bBBTudJhtwLp1Hi49k=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=mf7yxmPi; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777572538;\n\tbh=dZ6rh6cH5EmBYhYJEewoXLuYpzoZltyzjdN7FwOzwBY=;\n\th=Date:From:To:Cc:Subject:In-Reply-To:From;\n\tb=mf7yxmPiZ9ob9t5hV5sX/auWhagcP7LJMXFMynPTHG0Ocut5yj+M44wst2Z4LoDHK\n\t hrMqi7NeMNcqzRhkbrXirCSfAFnvC0t92AehomLYqRNiI/a0QsIjbVp+lWd4K7ljG0\n\t LFijlpNsa+HfMVeVuXN6MmzF2of2SZxgMM2butlp3vk+5vbtr1QZN8kvJbkShJnsce\n\t smuaxEnNGuWmzJ2iMHGjwnupNRdNfBU02cLsIw8yNpkA6u3c9Wu4AuY8M71JP8i58z\n\t i3g2nbjvFBSZ1NZm8dEuU78r161o5itEwpa4wszaZX7gJIcauQqk8U9HhWYjHPI8Ru\n\t k7vwcFNnCXO2Q==","Date":"Thu, 30 Apr 2026 13:08:57 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Hans Zhang <18255117159@163.com>","Cc":"bhelgaas@google.com, lpieralisi@kernel.org, kwilczynski@kernel.org,\n\tmani@kernel.org, jingoohan1@gmail.com, robh@kernel.org, s32@nxp.com,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [RESEND PATCH 00/16] PCI: Use FIELD_MODIFY() to simplify\n bitfield operations","Message-ID":"<20260430180857.GA421892@bhelgaas>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260430162420.42839-1-18255117159@163.com>"}}]