On Thu, Apr 10, 2025 at 10:06:21AM +0300, Sakari Ailus wrote: > Add a local variable for a struct device pointer instead of obtaining the > hwrng priv field and casting it as a struct device pointer whenever it's > needed. > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > drivers/char/hw_random/atmel-rng.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c > index 143406bc6939..5192c39ebaeb 100644 > --- a/drivers/char/hw_random/atmel-rng.c > +++ b/drivers/char/hw_random/atmel-rng.c > @@ -56,12 +56,13 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max, > bool wait) > { > struct atmel_trng *trng = container_of(rng, struct atmel_trng, rng); > + struct device *dev = (struct device *)trng->rng.priv; Please stop using the priv field and instead add a struct device pointer to struct atmel_trng. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt