[PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

Vadim Fedorenko vadim.fedorenko at linux.dev
Wed Nov 13 06:06:18 PST 2024


On 13/11/2024 13:41, Hardevsinh Palaniya wrote:
> The original code checks 'if (ARC_CC_AL)', which is always true since
> ARC_CC_AL is a constant. This makes the check redundant and likely
> obscures the intention of verifying whether the jump is conditional.
> 
> Updates the code to check cond == ARC_CC_AL instead, reflecting the intent
> to differentiate conditional from unconditional jumps.
> 
> Suggested-by: Vadim Fedorenko <vadim.fedorenko at linux.dev>
> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya at siliconsignals.io>
> ---
> 
> Changelog in V2:
> 
> - Changed subject line
> - Updated condition check to 'if (cond == ARC_CC_AL)' instead of removing it
> 
> Link for v1: https://lore.kernel.org/bpf/e6d27adb-151c-46c1-9668-1cd2b492321b@linux.dev/T/#t
> ---

Reviewed-by: Vadim Fedorenko <vadim.fedorenko at linux.dev>



More information about the linux-snps-arc mailing list