From: Bjorn Helgaas Date: Tue, 23 Jun 2026 22:32:24 +0000 (-0500) Subject: Merge branch 'pci/misc' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c2fb7a8aa10e9ca7f2a49d426469ec89e3b267a;p=thirdparty%2Flinux.git Merge branch 'pci/misc' - Fix typos in documentation (josh ziegler) - Use FIELD_MODIFY() instead of open-coding it (Hans Zhang) * pci/misc: PCI: Use FIELD_MODIFY() instead of open-coding it Documentation: PCI: Fix typos --- 2c2fb7a8aa10e9ca7f2a49d426469ec89e3b267a diff --cc drivers/pci/iov.c index 30ca4535fc36a,fdae70abe8049..b0d24839c0840 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@@ -947,13 -944,9 +947,12 @@@ static void sriov_restore_vf_rebar_stat int bar_idx, size; pci_read_config_dword(dev, pos + PCI_VF_REBAR_CTRL, &ctrl); + if (PCI_POSSIBLE_ERROR(ctrl)) + return; + bar_idx = FIELD_GET(PCI_VF_REBAR_CTRL_BAR_IDX, ctrl); size = pci_rebar_bytes_to_size(dev->sriov->barsz[bar_idx]); - ctrl &= ~PCI_VF_REBAR_CTRL_BAR_SIZE; - ctrl |= FIELD_PREP(PCI_VF_REBAR_CTRL_BAR_SIZE, size); + FIELD_MODIFY(PCI_VF_REBAR_CTRL_BAR_SIZE, &ctrl, size); pci_write_config_dword(dev, pos + PCI_VF_REBAR_CTRL, ctrl); } }