Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/perf: Change type of the bhrb_users variable

This patch just changes data type of bhrb_users variable from
int to unsigned int because it never contains a negative value.

Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Anshuman Khandual and committed by
Michael Ellerman
f0322f7f 465345ca

+2 -2
+2 -2
arch/powerpc/perf/core-book3s.c
··· 53 53 54 54 /* BHRB bits */ 55 55 u64 bhrb_filter; /* BHRB HW branch filter */ 56 - int bhrb_users; 56 + unsigned int bhrb_users; 57 57 void *bhrb_context; 58 58 struct perf_branch_stack bhrb_stack; 59 59 struct perf_branch_entry bhrb_entries[BHRB_MAX_ENTRIES]; ··· 369 369 if (!ppmu->bhrb_nr) 370 370 return; 371 371 372 + WARN_ON_ONCE(!cpuhw->bhrb_users); 372 373 cpuhw->bhrb_users--; 373 - WARN_ON_ONCE(cpuhw->bhrb_users < 0); 374 374 perf_sched_cb_dec(event->ctx->pmu); 375 375 376 376 if (!cpuhw->disabled && !cpuhw->bhrb_users) {