From: Darren Hart <dvhart@infradead.org>
To: Azael Avalos <coproscefalo@gmail.com>
Cc: "platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/5] toshiba_acpi: Remove "*not supported" feature prints
Date: Wed, 5 Aug 2015 15:22:48 -0700 [thread overview]
Message-ID: <20150805222248.GB74817@vmdeb7> (raw)
In-Reply-To: <CAGdLNWG0HCsXivhQeWsNJfnSf0vNTiapf=XBOx2Mnezj8TgZpQ@mail.gmail.com>
On Wed, Aug 05, 2015 at 04:15:13PM -0600, Azael Avalos wrote:
> Hi Darren,
>
> 2015-08-05 3:38 GMT-06:00 Darren Hart <dvhart@infradead.org>:
> > On Fri, Jul 31, 2015 at 09:58:13PM -0600, Azael Avalos wrote:
> >> Currently the driver prints "*not supported" if any of the features
> >> queried are in fact not supported, let us print the available
> >> features instead.
> >>
> >> This patch removes all instances pr_info printing "*not supported",
> >> and add a new function called "print_supported_features", which will
> >> print the available laptop features.
> >>
> >> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
> >> ---
> >> drivers/platform/x86/toshiba_acpi.c | 72 +++++++++++++++++++++++--------------
> >> 1 file changed, 46 insertions(+), 26 deletions(-)
> >>
> >> diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
> >> index d983dc4..66b596a 100644
> >> --- a/drivers/platform/x86/toshiba_acpi.c
> >> +++ b/drivers/platform/x86/toshiba_acpi.c
> >> @@ -459,7 +459,7 @@ static void toshiba_illumination_available(struct toshiba_acpi_dev *dev)
> >> if (ACPI_FAILURE(status))
> >> pr_err("ACPI call to query Illumination support failed\n");
> >> else if (out[0] == TOS_NOT_SUPPORTED)
> >> - pr_info("Illumination device not available\n");
> >> + return;
> >> else if (out[0] == TOS_SUCCESS)
> >> dev->illumination_supported = 1;
> >> }
> >> @@ -483,7 +483,6 @@ static void toshiba_illumination_set(struct led_classdev *cdev,
> >> pr_err("ACPI call for illumination failed\n");
> >> return;
> >> } else if (result == TOS_NOT_SUPPORTED) {
> >> - pr_info("Illumination not supported\n");
> >> return;
> >> }
> >
> > I mentioned this in the previous review. For several of these, we have an if
> > statement that checks for a condition, and then returns, which is exactly what
> > would happen if we didn't have the if statement at all.
> >
> > If the context is important, a comment should be sufficient. Is there a
> > compelling reason to add the redundant check?
>
> The "offending" lines are removed by patch 04, that's why I didn't included
> a comment or removed the lines on this patch, as I was trying to "abstract"
> what each patch do, which in this patch, only removes the pr_info.
Apologies, I missed that. OK, we're good on this one.
--
Darren Hart
Intel Open Source Technology Center
next prev parent reply other threads:[~2015-08-05 22:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 3:58 [PATCH v3 0/5] toshiba_acpi: Refactor *{get, set} and *available functions Azael Avalos
2015-08-01 3:58 ` [PATCH v3 1/5] toshiba_acpi: Change *available functions return type Azael Avalos
2015-08-01 3:58 ` [PATCH v3 2/5] toshiba_acpi: Remove "*not supported" feature prints Azael Avalos
2015-08-05 9:38 ` Darren Hart
2015-08-05 22:15 ` Azael Avalos
2015-08-05 22:22 ` Darren Hart [this message]
2015-08-01 3:58 ` [PATCH v3 3/5] toshiba_acpi: Refactor *{get, set} functions return value Azael Avalos
2015-08-01 3:58 ` [PATCH v3 4/5] toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functions Azael Avalos
2015-08-05 20:21 ` Darren Hart
2015-08-05 22:23 ` Azael Avalos
2015-08-05 23:21 ` Darren Hart
2015-08-06 16:21 ` Azael Avalos
2015-08-05 23:36 ` Darren Hart
2015-08-01 3:58 ` [PATCH v3 5/5] toshiba_acpi: Bump driver version to 0.23 Azael Avalos
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=20150805222248.GB74817@vmdeb7 \
--to=dvhart@infradead.org \
--cc=coproscefalo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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