From: Hans de Goede <hdegoede@redhat.com>
To: trix@redhat.com, jlee@suse.com, mgross@linux.intel.com,
malattia@linux.it
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: remove unneeded break
Date: Wed, 28 Oct 2020 12:33:39 +0100 [thread overview]
Message-ID: <dd06e057-7ca8-972b-3d71-8e06aa68961f@redhat.com> (raw)
In-Reply-To: <20201019133212.12671-1-trix@redhat.com>
Hi,
On 10/19/20 3:32 PM, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> A break is not needed if it is preceded by a return
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up there once I've pushed my local branch there,
which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/acer-wmi.c | 1 -
> drivers/platform/x86/sony-laptop.c | 3 ---
> drivers/platform/x86/wmi.c | 3 ---
> 3 files changed, 7 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index 49f4b73be513..1c2084c74a57 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -792,7 +792,6 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap)
> switch (quirks->brightness) {
> default:
> return ec_write(0x83, value);
> - break;
> }
> default:
> return AE_ERROR;
> diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> index e5a1b5533408..704813374922 100644
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -2467,13 +2467,11 @@ static int __sony_nc_gfx_switch_status_get(void)
> * 0: integrated GFX (stamina)
> */
> return result & 0x1 ? SPEED : STAMINA;
> - break;
> case 0x015B:
> /* 0: discrete GFX (speed)
> * 1: integrated GFX (stamina)
> */
> return result & 0x1 ? STAMINA : SPEED;
> - break;
> case 0x0128:
> /* it's a more elaborated bitmask, for now:
> * 2: integrated GFX (stamina)
> @@ -2482,7 +2480,6 @@ static int __sony_nc_gfx_switch_status_get(void)
> dprintk("GFX Status: 0x%x\n", result);
> return result & 0x80 ? AUTO :
> result & 0x02 ? STAMINA : SPEED;
> - break;
> }
> return -EINVAL;
> }
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index d88f388a3450..44e802f9f1b4 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1260,13 +1260,10 @@ 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;
> }
>
prev parent reply other threads:[~2020-10-29 2:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 13:32 [PATCH] platform/x86: remove unneeded break trix
2020-10-28 11:33 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd06e057-7ca8-972b-3d71-8e06aa68961f@redhat.com \
--to=hdegoede@redhat.com \
--cc=jlee@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=malattia@linux.it \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).