From: Tom Rix <[email protected]>
A break is not needed if it is preceded by a return
Signed-off-by: Tom Rix <[email protected]>
---
drivers/mtd/mtdchar.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index b40f46a43fc6..323035d4f2d0 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -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:
--
2.18.1
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
>
> Signed-off-by: Tom Rix <[email protected]>
> ---
> drivers/mtd/mtdchar.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
> index b40f46a43fc6..323035d4f2d0 100644
> --- a/drivers/mtd/mtdchar.c
> +++ b/drivers/mtd/mtdchar.c
> @@ -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;
Acked-by: Richard Weinberger <[email protected]>
Do you want to route this patch through mtd or do you carry it?
--
Thanks,
//richard
On 10/19/20 1:04 PM, Richard Weinberger wrote:
> 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
>>
>> Signed-off-by: Tom Rix <[email protected]>
>> ---
>> drivers/mtd/mtdchar.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
>> index b40f46a43fc6..323035d4f2d0 100644
>> --- a/drivers/mtd/mtdchar.c
>> +++ b/drivers/mtd/mtdchar.c
>> @@ -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;
> Acked-by: Richard Weinberger <[email protected]>
>
> 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
>
----- Ursprüngliche Mail -----
> 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
>> Acked-by: Richard Weinberger <[email protected]>
>>
>> Do you want to route this patch through mtd or do you carry it?
>
> Not sure if this question is for me.
It was. :-)
> 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
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
>
> Signed-off-by: Tom Rix <[email protected]>
> Acked-by: Richard Weinberger <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel