Usage of get_random_bytes() in i2c-cp2615

From: Bence Csókás
Date: Mon Apr 12 2021 - 07:56:59 EST


Normally, `cp2615_i2c_transfer.tag` is a random number that identifies
a given request-reply pair (the chip sends its response with the same
tag it got in the request). Currently, for the sake of ease, my driver
sends its requests with a fixed tag of 0xDD for all requests. This
defeats the purpose of the tag system. Should I use
`get_random_bytes()` instead? My concerns are that generating a random
value for each I2C transfer may lead to the entropy pool being used
up, especially since - if I understand correctly -
`get_random_bytes()` always generates 32 bit random words and discards
any extra bytes if `length%4 != 0`, and I only need 1 byte each time.