Commit c00f632
PCI: Simplify size1 assignment logic
[ Upstream commit a55bf64 ]
In pbus_size_io() and pbus_size_mem(), a complex ?: operation is performed
to set size1. Decompose this so it's easier to read.
In the case of pbus_size_mem(), simply initializing size1 to zero ensures
the size1 checks work as expected.
Link: https://lore.kernel.org/r/20241216175632.4175-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xiaochun Lee <lixc17@lenovo.com>
Stable-dep-of: 67f9085 ("PCI: Allow relaxed bridge window tail sizing for optional resources")
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 6a9bed7 commit c00f632
1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
931 | | - | |
932 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
933 | 938 | | |
934 | 939 | | |
935 | 940 | | |
| |||
1058 | 1063 | | |
1059 | 1064 | | |
1060 | 1065 | | |
1061 | | - | |
| 1066 | + | |
1062 | 1067 | | |
1063 | 1068 | | |
1064 | 1069 | | |
| |||
1153 | 1158 | | |
1154 | 1159 | | |
1155 | 1160 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1159 | 1166 | | |
1160 | 1167 | | |
1161 | 1168 | | |
| |||
0 commit comments