Message ID | 20201019185628.264473-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/6] platform/x86: acer-wmi: Drop no-op set_quirks call from find_quirks | expand |
On Mon, Oct 19, 2020 at 9:56 PM Hans de Goede <hdegoede@redhat.com> wrote: > > set_quirks has a "if (!interface) return;" check at its beginning and > interface always is NULL when set_quirks is called from find_quirks, > so it is a no-op and we can drop it. > > This also allows dropping the "if (!interface) return;" from set_quirks > since set_quirks now always is called with interface != NULL. Is there any cover letter for this? In any case, LGTM, you may use my tag Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> I'm not sure about ACPI_EXCEPTION() use, though. > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > drivers/platform/x86/acer-wmi.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c > index 49f4b73be513..db6167a10981 100644 > --- a/drivers/platform/x86/acer-wmi.c > +++ b/drivers/platform/x86/acer-wmi.c > @@ -302,9 +302,6 @@ static struct quirk_entry *quirks; > > static void __init set_quirks(void) > { > - if (!interface) > - return; > - > if (quirks->mailled) > interface->capability |= ACER_CAP_MAILLED; > > @@ -648,8 +645,6 @@ static void __init find_quirks(void) > > if (quirks == NULL) > quirks = &quirk_unknown; > - > - set_quirks(); > } > > /* > -- > 2.28.0 >
Hi, On 10/26/20 4:15 PM, Andy Shevchenko wrote: > On Mon, Oct 19, 2020 at 9:56 PM Hans de Goede <hdegoede@redhat.com> wrote: >> >> set_quirks has a "if (!interface) return;" check at its beginning and >> interface always is NULL when set_quirks is called from find_quirks, >> so it is a no-op and we can drop it. >> >> This also allows dropping the "if (!interface) return;" from set_quirks >> since set_quirks now always is called with interface != NULL. > > Is there any cover letter for this? Nope, in hindsight I should have probably added one. The intention was to only write patch 6/6 the rest is all prep work / cleanups to make patch 6/6 possible. > In any case, LGTM, you may use my tag > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Thank you, I assume that applies to the entire series ? > I'm not sure about ACPI_EXCEPTION() use, though. That is the only way I could find to easily print a sensible error message given an acpi status code return... Regards, Hans > >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >> --- >> drivers/platform/x86/acer-wmi.c | 5 ----- >> 1 file changed, 5 deletions(-) >> >> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c >> index 49f4b73be513..db6167a10981 100644 >> --- a/drivers/platform/x86/acer-wmi.c >> +++ b/drivers/platform/x86/acer-wmi.c >> @@ -302,9 +302,6 @@ static struct quirk_entry *quirks; >> >> static void __init set_quirks(void) >> { >> - if (!interface) >> - return; >> - >> if (quirks->mailled) >> interface->capability |= ACER_CAP_MAILLED; >> >> @@ -648,8 +645,6 @@ static void __init find_quirks(void) >> >> if (quirks == NULL) >> quirks = &quirk_unknown; >> - >> - set_quirks(); >> } >> >> /* >> -- >> 2.28.0 >> > >
On Mon, Oct 26, 2020 at 5:43 PM Hans de Goede <hdegoede@redhat.com> wrote: > On 10/26/20 4:15 PM, Andy Shevchenko wrote: > > On Mon, Oct 19, 2020 at 9:56 PM Hans de Goede <hdegoede@redhat.com> wrote: > > In any case, LGTM, you may use my tag > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > Thank you, I assume that applies to the entire series ? Yes.
Hi, On 10/26/20 5:55 PM, Andy Shevchenko wrote: > On Mon, Oct 26, 2020 at 5:43 PM Hans de Goede <hdegoede@redhat.com> wrote: >> On 10/26/20 4:15 PM, Andy Shevchenko wrote: >>> On Mon, Oct 19, 2020 at 9:56 PM Hans de Goede <hdegoede@redhat.com> wrote: > >>> In any case, LGTM, you may use my tag >>> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> >> >> Thank you, I assume that applies to the entire series ? > > Yes. Great, I've added the series to my review-hans branch with your Reviewed-by added. Regards, Hans
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 49f4b73be513..db6167a10981 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -302,9 +302,6 @@ static struct quirk_entry *quirks; static void __init set_quirks(void) { - if (!interface) - return; - if (quirks->mailled) interface->capability |= ACER_CAP_MAILLED; @@ -648,8 +645,6 @@ static void __init find_quirks(void) if (quirks == NULL) quirks = &quirk_unknown; - - set_quirks(); } /*
set_quirks has a "if (!interface) return;" check at its beginning and interface always is NULL when set_quirks is called from find_quirks, so it is a no-op and we can drop it. This also allows dropping the "if (!interface) return;" from set_quirks since set_quirks now always is called with interface != NULL. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/platform/x86/acer-wmi.c | 5 ----- 1 file changed, 5 deletions(-)