Skip to content

Commit

Permalink
ubd: remove dead code in ubd_setup_common
Browse files Browse the repository at this point in the history
Remove some leftovers of the fake major number parsing that cause
complains from some compilers.

Fixes: 2933a1b ("ubd: remove the code to register as the legacy IDE driver")
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jun 30, 2021
1 parent ae5e688 commit efee99e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,22 +243,12 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
if(index_out) *index_out = -1;
n = *str;
if(n == '='){
char *end;
int major;

str++;
if(!strcmp(str, "sync")){
global_openflags = of_sync(global_openflags);
return err;
}

err = -EINVAL;
major = simple_strtoul(str, &end, 0);
if((*end != '\0') || (end == str)){
*error_out = "Didn't parse major number";
return err;
}

pr_warn("fake major not supported any more\n");
return 0;
}
Expand Down

0 comments on commit efee99e

Please sign in to comment.