From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] powercap: Remove reassignment
Date: Wed, 13 Dec 2017 02:03:14 +0100 [thread overview]
Message-ID: <1535899.2uxoW1GXQ1@aspire.rjw.lan> (raw)
In-Reply-To: <00329a239c8b1640a9e491b6a90a5b20fd45e42c.1510422357.git.arvind.yadav.cs@gmail.com>
On Saturday, November 11, 2017 6:47:26 PM CET Arvind Yadav wrote:
> It is not necessary to reassignment of 'result'.
> Here, result is being initialized zero and then updated with
> seed_constraint_attributes().
> class_register is enough to return successful and error value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/powercap/powercap_sys.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
> index 5b10b50..64b2b25 100644
> --- a/drivers/powercap/powercap_sys.c
> +++ b/drivers/powercap/powercap_sys.c
> @@ -673,15 +673,13 @@ EXPORT_SYMBOL_GPL(powercap_unregister_control_type);
>
> static int __init powercap_init(void)
> {
> - int result = 0;
> + int result;
>
> result = seed_constraint_attributes();
> if (result)
> return result;
>
> - result = class_register(&powercap_class);
> -
> - return result;
> + return class_register(&powercap_class);
> }
>
> device_initcall(powercap_init);
>
Applied, thanks!
prev parent reply other threads:[~2017-12-13 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 17:47 [PATCH] powercap: Remove reassignment Arvind Yadav
2017-12-13 1:03 ` Rafael J. Wysocki [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=1535899.2uxoW1GXQ1@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=arvind.yadav.cs@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@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;
as well as URLs for NNTP newsgroup(s).