Commit 0d481ff
x86/pci: Clean up open-coded PCIBIOS return code mangling
Per PCI Firmware spec r3.3, sec 2.5.2, 2.6.2, and 2.7, the return code for
these PCI BIOS interfaces is in 8 bits of the EAX register. Previously it
was extracted by open-coded masks and shifting.
Name the return code bits with a #define and add pcibios_get_return_code()
to extract the return code to improve code readability. In addition,
replace zero test with PCIBIOS_SUCCESSFUL.
No functional changes intended.
Link: https://lore.kernel.org/r/20231124085924.13830-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>1 parent 420ac76 commit 0d481ff
1 file changed
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
34 | 47 | | |
35 | 48 | | |
36 | 49 | | |
| |||
154 | 167 | | |
155 | 168 | | |
156 | 169 | | |
157 | | - | |
| 170 | + | |
158 | 171 | | |
159 | 172 | | |
160 | 173 | | |
| |||
227 | 240 | | |
228 | 241 | | |
229 | 242 | | |
230 | | - | |
| 243 | + | |
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
| |||
269 | 282 | | |
270 | 283 | | |
271 | 284 | | |
272 | | - | |
| 285 | + | |
273 | 286 | | |
274 | 287 | | |
275 | 288 | | |
| |||
385 | 398 | | |
386 | 399 | | |
387 | 400 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
| |||
415 | 429 | | |
416 | 430 | | |
417 | 431 | | |
418 | | - | |
| 432 | + | |
419 | 433 | | |
420 | 434 | | |
421 | 435 | | |
| |||
0 commit comments