diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-11-08 13:56:44 +0000 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-11-18 13:36:39 +0100 |
commit | a29a9776407e68c5560687e07828925bda710150 (patch) | |
tree | ac2b7b9f979a2d7527badbda2da4eaa1f3f04862 /qemu-io-cmds.c | |
parent | 118a2991bbeeb7ea641626d680f100f8ac6eff80 (diff) |
hw/misc/nrf51_rng: Don't use BIT_MASK() when we mean BIT()
The BIT_MASK() macro from bitops.h provides the mask of a bit
within a particular word of a multi-word bit array; it is intended
to be used with its counterpart BIT_WORD() that gives the index
of the word in the array.
In nrf51_rng we are using it for cases where we have a bit number
that we know is the index of a bit within a single word (in fact, it
happens that all the bit numbers we pass to it are zero). This
happens to give the right answer, but the macro that actually
does the job we want here is BIT().
Use BIT() instead of BIT_MASK().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241108135644.4007151-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'qemu-io-cmds.c')
0 files changed, 0 insertions, 0 deletions