slimbus: Fix the type usage of transaction id
Transaction ID with a type of 'u8' will always have the range 0 to 255.
Checking it against the condition <= 255 and then incrementing it will
always return true and lead to an overflow.
Fix this behavior by updating the type of transaction ID to unsigned int
and use a preprocessor macro instead of magic number to check for the
upper threshold.
Change-Id: I43ec1d3dd2cda280292d416d422c298d9f8ebf6a
Signed-off-by:
Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Loading
Please register or sign in to comment