From: Roger Quadros <rogerq@ti.com>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>, <tony@atomide.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] bus: ti-sysc: sysc_check_one_child(): Change return type to void
Date: Tue, 13 Aug 2019 10:43:24 +0300 [thread overview]
Message-ID: <a9b27fbd-8db0-4ba7-fab0-0c118adff765@ti.com> (raw)
In-Reply-To: <5285a1f4-644c-9e97-6e1c-9b3e66948dca@gmail.com>
On 13/08/2019 10:37, Nishka Dasgupta wrote:
> On 13/08/19 12:58 PM, Roger Quadros wrote:
>>
>>
>> On 13/08/2019 10:17, Nishka Dasgupta wrote:
>>> Change return type of function sysc_check_one_child() from int to void
>>> as it always returns 0. Accordingly, at its callsite, delete the
>>> variable that previously stored the return value.
>>>
>>> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
>>> ---
>>> Changes in v2:
>>> - Remove error variable entirely.
>>> - Change return type of sysc_check_one_child().
>>>
>>> drivers/bus/ti-sysc.c | 9 +++------
>>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
>>> index e6deabd8305d..1c30fa58d70c 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;
>>>
>>
>> You didn't remove the "return 0" at end of this function.
>> Doesn't it complain during build?
>>
>>> @@ -633,12 +633,9 @@ static int sysc_check_one_child(struct sysc *ddata,
>>> static int sysc_check_children(struct sysc *ddata)
>>> {
>>
>> This could return void as well.
>
> Okay. Sorry for the errors; I'll fix-up and resend.
>
> However, while building it, I'm running into a compilation problem:
> on line 764 (function sysc_ioremap) there is apparently an "undeclared variable", "SZ_1K". Is it a problem with the architecture? What arch should I compile it with?
make ARCH=arm omap2plus_defconfig
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
>
> Thanking you,
> Nishka
>
>>
>>> 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;
>>> + sysc_check_one_child(ddata, child);
>>> }
>>
>> You don't need the braces { }.
>>
>> Please run ./scripts/checkpatch.pl --strict on your patch and fix any
>> issues.
>>
>>> return 0;
>>>
>>
>> return not required.
>>
>> You will also need to fix all instances using sysc_check_children()
>>
cheers,
-roger
--
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-13 7:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 7:17 Nishka Dasgupta
2019-08-13 7:28 ` Roger Quadros
2019-08-13 7:37 ` Nishka Dasgupta
2019-08-13 7:43 ` Roger Quadros [this message]
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
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=a9b27fbd-8db0-4ba7-fab0-0c118adff765@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®