Skip to contentSkip to conversation

ubd: remove dead code in ubd_setup_common

PATCH Applied Christoph Hellwig 2 participants 2 messages Jun 28, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubd: remove dead code in ubd_setup_common

Remove some leftovers of the fake major number parsing that cause complains from some compilers.

Fixes aebbd9fdb0cc ("ubd: remove the code to register as the legacy IDE driver")
---
 arch/um/drivers/ubd_kern.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/um/drivers/ubd_kern.c +0 -10
index 0b86aa1b12f1..e3093071406d 100644
@@ -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;
 	}
Signature · 7 lines
2.30.2


_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
maintainer Applied
#1 lore raw
Quoted 2 lines · Christoph Hellwig

Remove some leftovers of the fake major number parsing that cause complains from some compilers.

Applied, thanks.

Signature · 7 lines
Jens Axboe


_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um