File tree 7 files changed +11
-22
lines changed
7 files changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ static int dax_pmem_compat_release(struct device *dev, void *data)
41
41
return 0 ;
42
42
}
43
43
44
- static int dax_pmem_compat_remove (struct device * dev )
44
+ static void dax_pmem_compat_remove (struct device * dev )
45
45
{
46
46
device_for_each_child (dev , NULL , dax_pmem_compat_release );
47
- return 0 ;
48
47
}
49
48
50
49
static struct nd_device_driver dax_pmem_compat_driver = {
Original file line number Diff line number Diff line change @@ -310,11 +310,10 @@ static int nd_blk_probe(struct device *dev)
310
310
return nsblk_attach_disk (nsblk );
311
311
}
312
312
313
- static int nd_blk_remove (struct device * dev )
313
+ static void nd_blk_remove (struct device * dev )
314
314
{
315
315
if (is_nd_btt (dev ))
316
316
nvdimm_namespace_detach_btt (to_nd_btt (dev ));
317
- return 0 ;
318
317
}
319
318
320
319
static struct nd_device_driver nd_blk_driver = {
Original file line number Diff line number Diff line change @@ -113,18 +113,17 @@ static int nvdimm_bus_remove(struct device *dev)
113
113
struct nd_device_driver * nd_drv = to_nd_device_driver (dev -> driver );
114
114
struct module * provider = to_bus_provider (dev );
115
115
struct nvdimm_bus * nvdimm_bus = walk_to_nvdimm_bus (dev );
116
- int rc = 0 ;
117
116
118
117
if (nd_drv -> remove ) {
119
118
debug_nvdimm_lock (dev );
120
- rc = nd_drv -> remove (dev );
119
+ nd_drv -> remove (dev );
121
120
debug_nvdimm_unlock (dev );
122
121
}
123
122
124
- dev_dbg (& nvdimm_bus -> dev , "%s.remove(%s) = %d \n" , dev -> driver -> name ,
125
- dev_name (dev ), rc );
123
+ dev_dbg (& nvdimm_bus -> dev , "%s.remove(%s)\n" , dev -> driver -> name ,
124
+ dev_name (dev ));
126
125
module_put (provider );
127
- return rc ;
126
+ return 0 ;
128
127
}
129
128
130
129
static void nvdimm_bus_shutdown (struct device * dev )
@@ -427,7 +426,7 @@ static void free_badrange_list(struct list_head *badrange_list)
427
426
list_del_init (badrange_list );
428
427
}
429
428
430
- static int nd_bus_remove (struct device * dev )
429
+ static void nd_bus_remove (struct device * dev )
431
430
{
432
431
struct nvdimm_bus * nvdimm_bus = to_nvdimm_bus (dev );
433
432
@@ -446,8 +445,6 @@ static int nd_bus_remove(struct device *dev)
446
445
spin_unlock (& nvdimm_bus -> badrange .lock );
447
446
448
447
nvdimm_bus_destroy_ndctl (nvdimm_bus );
449
-
450
- return 0 ;
451
448
}
452
449
453
450
static int nd_bus_probe (struct device * dev )
Original file line number Diff line number Diff line change @@ -113,16 +113,14 @@ static int nvdimm_probe(struct device *dev)
113
113
return rc ;
114
114
}
115
115
116
- static int nvdimm_remove (struct device * dev )
116
+ static void nvdimm_remove (struct device * dev )
117
117
{
118
118
struct nvdimm_drvdata * ndd = dev_get_drvdata (dev );
119
119
120
120
nvdimm_bus_lock (dev );
121
121
dev_set_drvdata (dev , NULL );
122
122
nvdimm_bus_unlock (dev );
123
123
put_ndd (ndd );
124
-
125
- return 0 ;
126
124
}
127
125
128
126
static struct nd_device_driver nvdimm_driver = {
Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ static int nd_pmem_probe(struct device *dev)
564
564
return pmem_attach_disk (dev , ndns );
565
565
}
566
566
567
- static int nd_pmem_remove (struct device * dev )
567
+ static void nd_pmem_remove (struct device * dev )
568
568
{
569
569
struct pmem_device * pmem = dev_get_drvdata (dev );
570
570
@@ -579,8 +579,6 @@ static int nd_pmem_remove(struct device *dev)
579
579
pmem -> bb_state = NULL ;
580
580
}
581
581
nvdimm_flush (to_nd_region (dev -> parent ), NULL );
582
-
583
- return 0 ;
584
582
}
585
583
586
584
static void nd_pmem_shutdown (struct device * dev )
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ static int child_unregister(struct device *dev, void *data)
87
87
return 0 ;
88
88
}
89
89
90
- static int nd_region_remove (struct device * dev )
90
+ static void nd_region_remove (struct device * dev )
91
91
{
92
92
struct nd_region * nd_region = to_nd_region (dev );
93
93
@@ -108,8 +108,6 @@ static int nd_region_remove(struct device *dev)
108
108
*/
109
109
sysfs_put (nd_region -> bb_state );
110
110
nd_region -> bb_state = NULL ;
111
-
112
- return 0 ;
113
111
}
114
112
115
113
static int child_notify (struct device * dev , void * data )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ struct nd_device_driver {
26
26
struct device_driver drv ;
27
27
unsigned long type ;
28
28
int (* probe )(struct device * dev );
29
- int (* remove )(struct device * dev );
29
+ void (* remove )(struct device * dev );
30
30
void (* shutdown )(struct device * dev );
31
31
void (* notify )(struct device * dev , enum nvdimm_event event );
32
32
};
You can’t perform that action at this time.
0 commit comments