Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI: Improve Resizable BAR functions kernel doc

Fix the copy-pasted errors in the Resizable BAR handling functions kernel
doc and generally improve wording choices.

Fix the formatting errors of the Return: line.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patch.msgid.link/20251113180053.27944-5-ilpo.jarvinen@linux.intel.com

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
ce04b2f9 a3378698

+21 -14
+21 -14
drivers/pci/rebar.c
··· 53 53 } 54 54 55 55 /** 56 - * pci_rebar_find_pos - find position of resize ctrl reg for BAR 56 + * pci_rebar_find_pos - find position of resize control reg for BAR 57 57 * @pdev: PCI device 58 58 * @bar: BAR to find 59 59 * 60 - * Helper to find the position of the ctrl register for a BAR. 61 - * Returns -ENOTSUPP if resizable BARs are not supported at all. 62 - * Returns -ENOENT if no ctrl register for the BAR could be found. 60 + * Helper to find the position of the control register for a BAR. 61 + * 62 + * Return: 63 + * * %-ENOTSUPP if resizable BARs are not supported at all, 64 + * * %-ENOENT if no control register for the BAR could be found. 63 65 */ 64 66 static int pci_rebar_find_pos(struct pci_dev *pdev, int bar) 65 67 { ··· 94 92 } 95 93 96 94 /** 97 - * pci_rebar_get_possible_sizes - get possible sizes for BAR 95 + * pci_rebar_get_possible_sizes - get possible sizes for Resizable BAR 98 96 * @pdev: PCI device 99 97 * @bar: BAR to query 100 98 * 101 - * Get the possible sizes of a resizable BAR as bitmask defined in the spec 102 - * (bit 0=1MB, bit 31=128TB). Returns 0 if BAR isn't resizable. 99 + * Get the possible sizes of a resizable BAR as bitmask. 100 + * 101 + * Return: A bitmask of possible sizes (bit 0=1MB, bit 31=128TB), or %0 if 102 + * BAR isn't resizable. 103 103 */ 104 104 u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar) 105 105 { ··· 125 121 EXPORT_SYMBOL(pci_rebar_get_possible_sizes); 126 122 127 123 /** 128 - * pci_rebar_get_current_size - get the current size of a BAR 124 + * pci_rebar_get_current_size - get the current size of a Resizable BAR 129 125 * @pdev: PCI device 130 - * @bar: BAR to set size to 126 + * @bar: BAR to get the size from 131 127 * 132 - * Read the size of a BAR from the resizable BAR config. 133 - * Returns size if found or negative error code. 128 + * Read the current size of a BAR from the Resizable BAR config. 129 + * 130 + * Return: BAR Size if @bar is resizable (0=1MB, 31=128TB), or negative on 131 + * error. 134 132 */ 135 133 int pci_rebar_get_current_size(struct pci_dev *pdev, int bar) 136 134 { ··· 148 142 } 149 143 150 144 /** 151 - * pci_rebar_set_size - set a new size for a BAR 145 + * pci_rebar_set_size - set a new size for a Resizable BAR 152 146 * @pdev: PCI device 153 147 * @bar: BAR to set size to 154 - * @size: new size as defined in the spec (0=1MB, 31=128TB) 148 + * @size: new size as defined in the PCIe spec (0=1MB, 31=128TB) 155 149 * 156 150 * Set the new size of a BAR as defined in the spec. 157 - * Returns zero if resizing was successful, error code otherwise. 151 + * 152 + * Return: %0 if resizing was successful, or negative on error. 158 153 */ 159 154 int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size) 160 155 {