lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120515.112649.411607744957826949.hdoyu@nvidia.com>
Date:	Tue, 15 May 2012 10:26:49 +0200
From:	Hiroshi Doyu <hdoyu@...dia.com>
To:	"swarren@...dotorg.org" <swarren@...dotorg.org>
CC:	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"joerg.roedel@....com" <joerg.roedel@....com>,
	"thierry.reding@...onic-design.de" <thierry.reding@...onic-design.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>
Subject: Re: [PATCH 1/2] iommu/tegra: smmu: Simplify allocation at once

Stephen Warren <swarren@...dotorg.org> 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@...dia.com>
> > ---
> > 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
seems that this flag has been used for long in kernel, and there are
many places. Is this conversion allowed because it's expeced that the
author should know the range of value, or any other reason?

*1:
-Wno-pointer-sign
    Don't warn for pointer argument passing or assignment with
    different signedness. Only useful in the negative form since this
    warning is enabled by default. This option is only supported for C
    and Objective-C.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ