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: <2c797855-1967-007e-bbbc-e9f414fc9887@ti.com>
Date:   Thu, 2 Jan 2020 16:30:42 -0600
From:   Suman Anna <s-anna@...com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Joerg Roedel <joro@...tes.org>,
        Robin Murphy <robin.murphy@....com>,
        Jean-Philippe Brucker <jean-philippe@...aro.org>,
        Eric Auger <eric.auger@...hat.com>,
        Douglas Anderson <dianders@...omium.org>,
        Tero Kristo <t-kristo@...com>,
        <iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] iommu: omap: Fix printing format for size_t on 64-bit

On 12/30/19 11:26 AM, Krzysztof Kozlowski wrote:
> Print size_t as %zu or %zx to fix -Wformat warnings when compiling on
> 64-bit platform (e.g. with COMPILE_TEST):
> 
>     drivers/iommu/omap-iommu.c: In function ‘flush_iotlb_page’:
>     drivers/iommu/omap-iommu.c:437:47: warning:
>         format ‘%x’ expects argument of type ‘unsigned int’,
>         but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>

With "iommu/omap: ..." on the subject-line as per the current convention,

Acked-by: Suman Anna <s-anna@...com>

regards
Suman

> ---
>  drivers/iommu/omap-iommu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 50e8acf88ec4..887fefcb03b4 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -434,7 +434,7 @@ static void flush_iotlb_page(struct omap_iommu *obj, u32 da)
>  		bytes = iopgsz_to_bytes(cr.cam & 3);
>  
>  		if ((start <= da) && (da < start + bytes)) {
> -			dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n",
> +			dev_dbg(obj->dev, "%s: %08x<=%08x(%zx)\n",
>  				__func__, start, da, bytes);
>  			iotlb_load_cr(obj, &cr);
>  			iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
> @@ -1352,11 +1352,11 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da,
>  
>  	omap_pgsz = bytes_to_iopgsz(bytes);
>  	if (omap_pgsz < 0) {
> -		dev_err(dev, "invalid size to map: %d\n", bytes);
> +		dev_err(dev, "invalid size to map: %zu\n", bytes);
>  		return -EINVAL;
>  	}
>  
> -	dev_dbg(dev, "mapping da 0x%lx to pa %pa size 0x%x\n", da, &pa, bytes);
> +	dev_dbg(dev, "mapping da 0x%lx to pa %pa size 0x%zx\n", da, &pa, bytes);
>  
>  	iotlb_init_entry(&e, da, pa, omap_pgsz);
>  
> @@ -1393,7 +1393,7 @@ static size_t omap_iommu_unmap(struct iommu_domain *domain, unsigned long da,
>  	size_t bytes = 0;
>  	int i;
>  
> -	dev_dbg(dev, "unmapping da 0x%lx size %u\n", da, size);
> +	dev_dbg(dev, "unmapping da 0x%lx size %zu\n", da, size);
>  
>  	iommu = omap_domain->iommus;
>  	for (i = 0; i < omap_domain->num_iommus; i++, iommu++) {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ