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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Dec 2019 11:09:47 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Vasyl Gomonovych <gomonovych@...il.com>
Cc:     piotrs@...ence.com, richard@....at, vigneshr@...com,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to
 pointer from integer of different size warning

Hi Vasyl,

Vasyl Gomonovych <gomonovych@...il.com> wrote on Sat, 14 Dec 2019
22:09:45 +0100:

> Use a cast to uintptr_t and next to a pointer
> In the final assignment the same casting in place
> memory_pointer = (uintptr_t)mem_ptr;
> Fix warning: cast to pointer from integer of different size

It seems like you're 'git send' script is messy :) (see the title).

> 
> Signed-off-by: Vasyl Gomonovych <gomonovych@...il.com>
> ---
> This commit fixes a minor issue with a warning
> Not sure if we will have problem here in case of
> dma_addr_t which can be 64-bit wide on 32-bit arch

Why not manipulating dma_addr_t everywhere instead?

> 
> ---
>  drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
> index 3a36285a8d8a..960c3a0be69c 100644
> --- a/drivers/mtd/nand/raw/cadence-nand-controller.c
> +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
> @@ -1280,8 +1280,8 @@ cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr,
>  	}
>  
>  	cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page,
> -				       (void *)dma_buf, (void *)dma_ctrl_dat,
> -				       ctype);
> +				       (void *)(uintptr_t)dma_buf,
> +				       (void *)(uintptr_t)dma_ctrl_dat, ctype);
>  
>  	status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
>  

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ