mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
include: sbi: Make hartmask pointer const in sbi_hartmask_test_hart()
The sbi_hartmask_test_hart() does not modify hartmask so the hartmask pointer parameter should be declared const. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
@@ -67,7 +67,7 @@ static inline void sbi_hartmask_clear_hart(u32 h, struct sbi_hartmask *m)
|
|||||||
* @param h HART id to test
|
* @param h HART id to test
|
||||||
* @param m the hartmask pointer
|
* @param m the hartmask pointer
|
||||||
*/
|
*/
|
||||||
static inline int sbi_hartmask_test_hart(u32 h, struct sbi_hartmask *m)
|
static inline int sbi_hartmask_test_hart(u32 h, const struct sbi_hartmask *m)
|
||||||
{
|
{
|
||||||
if (h < SBI_HARTMASK_MAX_BITS)
|
if (h < SBI_HARTMASK_MAX_BITS)
|
||||||
return __test_bit(h, m->bits);
|
return __test_bit(h, m->bits);
|
||||||
|
Reference in New Issue
Block a user