Skip to content

Commit efee99e

Browse files
Christoph Hellwigaxboe
authored andcommitted
ubd: remove dead code in ubd_setup_common
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 <hch@lst.de> Link: https://lore.kernel.org/r/20210628093937.1325608-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ae5e688 commit efee99e

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

arch/um/drivers/ubd_kern.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,12 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
243243
if(index_out) *index_out = -1;
244244
n = *str;
245245
if(n == '='){
246-
char *end;
247-
int major;
248-
249246
str++;
250247
if(!strcmp(str, "sync")){
251248
global_openflags = of_sync(global_openflags);
252249
return err;
253250
}
254251

255-
err = -EINVAL;
256-
major = simple_strtoul(str, &end, 0);
257-
if((*end != '\0') || (end == str)){
258-
*error_out = "Didn't parse major number";
259-
return err;
260-
}
261-
262252
pr_warn("fake major not supported any more\n");
263253
return 0;
264254
}

0 commit comments

Comments
 (0)