Re: [PATCH 2/3] msm: iommu: Clock control for the IOMMU driver

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

 



On 11/22/2010 3:32 PM, Daniel Walker wrote:
On Fri, 2010-11-19 at 19:02 -0800, Stepan Moskovchenko wrote:
+	int ret;
+
+	ret = clk_enable(drvdata->pclk);
You don't need to check if pclk is null ?

Nope. If we are here, the pclk will always be non-null, which is something that may not necessarily be said for for AXI clock.

  		iommu_drvdata = dev_get_drvdata(ctx_drvdata->pdev->dev.parent);
+		if (!iommu_drvdata)
+			BUG();
Just do,

BUG_ON(!iommu_drvdata);
Will fix in v2.

-	__flush_iotlb(domain);
+	ret = __flush_iotlb(domain);
What the relationship between this __flush_iotlb() and turning the
clocks on/off.

The flush_iotlb function needs to handle clock control as well, which means it can now fail. As a result, we now need to check its return value, instead of assuming it succeeded.
-	pr_err("===== WOAH! =====\n");
Cleanup right? It doesn't need it's own patch, but you could mention in
the description that you've done "minor cleanups" or something to that
effect.

Will fix in v2.

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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux