[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F6F7B1.1020300@arm.com>
Date: Wed, 04 Mar 2015 12:16:49 +0000
From: "Suzuki K. Poulose" <Suzuki.Poulose@....com>
To: Sudeep Holla <Sudeep.Holla@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
CC: "nico@...aro.org" <nico@...aro.org>,
"b.zolnierkie@...sung.com" <b.zolnierkie@...sung.com>,
"kgene@...nel.org" <kgene@...nel.org>,
"a.kesavan@...sung.com" <a.kesavan@...sung.com>,
"arnd@...db.de" <arnd@...db.de>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Liviu Dudau <Liviu.Dudau@....com>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
Pawel Moll <Pawel.Moll@....com>,
"olof@...om.net" <olof@...om.net>,
Punit Agrawal <Punit.Agrawal@....com>,
Will Deacon <Will.Deacon@....com>,
Catalin Marinas <Catalin.Marinas@....com>
Subject: Re: [PATCH 1/5] arm-cci: Rearrange code for splitting PMU vs driver
code
On 03/03/15 15:35, Sudeep Holla wrote:
>
>
> On 02/03/15 11:29, Suzuki K. Poulose wrote:
>> From: "Suzuki K. Poulose" <suzuki.poulose@....com>
>>
>> No functional changes, only code re-arrangements for easier split of the
>> PMU code vs low level driver code. Extracts the port handling code
>> to cci_probe_ports().
>>
>> Signed-off-by: Suzuki K. Poulose <suzuki.poulose@....com>
>> ---
>> drivers/bus/arm-cci.c | 330 +++++++++++++++++++++++++------------------------
>> 1 file changed, 168 insertions(+), 162 deletions(-)
>>
>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>> index 84fd660..f27cf56 100644
>> --- a/drivers/bus/arm-cci.c
>> +++ b/drivers/bus/arm-cci.c
>
> [...]
>
>> @@ -1395,11 +1412,36 @@ static int cci_probe(void)
>> sync_cache_w(&cpu_port);
>> __sync_cache_range_w(ports, sizeof(*ports) * nb_cci_ports);
>> pr_info("ARM CCI driver probed\n");
>> +
>> return 0;
>> +}
>> +
>> +static int cci_probe(void)
>> +{
>> + int ret;
>> + struct device_node *np;
>> + struct resource res;
>> +
>> + np = of_find_matching_node(NULL, arm_cci_matches);
>> + if (!np)
>> + return -ENODEV;
>>
>> -memalloc_err:
>> + if (!of_device_is_available(np))
>> + return -ENODEV;
>> +
>> + ret = of_address_to_resource(np, 0, &res);
>> + if (!ret) {
>> + cci_ctrl_base = ioremap(res.start, resource_size(&res));
>> + cci_ctrl_phys = res.start;
>> + }
>> + if (ret || !cci_ctrl_base) {
>> + WARN(1, "unable to ioremap CCI ctrl\n");
>> + ret = -ENXIO;
>> + goto out;
>
> IMO you can return directly here and get rid of this goto as nothing is
> done there.
>
Yes, you are right. I will fix that in the next revision.
Regards
Suzuki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists