lkml.org 
[lkml]   [2023]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iio: frequency: adf4377: remove duplicate/repeating constant
From
Le 11/02/2023 à 08:07, Deepak R Varma a écrit :
> Constant ADF4377_0000_SOFT_RESET_R_MSK is unnecessarily or'ed with
> itself. Remove the redundant constant from the expression.
> Issue identified using doublebitand.cocci Coccinelle semantic patch.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/iio/frequency/adf4377.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/frequency/adf4377.c b/drivers/iio/frequency/adf4377.c
> index 26abecbd51e0..caefd7ea6b14 100644
> --- a/drivers/iio/frequency/adf4377.c
> +++ b/drivers/iio/frequency/adf4377.c
> @@ -495,8 +495,8 @@ static int adf4377_soft_reset(struct adf4377_state *st)
> return ret;
>
> return regmap_read_poll_timeout(st->regmap, 0x0, read_val,
> - !(read_val & (ADF4377_0000_SOFT_RESET_R_MSK |
> - ADF4377_0000_SOFT_RESET_R_MSK)), 200, 200 * 100);
> + !(read_val & ADF4377_0000_SOFT_RESET_R_MSK),
> + 200, 200 * 100);

Based on the code just above, it is likely that one is expected to be
ADF4377_0000_SOFT_RESET_MSK.

CJ

> }
>
> static int adf4377_get_freq(struct adf4377_state *st, u64 *freq)

\
 
 \ /
  Last update: 2023-03-27 00:18    [W:0.153 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site