Re: [PATCH -next] random: needs linux/device.h for struct device

From: Theodore Ts'o
Date: Mon Nov 04 2013 - 11:33:03 EST


On Mon, Nov 04, 2013 at 08:06:16AM -0800, Randy Dunlap wrote:
> on x86_64:
>
> drivers/char/random.c: In function 'add_device_attach_randomness':
> drivers/char/random.c:837:41: error: dereferencing pointer to incomplete type
>
>
> need to #include <linux/device.h> for struct device, I think.

The patch which introduced this is going to be dropped from the random
tree because I'm concerned the amount of entropy that will be added
will get overstated, especially on CPU's that don't have cycle
counters (ARM and MIPS in particular).

I plan to rework it to be safer, although I suspect using device
attach times simply won't be doable on CPU's that don't have a cycle
counter register, or some other fine-grained, highly light-weight
timer (I can't use the clocksource infrastructure since those time
sources are not necessarily available during early boot, and there is
no guarantee how expensive some of the clock sources might be; some
can be quite expensive, <cough> IBM X440 servers with their
"scalability cable" <cough>).

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/