Re: [PATCH 2/4] net: ethernet: cpsw: add optional third memory region for CONTROL module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Sergei,

On 22.08.2013 20:12, Sergei Shtylyov wrote:
>> @@ -2012,6 +2013,27 @@ static int cpsw_probe(struct platform_device *pdev)
>>   		goto clean_runtime_disable_ret;
>>   	}
>>
>> +	/* If the control memory region is unspecified, continue without it.
>> +	 * If it is specified, but we're unable to reserve it, bail. */
> 
>     According to Documentation/CodingStyle, the networking code's preferred 
> style of multi-line comments is this:
> 
> /* Bla
>   * bla
>   */

Ok, thanks. Will fix.

>> +		goto clean_runtime_disable_ret;
>> +	}
>> +	priv->gmii_sel_reg = devm_ioremap(&pdev->dev, res->start,
>> +					  resource_size(res));
>> +	if (!priv->gmii_sel_reg) {
>> +		dev_err(priv->dev, "unable to map control i/o region\n");
>> +		goto clean_runtime_disable_ret;
>> +	}
> 
>     Why not use devm_ioremap_resource() instead of the above sequence?

Right, that's much nicer. I'll also do that for the devm rework patch.


Thank you for your review!


Daniel

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux