linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* n2 RNG driver bogus cast removal
@ 2010-08-09  7:45 David Miller
  2010-08-09 14:26 ` Herbert Xu
  2010-08-09 19:32 ` Vasiliy Kulikov
  0 siblings, 2 replies; 3+ messages in thread
From: David Miller @ 2010-08-09  7:45 UTC (permalink / raw)
  To: segooon; +Cc: herbert, linux-crypto, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=iso-8859-7, Size: 1001 bytes --]


Kulikov, can you at least build test your patches?  Casts are not
always incorrect, particularly when private cookies are "unsigned
long" as is the case here:

drivers/char/hw_random/n2-drv.c: In function ¡n2rng_data_read¢:
drivers/char/hw_random/n2-drv.c:390: warning: initialization makes pointer from integer without a cast

Herbert, please revert this change, thanks.  And I suspect there
might be more of these hwrng driver duds that went into the tree,
it's worth checking out. :-)

Thanks.

commit 8b9cfdca9c52f7d39c3ccfac1668e31c20c9f42e
Author: Kulikov Vasiliy <segooon@gmail.com>
Date:   Mon Jul 5 21:25:06 2010 +0800

    hwrng: n2-drv - remove casts from void*
    
    Remove unnesessary casts from void*.
    
    Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: n2 RNG driver bogus cast removal
  2010-08-09  7:45 n2 RNG driver bogus cast removal David Miller
@ 2010-08-09 14:26 ` Herbert Xu
  2010-08-09 19:32 ` Vasiliy Kulikov
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2010-08-09 14:26 UTC (permalink / raw)
  To: David Miller; +Cc: segooon, linux-crypto, linux-kernel

On Mon, Aug 09, 2010 at 12:45:14AM -0700, David Miller wrote:
> 
> Kulikov, can you at least build test your patches?  Casts are not
> always incorrect, particularly when private cookies are "unsigned
> long" as is the case here:
> 
> drivers/char/hw_random/n2-drv.c: In function ‘n2rng_data_read’:
> drivers/char/hw_random/n2-drv.c:390: warning: initialization makes pointer from integer without a cast
> 
> Herbert, please revert this change, thanks.  And I suspect there
> might be more of these hwrng driver duds that went into the tree,
> it's worth checking out. :-)

Thanks Dave.  I'll revert it for now.

However, it probably makes sense to change priv into a void *
as most drivers use it as a pointer instead of an integer.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: n2 RNG driver bogus cast removal
  2010-08-09  7:45 n2 RNG driver bogus cast removal David Miller
  2010-08-09 14:26 ` Herbert Xu
@ 2010-08-09 19:32 ` Vasiliy Kulikov
  1 sibling, 0 replies; 3+ messages in thread
From: Vasiliy Kulikov @ 2010-08-09 19:32 UTC (permalink / raw)
  To: David Miller; +Cc: herbert, linux-crypto, linux-kernel

On Mon, Aug 09, 2010 at 00:45 -0700, David Miller wrote:
> 
> Kulikov, can you at least build test your patches?  Casts are not
> always incorrect, particularly when private cookies are "unsigned
> long" as is the case here:
> 
> drivers/char/hw_random/n2-drv.c: In function ‘n2rng_data_read’:
> drivers/char/hw_random/n2-drv.c:390: warning: initialization makes pointer from integer without a cast
Ahh, shame on me... I'd compiled this on x86 and looked through error
log, I wrongly pointed out that there is no error at this line. As I see
now, this tactic is incorrect. I'd not do this any more, sorry for
this...

> 
> Herbert, please revert this change, thanks.  And I suspect there
> might be more of these hwrng driver duds that went into the tree,
> it's worth checking out. :-)
> 
> Thanks.
> 
> commit 8b9cfdca9c52f7d39c3ccfac1668e31c20c9f42e
> Author: Kulikov Vasiliy <segooon@gmail.com>
> Date:   Mon Jul 5 21:25:06 2010 +0800
> 
>     hwrng: n2-drv - remove casts from void*
>     
>     Remove unnesessary casts from void*.
>     
>     Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
>     Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-09 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09  7:45 n2 RNG driver bogus cast removal David Miller
2010-08-09 14:26 ` Herbert Xu
2010-08-09 19:32 ` Vasiliy Kulikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).