You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
riscv: cpufeature: avoid uninitialized variable in has_thead_homogeneous_vlenb()
In has_thead_homogeneous_vlenb(), smatch detected that the vlenb variable
could be used while uninitialized. It appears that this could happen if
no CPUs described in DT have the "thead,vlenb" property.
Fix by initializing vlenb to 0, which will keep thead_vlenb_of set to 0
(as it was statically initialized). This in turn will cause
riscv_v_setup_vsize() to fall back to CSR probing - the desired result if
thead,vlenb isn't provided in the DT data.
While here, fix a nearby comment typo.
Cc: [email protected]
Cc: Charlie Jenkins <[email protected]>
Fixes: 377be47 ("riscv: vector: Use vlenb from DT for thead")
Signed-off-by: Paul Walmsley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
0 commit comments