* [PATCH -next] platform/x86: wmi: discard unnecessary breaks
@ 2020-10-27 13:53 Zhang Qilong
2020-10-28 11:36 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Qilong @ 2020-10-27 13:53 UTC (permalink / raw)
To: hdegoede, mgross; +Cc: platform-driver-x86
The 'break' is unnecessary because of previous 'return',
and we could discard it.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
drivers/platform/x86/wmi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index d88f388a3450..cbf38abd40be 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1260,13 +1260,13 @@ acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
switch (result) {
case -EINVAL:
return AE_BAD_PARAMETER;
- break;
+
case -ENODEV:
return AE_NOT_FOUND;
- break;
+
case -ETIME:
return AE_TIME;
- break;
+
default:
return AE_OK;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] platform/x86: wmi: discard unnecessary breaks
2020-10-27 13:53 [PATCH -next] platform/x86: wmi: discard unnecessary breaks Zhang Qilong
@ 2020-10-28 11:36 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2020-10-28 11:36 UTC (permalink / raw)
To: Zhang Qilong, mgross; +Cc: platform-driver-x86
Hi,
On 10/27/20 2:53 PM, Zhang Qilong wrote:
> The 'break' is unnecessary because of previous 'return',
> and we could discard it.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Thank you for your patch. A patch making the same changes
was already submitted a bit earlier and has been accepted:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=619821936203f0577aa88cf30d31b0202650a745
So I'm dropping this patch, as this has already been
fixed / cleaned up.
Regards,
Hans
> ---
> drivers/platform/x86/wmi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index d88f388a3450..cbf38abd40be 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1260,13 +1260,13 @@ acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
> switch (result) {
> case -EINVAL:
> return AE_BAD_PARAMETER;
> - break;
> +
> case -ENODEV:
> return AE_NOT_FOUND;
> - break;
> +
> case -ETIME:
> return AE_TIME;
> - break;
> +
> default:
> return AE_OK;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-29 2:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-27 13:53 [PATCH -next] platform/x86: wmi: discard unnecessary breaks Zhang Qilong
2020-10-28 11:36 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox