From: Rui Miguel Silva <rui.silva@linaro.org>
To: "Tomasz Unger" <tomasz.unger@yahoo.pl>,
"Rui Miguel Silva" <rmfrfs@gmail.com>,
"Johan Hovold" <johan@kernel.org>,
"Alex Elder" <elder@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: <greybus-dev@lists.linaro.org>, <linux-staging@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: greybus: power_supply: remove unnecessary parentheses in return
Date: Wed, 17 Jun 2026 08:22:59 +0100 [thread overview]
Message-ID: <DJB572MYSBEV.137UP2YPA88PI@linaro.com> (raw)
In-Reply-To: <20260615-greybus-power-supply-return-parens-v1-1-dcad9dabfe79@yahoo.pl>
Hi Tomasz,
Thanks for the patch.
On Mon Jun 15, 2026 at 1:13 PM WEST, Tomasz Unger wrote:
> return is not a function, so the parentheses around the returned
> expressions are not needed. Remove them to follow kernel coding
> style and silence checkpatch.pl RETURN_PARENTHESES warnings.
>
> Verified with checkpatch.pl - no errors or warnings.
> Compiled the power_supply object successfully.
>
> Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
LGTM,
Acked-by: Rui Miguel Silva <rui.silva@linaro.org>
Cheers,
Rui
> ---
> drivers/staging/greybus/power_supply.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
> index 33b7a63979d6..44bd8a72fa50 100644
> --- a/drivers/staging/greybus/power_supply.c
> +++ b/drivers/staging/greybus/power_supply.c
> @@ -336,7 +336,7 @@ static int is_psy_prop_writeable(struct gb_power_supply *gbpsy,
>
> static int is_prop_valint(enum power_supply_property psp)
> {
> - return ((psp < POWER_SUPPLY_PROP_MODEL_NAME) ? 1 : 0);
> + return (psp < POWER_SUPPLY_PROP_MODEL_NAME) ? 1 : 0;
> }
>
> static void next_interval(struct gb_power_supply *gbpsy)
> @@ -423,7 +423,7 @@ static void check_changed(struct gb_power_supply *gbpsy,
> static int total_props(struct gb_power_supply *gbpsy)
> {
> /* this return the intval plus the strval properties */
> - return (gbpsy->properties_count + gbpsy->properties_count_str);
> + return gbpsy->properties_count + gbpsy->properties_count_str;
> }
>
> static void prop_append(struct gb_power_supply *gbpsy,
>
> ---
> base-commit: 7cb1c5b32a2bfde961fff8d5204526b609bcb30a
> change-id: 20260615-greybus-power-supply-return-parens-b3dd9f4a87c7
>
> Best regards,
> --
> Tomasz Unger <tomasz.unger@yahoo.pl>
prev parent reply other threads:[~2026-06-17 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260615-greybus-power-supply-return-parens-v1-1-dcad9dabfe79.ref@yahoo.pl>
2026-06-15 12:13 ` [PATCH] staging: greybus: power_supply: remove unnecessary parentheses in return Tomasz Unger
2026-06-17 7:22 ` Rui Miguel Silva [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=DJB572MYSBEV.137UP2YPA88PI@linaro.com \
--to=rui.silva@linaro.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=rmfrfs@gmail.com \
--cc=tomasz.unger@yahoo.pl \
/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