Commit 386a966
vio: make remove callback return void
The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct vio_driver::remove() return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error code is a bad idea.
Note there are two nominally different implementations for a vio bus:
one in arch/sparc/kernel/vio.c and the other in
arch/powerpc/platforms/pseries/vio.c. This patch only adapts the powerpc
one.
Before this patch for a device that was bound to a driver without a
remove callback vio_cmo_bus_remove(viodev) wasn't called. As the device
core still considers the device unbound after vio_bus_remove() returns
calling this unconditionally is the consistent behaviour which is
implemented here.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Acked-by: Lijun Pan <ljp@linux.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[mpe: Drop unneeded hvcs_remove() forward declaration, squash in
change from sfr to drop ibmvnic_remove() forward declaration]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210225221834.160083-1-uwe@kleine-koenig.org1 parent 91b6c5d commit 386a966
13 files changed
Lines changed: 15 additions & 37 deletions
File tree
- arch/powerpc
- include/asm
- platforms/pseries
- drivers
- char
- hw_random
- tpm
- crypto/nx
- misc
- net/ethernet/ibm
- scsi
- ibmvscsi_tgt
- ibmvscsi
- tty/hvc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | | - | |
1265 | 1264 | | |
1266 | 1265 | | |
1267 | 1266 | | |
| |||
1270 | 1269 | | |
1271 | 1270 | | |
1272 | 1271 | | |
1273 | | - | |
| 1272 | + | |
1274 | 1273 | | |
1275 | | - | |
| 1274 | + | |
1276 | 1275 | | |
1277 | 1276 | | |
1278 | 1277 | | |
1279 | | - | |
| 1278 | + | |
1280 | 1279 | | |
1281 | 1280 | | |
1282 | 1281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
| 1045 | + | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
| |||
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
1067 | | - | |
1068 | 1066 | | |
1069 | 1067 | | |
1070 | 1068 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
815 | | - | |
816 | 814 | | |
817 | 815 | | |
818 | 816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2288 | 2288 | | |
2289 | 2289 | | |
2290 | 2290 | | |
2291 | | - | |
| 2291 | + | |
2292 | 2292 | | |
2293 | 2293 | | |
2294 | 2294 | | |
2295 | 2295 | | |
2296 | 2296 | | |
2297 | 2297 | | |
2298 | | - | |
2299 | | - | |
2300 | 2298 | | |
2301 | 2299 | | |
2302 | 2300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
1761 | | - | |
| 1761 | + | |
1762 | 1762 | | |
1763 | 1763 | | |
1764 | 1764 | | |
| |||
1771 | 1771 | | |
1772 | 1772 | | |
1773 | 1773 | | |
1774 | | - | |
1775 | | - | |
1776 | 1774 | | |
1777 | 1775 | | |
1778 | 1776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
5396 | 5395 | | |
5397 | 5396 | | |
5398 | 5397 | | |
5399 | | - | |
| 5398 | + | |
5400 | 5399 | | |
5401 | 5400 | | |
5402 | 5401 | | |
| |||
5437 | 5436 | | |
5438 | 5437 | | |
5439 | 5438 | | |
5440 | | - | |
5441 | | - | |
5442 | 5439 | | |
5443 | 5440 | | |
5444 | 5441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6038 | 6038 | | |
6039 | 6039 | | |
6040 | 6040 | | |
6041 | | - | |
| 6041 | + | |
6042 | 6042 | | |
6043 | 6043 | | |
6044 | 6044 | | |
| |||
6070 | 6070 | | |
6071 | 6071 | | |
6072 | 6072 | | |
6073 | | - | |
6074 | 6073 | | |
6075 | 6074 | | |
6076 | 6075 | | |
| |||
0 commit comments