Skip to content
Commit 1fd4fb8c authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

staging: most: usb: replace code to calculate array index



This patch removes the expression that makes use of a priori knowledge
about channel numbers to calculate an array index.
The expression 'peer = 1 - channel' utilizes the fact that an USB interface
that operates on the asynchronous data of the Network only has two
endpoints. Hence, channel being 0 or 1. The replacement is more simple and
less confusing when reading the code.

Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-8-git-send-email-christian.gromm@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6405fe21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment