Re: [PATCH 1/2] iommu/tegra: smmu: Simplify allocation at once

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

 



Stephen Warren <swarren@xxxxxxxxxxxxx> wrote @ Tue, 15 May 2012 18:09:13 +0200:

> On 05/15/2012 02:26 AM, Hiroshi Doyu wrote:
> > Stephen Warren <swarren@xxxxxxxxxxxxx> wrote @ Tue, 15 May 2012 01:34:15 +0200:
> > 
> >> On 05/14/2012 01:16 PM, Hiroshi DOYU wrote:
> >>> To simplify the code, alloc necessary data at once.
> >>>
> >>> Signed-off-by: Hiroshi DOYU <hdoyu@xxxxxxxxxx>
> >>> ---
> >>> This patch requires:
> >>>
> >>>     [PATCH 1/2] iommu/tegra: smmu: Add device tree support for SMMU
> >>>         http://marc.info/?l=linux-tegra&m=133663641107327&w=2
> >>>
> >>> Also the above patch requires:
> >>>
> >>>     [PATCH 1/1] dt: Add general DMA window parser
> >>>         http://marc.info/?l=linux-tegra&m=133671302703840&w=2
> >>
> >> I know I've been harping on about dependencies, but you typically only
> >> need to mention them if the dependencies are not already checked into
> >> the branch you expect this patch to be checked into.
> >>
> >>> -	smmu = devm_kzalloc(dev, sizeof(*smmu), GFP_KERNEL);
> >>> +	if (of_property_read_u32(dev->of_node, "nvidia,#asids", &asids))
> >>> +		return -ENODEV;
> >>
> >> I believe you need to change the asids variable from int to u32 to avoid
> >> a warning here.
> > 
> > There's no warning but it's allowed because of "-Wno-pointer-sign". It
> 
> That's odd. I'm sure I have seen this warning recently when calling this
> API, but you're right, I'm not able to trigger that warning right now,
> so this is fine.

Then, either [PATCH v1] or [PATCH v2] would be ok, but v2 may be a bit
better because it's exacltly compatible with that function prototype,
of_property_read_u32(...u32 *).
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux