Bug 222255 - RPI random number generator breaks kernel build when BCM2835_RNG_USE_CALLOUT is set
Summary: RPI random number generator breaks kernel build when BCM2835_RNG_USE_CALLOUT ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-12 12:48 UTC by Sylvain Garrigues
Modified: 2018-03-10 11:42 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Garrigues 2017-09-12 12:48:06 UTC
/usr/src/sys/arm/broadcom/bcm2835/bcm2835_rng.c:323:2: error: incompatible pointer types passing 'void (struct bcm2835_rng_softc *)' to parameter of type 'void (*)(void *)' [-Werror,-Wincompatible-pointer-types]                     
                   ^               
/usr/src/sys/arm/broadcom/bcm2835/bcm2835_rng.c:476:2: error: incompatible pointer types passing 'void (struct bcm2835_rng_softc *)' to parameter of type 'void (*)(void *)' [-Werror,-Wincompatible-pointer-types]


Things work when we use a cast:
callout_reset(&sc->sc_rngto, sc->sc_rnghz, bcm2835_rng_harvest, sc);
==>
callout_reset(&sc->sc_rngto, sc->sc_rnghz, (void (*)(void *))bcm2835_rng_harvest, sc);
Comment 1 Sylvain Garrigues 2018-03-10 11:42:34 UTC
Fixed in r330727