powerpc/perf/hv-24x7: Fix off-by-one error in request_buffer check
authorThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Thu, 29 Jun 2017 21:55:32 +0000 (18:55 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 2 Jul 2017 10:40:30 +0000 (20:40 +1000)
commit36c8fb2c616d9373758b155d9723774353067a87
tree7d53b180cb46c8b571e4ae2440fae7c960e40e27
parent12bf85a71000af7419b19b5e90910919f36f336c
powerpc/perf/hv-24x7: Fix off-by-one error in request_buffer check

request_buffer can hold 254 requests, so if it already has that number of
entries we can't add a new one.

Also, define constant to show where the number comes from.

Fixes: e3ee15dc5d19 ("powerpc/perf/hv-24x7: Define add_event_to_24x7_request()")
Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/hv-24x7.c