linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubd: remove dead code in ubd_setup_common
@ 2021-06-28  9:39 Christoph Hellwig
  2021-06-28 19:48 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2021-06-28  9:39 UTC (permalink / raw)
  To: axboe, richard, anton.ivanov; +Cc: linux-um, linux-block

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")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/um/drivers/ubd_kern.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 0b86aa1b12f1..e3093071406d 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -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;
 	}
-- 
2.30.2


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ubd: remove dead code in ubd_setup_common
  2021-06-28  9:39 [PATCH] ubd: remove dead code in ubd_setup_common Christoph Hellwig
@ 2021-06-28 19:48 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-06-28 19:48 UTC (permalink / raw)
  To: Christoph Hellwig, richard, anton.ivanov; +Cc: linux-um, linux-block

On 6/28/21 3:39 AM, Christoph Hellwig wrote:
> Remove some leftovers of the fake major number parsing that cause
> complains from some compilers.

Applied, thanks.

-- 
Jens Axboe


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-28 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-28  9:39 [PATCH] ubd: remove dead code in ubd_setup_common Christoph Hellwig
2021-06-28 19:48 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).