]> git.baikalelectronics.ru Git - kernel.git/commit
usb: isp1760: ignore return value for bus change pattern
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 19 Aug 2021 18:09:25 +0000 (19:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Aug 2021 11:30:38 +0000 (13:30 +0200)
commitb67c8b2c269b2dcb1d081d1a95e2a04f488a5f18
tree8470d4d353702054c35d305ce41783b3813c94b1
parent35b0dcb60e3fd72251158fe75151c19c1425a407
usb: isp1760: ignore return value for bus change pattern

We do not care about the return value of that read between the
scratch register write and read, we really just want to make sure that
the pattern in the bus get changed to make sure we are testing
correctly the scratch pattern.

Clang-analyzer complains about the never read scratch variable:
>> drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
    scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);

Just ignore the return value of that CHIP_ID_HIGH read, add more
information to the comment above why we are doing this. And as at it,
just do a small format change in the error message bellow.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20210819180929.1327349-2-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/isp1760/isp1760-hcd.c