Re: [PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2021-01-05 Thread David Miller
From: YANG LI Date: Wed, 30 Dec 2020 14:07:30 +0800 > The warning was because of the following line in function > liquidio_set_fec(): > > retval = wait_for_sc_completion_timeout(oct, sc, 0); > if (retval) > return (-EIO); > > If this statement is not true, retval must be 0 and not

Re: [PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2020-12-29 Thread Joe Perches
On Wed, 2020-12-30 at 14:07 +0800, YANG LI wrote: > The warning was because of the following line in function > liquidio_set_fec(): > > retval = wait_for_sc_completion_timeout(oct, sc, 0); > if (retval) > return (-EIO); I presume abaci is a robot Perhaps also the robot could look for

[PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2020-12-29 Thread YANG LI
The warning was because of the following line in function liquidio_get_fec(): retval = wait_for_sc_completion_timeout(oct, sc, 0); if (retval) return retval; If this statement is not true, retval must be 0 and not updated later. So, It is better to return 0 directly. Signed-off-by:

[PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.

2020-12-29 Thread YANG LI
The warning was because of the following line in function liquidio_set_fec(): retval = wait_for_sc_completion_timeout(oct, sc, 0); if (retval) return (-EIO); If this statement is not true, retval must be 0 and not updated later. So, It is better to return 0 directly. Signed-off-by: