From patchwork Sat Feb 11 07:07:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 55720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1379712wrn; Fri, 10 Feb 2023 23:34:42 -0800 (PST) X-Google-Smtp-Source: AK7set9WBumEqv7fmIVyy7q+QbzeAKPyKTHCHGC0LFVaH7g8y68shYBG+2OkoeL/fGnJQolVqhdW X-Received: by 2002:a17:906:a0c:b0:87b:db29:61af with SMTP id w12-20020a1709060a0c00b0087bdb2961afmr17803105ejf.24.1676100881806; Fri, 10 Feb 2023 23:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676100881; cv=none; d=google.com; s=arc-20160816; b=q/pwnnjSz7NhwQGMR0bR5dmTcXAGMfqwKeOLCy4SYsoYL4MP3TfFr78UP1hR+kGiyj wzqHQKCeXzWW/HM96u+EVeIm817xIxZshn+HU6wQG6Rxq9NPv0Q7u9tXPbHmlqmjuex4 byjM+AAzeh8OEfnbnOtGBIFVRMs0SyIlfKZ8hsntPSjaRHsXR7vxi5BKroIf2Ys6p9Tq XbzZvFzxaY/bhtMAiIMc4kRphFPTnn+Y654R5KYUYysejmyzmO3MwGCXzwF71JyPS6jx Y1wCDuakL17PakgABVX7nVOeQPgK2znOhP7htKOcceCMtH+Z40X4Jgjg21Xc5YGX0i2n x1rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=lco4HpLxrCdlhOrTLcWJH7W6AtODz3kBirfkOnW4AwQ=; b=fNxQ+Cs1iAQhkN5hs1j5bfVNPMfihjh5Ju8lnDs2Mrcnvu1qAW2TDu0bu4d+MnpqV/ nxEFzTLo8oemz4iF6g+WJAv5svp8oY2vCKy0lxCVJNjUAJVWb45UwFUSkTFtHXCz/LL3 F4IPtnApaDefyFMr9wj6XC4N56ORwVwPdDTte2+VWnwwBmJNPGQJil5ywu+Mhl9XTOrO gdj/YQQdT1iCbpGJKP77VOX948Gxq+JWukp4/1Oc5IqScNRmL6hr1VIqLaalCXhd16+p Or+RX6L2OuhxcMDUSmjCM0e+jqX1yNACNpEbZdyQ+Ze3KpJvXRc1icRx7EPLLGzds4Wp mT6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=FjpVlUq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fv34-20020a17090750a200b0089df7e8bbacsi5974202ejc.787.2023.02.10.23.34.15; Fri, 10 Feb 2023 23:34:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=FjpVlUq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229539AbjBKHHk (ORCPT + 99 others); Sat, 11 Feb 2023 02:07:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjBKHHj (ORCPT ); Sat, 11 Feb 2023 02:07:39 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BA9E311D0 for ; Fri, 10 Feb 2023 23:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1676099233; bh=RIfix2BpIp1e0NF6h2agOCXPTL1PhRt5VacNf+Tky2s=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=FjpVlUq76bhJL/v3aoVln2M4vSQgw4Eka/+zUp6+X+Ycwji5MloFE+3Q6sPqYqeua /GzBw/zq1TM3/pXlTTcWv2xkjxmK/nWhDpBoql7keR1i1ICrO1EtfqTmlowNfW52xq k3c8R5hJZYVrrkL71l2BrPRia4RIlnpSsOz7cVk4= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 11 Feb 2023 08:07:13 +0100 (CET) X-EA-Auth: gHMncWwrRzH3mBBPy4G5q3D2TK5uws+5aKfERZVMvxXMLR5um+/vvukcB+73UqH/MgSb1XCFOVEm3i0ZsB0fAV1nre4hqvwe Date: Sat, 11 Feb 2023 12:37:07 +0530 From: Deepak R Varma To: Antoniu Miclaus , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: [PATCH] iio: frequency: adf4377: remove duplicate/repeating constant Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757519158174822065?= X-GMAIL-MSGID: =?utf-8?q?1757519158174822065?= 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 --- 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); } static int adf4377_get_freq(struct adf4377_state *st, u64 *freq)