[PATCH] tpm_bios indexing fix
authorAndrew Morton <akpm@osdl.org>
Wed, 1 Feb 2006 11:05:02 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:12 +0000 (08:53 -0800)
commit1c40f7d4f0a9d5242f19b02b00e3e5a8ee218a20
tree3a6422d574bf033ef1c4c6f455c6e528ac3116c2
parentca4a031f6b43edb8745ebc0a1b7307c24719dae4
[PATCH] tpm_bios indexing fix

It generates warnings:

drivers/char/tpm/tpm_bios.c: In function `get_event_name':
drivers/char/tpm/tpm_bios.c:223: warning: cast from pointer to integer of different size
drivers/char/tpm/tpm_bios.c:223: warning: cast from pointer to integer of different size
drivers/char/tpm/tpm_bios.c:223: warning: cast from pointer to integer of different size
drivers/char/tpm/tpm_bios.c:224: warning: cast from pointer to integer of different size
drivers/char/tpm/tpm_bios.c:224: warning: cast from pointer to integer of different size
drivers/char/tpm/tpm_bios.c:224: warning: cast from pointer to integer of different size

and I'm not sure what the code is doing there, but it seems wrong.  We're
using the address of the buffer rather than the contents of it.

The patch adds more nasty typecasting, but I think the whole arrangement could
be done in a more typesafe manner.

Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/tpm/tpm_bios.c