Skip to contentSkip to conversation

mtd: remove unneeded break

PATCH Applied [email protected] 4 participants 5 messages Oct 19, 2020 – Oct 28, 2020 Memory technology devices (MTD)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: remove unneeded break

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

---
 drivers/mtd/mtdchar.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/mtdchar.c +0 -2
index b40f46a43fc6..323035d4f2d0 100644
@@ -881,7 +881,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
 		if (copy_from_user(&offs, argp, sizeof(loff_t)))
 			return -EFAULT;
 		return mtd_block_isbad(mtd, offs);
-		break;
 	}
 
 	case MEMSETBADBLOCK:
@@ -891,7 +890,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
 		if (copy_from_user(&offs, argp, sizeof(loff_t)))
 			return -EFAULT;
 		return mtd_block_markbad(mtd, offs);
-		break;
 	}
 
 	case OTPSELECT:
Signature · 1 line
2.18.1
Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · On Mon, Oct 19, 2020 at 9:23 PM <[email protected]> wrote:

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

---
 drivers/mtd/mtdchar.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/mtdchar.c +0 -1
index b40f46a43fc6..323035d4f2d0 100644
@@ -881,7 +881,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
                if (copy_from_user(&offs, argp, sizeof(loff_t)))
                        return -EFAULT;
                return mtd_block_isbad(mtd, offs);
-               break;
        }
 
        case MEMSETBADBLOCK:

drivers/mtd/mtdchar.c static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg) · line 894

Quoted 4 lines
drivers/mtd/mtdchar.c +0 -1
@@ -891,7 +890,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
                if (copy_from_user(&offs, argp, sizeof(loff_t)))
                        return -EFAULT;
                return mtd_block_markbad(mtd, offs);
-               break;

Do you want to route this patch through mtd or do you carry it?

Signature · 2 lines
Thanks,
//richard
author
#2 lore raw
Quoted 29 lines · Richard Weinberger
Quoted 22 lines · On Mon, Oct 19, 2020 at 9:23 PM <[email protected]> wrote:

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

---
 drivers/mtd/mtdchar.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mtd/mtdchar.c +0 -1
index b40f46a43fc6..323035d4f2d0 100644
@@ -881,7 +881,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
                if (copy_from_user(&offs, argp, sizeof(loff_t)))
                        return -EFAULT;
                return mtd_block_isbad(mtd, offs);
-               break;
        }
 
        case MEMSETBADBLOCK:

drivers/mtd/mtdchar.c static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg) · line 894

Quoted 4 lines
drivers/mtd/mtdchar.c +0 -1
@@ -891,7 +890,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
                if (copy_from_user(&offs, argp, sizeof(loff_t)))
                        return -EFAULT;
                return mtd_block_markbad(mtd, offs);
-               break;
Quoted 1 line

Do you want to route this patch through mtd or do you carry it?

Not sure if this question is for me.

I do not maintain a subsystem/branch, so through mtd is what i was assuming.

Tom

Quoted 1 line
#3 lore raw

----- Ursprüngliche Mail -----

Quoted 11 lines

Von: "Tom Rix" <[email protected]>
An: "Richard Weinberger" <[email protected]>
CC: "Miquel Raynal" <[email protected]>, "richard" <[email protected]>, "Vignesh Raghavendra" <[email protected]>, "linux-mtd" <[email protected]>, "linux-kernel" <[email protected]>
Gesendet: Dienstag, 20. Oktober 2020 16:00:37
Betreff: Re: [PATCH] mtd: remove unneeded break

Quoted 3 lines

Do you want to route this patch through mtd or do you carry it?

Not sure if this question is for me.

It was. :-)

Quoted 1 line

I do not maintain a subsystem/branch, so through mtd is what i was assuming.

Okay, then let's carry this one through mtd.
Global cleanups go sometimes in a dedicated tree directly to Linus.

Thanks,
//richard

maintainer Applied
#4 lore raw
In reply to [email protected]
Quoted 6 lines · On Mon, 2020-10-19 at 19:16:31 UTC, [email protected] wrote:

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/