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>] [day] [month] [year] [list]
Message-ID: <87d2274vjp.wl%kuninori.morimoto.gx@renesas.com>
Date:	Mon, 11 May 2015 03:57:32 +0000
From:	Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To:	nick <xerofoify@...il.com>
CC:	<ulf.hansson@...aro.org>, <peter.griffin@...aro.org>,
	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: Pointer Cast to Different Type Warnings  in  sh_mmcif.c


Hi nick

Thank you for your feedback

> Greetings Ulf and others,
> I am getting the below build warnings on the latest version of Linus's tree:
> drivers/mmc/host/sh_mmcif.c: In function ‘sh_mmcif_request_dma_one’:
> drivers/mmc/host/sh_mmcif.c:401:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast    ]
>  (void *)pdata->slave_id_tx :
>  ^
>  drivers/mmc/host/sh_mmcif.c:402:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast    
>  (void *)pdata->slave_id_rx;
> After reading and tracing this issue it seems to be a cast for a u64 pointer to a unsigned in the following statement:
> 
>  if (pdata)
>                 slave_data = direction == DMA_MEM_TO_DEV ?
>                          (void *)pdata->slave_id_tx :
>                         (void *)pdata->slave_id_rx;
> I am wondering as the maintainer if this is a warning that doesn't need to re factor the structure definition for 
> sh_mmcif_plat_data to use a u64 data type. Please let me known if I should consider re factoring the structure 
> to clean up these warnings.

I guess this warning happen from
5f48dd0690cbcea3f35b9ef2f05d5468dedc80b0
(mmc: sh_mmcif: remove slave_id settings for DMAEngine)

I didn't check, but does cast issue is solved by this ?

-	(void *)pdata->slave_id_tx :
-	(void *)pdata->slave_id_rx;
+	(void *)(unsigned long)pdata->slave_id_tx :
+	(void *)(unsigned long)pdata->slave_id_rx;


Best regards
---
Kuninori Morimoto
--
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