From: Roger Quadros <rogerq@ti.com>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>, <tony@atomide.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] bus: ti-sysc: Change return types of functions
Date: Thu, 15 Aug 2019 16:02:28 +0300 [thread overview]
Message-ID: <cb5483e4-ddec-497c-6355-56d557ad6ca1@ti.com> (raw)
In-Reply-To: <20190815054647.32750-1-nishkadg.linux@gmail.com>
On 15/08/2019 08:46, Nishka Dasgupta wrote:
> Change return type of functions sysc_check_one_child() and
> sysc_check_children() from int to void as neither ever returns an error.
> Modify call sites of both functions accordingly.
>
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Acked-by: Roger Quadros <rogerq@ti.com>
cheers,
-roger
> ---
> Changes in v4:
> - Merge into a single patch the two patches for sysc_check_one_child()
> and sysc_check_children().
> Changes in v3:
> - Add patch for sysc_check_children().
> - Remove return statement in sysc_check_one_child().
> - Remove braces at call site.
> Changes in v2:
> - Remove error variable entirely.
> - Change return type of sysc_check_one_child().
>
> drivers/bus/ti-sysc.c | 22 ++++++----------------
> 1 file changed, 6 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> index e6deabd8305d..a2eae8f36ef8 100644
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -615,8 +615,8 @@ static void sysc_check_quirk_stdout(struct sysc *ddata,
> * node but children have "ti,hwmods". These belong to the interconnect
> * target node and are managed by this driver.
> */
> -static int sysc_check_one_child(struct sysc *ddata,
> - struct device_node *np)
> +static void sysc_check_one_child(struct sysc *ddata,
> + struct device_node *np)
> {
> const char *name;
>
> @@ -626,22 +626,14 @@ static int sysc_check_one_child(struct sysc *ddata,
>
> sysc_check_quirk_stdout(ddata, np);
> sysc_parse_dts_quirks(ddata, np, true);
> -
> - return 0;
> }
>
> -static int sysc_check_children(struct sysc *ddata)
> +static void sysc_check_children(struct sysc *ddata)
> {
> struct device_node *child;
> - int error;
> -
> - for_each_child_of_node(ddata->dev->of_node, child) {
> - error = sysc_check_one_child(ddata, child);
> - if (error)
> - return error;
> - }
>
> - return 0;
> + for_each_child_of_node(ddata->dev->of_node, child)
> + sysc_check_one_child(ddata, child);
> }
>
> /*
> @@ -794,9 +786,7 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
> if (error)
> return error;
>
> - error = sysc_check_children(ddata);
> - if (error)
> - return error;
> + sysc_check_children(ddata);
>
> error = sysc_parse_registers(ddata);
> if (error)
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2019-08-15 13:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 7:17 [PATCH v2] bus: ti-sysc: sysc_check_one_child(): Change return type to void Nishka Dasgupta
2019-08-13 7:28 ` Roger Quadros
2019-08-13 7:37 ` Nishka Dasgupta
2019-08-13 7:43 ` Roger Quadros
2019-08-13 7:55 ` [PATCH v3 1/2] " Nishka Dasgupta
2019-08-13 7:55 ` [PATCH v3 2/2] bus: ti-sysc: sysc_check_children(): " Nishka Dasgupta
2019-08-13 11:13 ` Roger Quadros
2019-08-13 11:42 ` Tony Lindgren
2019-08-15 5:46 ` [PATCH v4] bus: ti-sysc: Change return types of functions Nishka Dasgupta
2019-08-15 13:02 ` Roger Quadros [this message]
2019-08-26 15:31 ` Tony Lindgren
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=cb5483e4-ddec-497c-6355-56d557ad6ca1@ti.com \
--to=rogerq@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nishkadg.linux@gmail.com \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®