Skip to contentSkip to conversation

name_to_dev_t() must not call __init code

PATCH In review Jan Beulich 2 participants 2 messages Dec 7, 2010 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 name_to_dev_t() must not call __init code

The function can't be __init itself (being called from some sysfs handler), and hence none of the functions it call can be either.

---
 init/do_mounts.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
init/do_mounts.c +1 -1
@@ -93,7 +93,7 @@ no_match:
  *
  * Returns the matching dev_t on success or 0 on failure.
  */
-static dev_t __init devt_from_partuuid(char *uuid_str)
+static dev_t devt_from_partuuid(char *uuid_str)
 {
 	dev_t res = 0;
 	struct device *dev = NULL;
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jan Beulich

The function can't be __init itself (being called from some sysfs handler), and hence none of the functions it call can be either.

Quoted 19 lines

---
init/do_mounts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

init/do_mounts.c +1 -2
@@ -93,7 +93,7 @@ no_match:
 *
 * Returns the matching dev_t on success or 0 on failure.
 */
-static dev_t __init devt_from_partuuid(char *uuid_str)
+static dev_t devt_from_partuuid(char *uuid_str)
 {
 dev_t res = 0; struct device *dev = NULL;
 
 
 
--
Signature · 1 line
~Randy