From patchwork Wed May 3 15:15:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 9709983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70C5160351 for ; Wed, 3 May 2017 15:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 623DD28631 for ; Wed, 3 May 2017 15:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56FC828634; Wed, 3 May 2017 15:16:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,FROM_WORDY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27D6028632 for ; Wed, 3 May 2017 15:16:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 13C07266E0B; Wed, 3 May 2017 17:16:08 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 49C9A266E0D; Wed, 3 May 2017 17:16:07 +0200 (CEST) Received: from mail1.bemta6.messagelabs.com (mail1.bemta6.messagelabs.com [193.109.254.114]) by alsa0.perex.cz (Postfix) with ESMTP id 902F02667FE for ; Wed, 3 May 2017 17:16:02 +0200 (CEST) Received: from [85.158.140.195] by server-10.bemta-6.messagelabs.com id 49/A1-03613-B24F9095; Wed, 03 May 2017 15:15:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRWlGSWpSXmKPExsUSt3Opsa7WF85 Ig2dTzCyuXDzEZDH14RM2i29XOpgsLu+aw2YxcelqZovOXf2sFhu+r2V0YPfY8LmJzWPnrLvs HptWdbJ57Hu7jM3j0C5Hj/VbrrJ4fN4kF8AexZqZl5RfkcCasfRAaMFU9oqPq8+yNzC2s3Uxc nEICaxjlHiz5ChLFyMnkFMhsez2VVYQm03AQmLyiQdsIDaLgIrE/9O/mLoYOTiEBSIl+tdWgP SKCHQxSqx+9ZgdxGEWWMIocff2dUaQBl4BB4mr63awQtiCEidnPgFbwCwgIXHwxQtmiGUGEqc XNILFJQTsJaa/v8oMskBCQF+i8VgsRNhQ4vusb1Al5hLfpjYyT2Dkn4Vk6iwkUxcwMq1i1ChO LSpLLdI1NNNLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMcAYg2MF4f2PAIUZJD iYlUV71V+yRQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4vT9xRgoJFqWmp1akZeYAYw0mLcHBoy TCex4kzVtckJhbnJkOkTrFqMsx597X90xCLHn5ealS4rxbQIoEQIoySvPgRsDi/hKjrJQwLyP QUUI8BalFuZklqPKvGMU5GJWEeX99BJrCk5lXArfpFdARTEBHNMtygBxRkoiQkmpgrJmgIqVj wrso9fWbq36xqjasv7b+12OIeuV09uqK/0vmit5cprbITV1EN8hCI83XTMVYZv/Sqwm6Hp4SY e+O6xe3XNqzp1f45JW5Lpfv7uZQCrV+UWi4weDhkZU3/DwSXVNKV799YcxVUCkXFZSgNeOXXI SytpTXyoraU/u/asbYNlnYeZUrsRRnJBpqMRcVJwIAYiJj5fYCAAA= X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-12.tower-193.messagelabs.com!1493824554!91297328!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10087 invoked from network); 3 May 2017 15:15:54 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-12.tower-193.messagelabs.com with AES128-SHA encrypted SMTP; 3 May 2017 15:15:54 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.248.2; Wed, 3 May 2017 16:15:53 +0100 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id AC3FE3FB6C; Wed, 3 May 2017 16:15:53 +0100 (BST) From: Adam Thomson Date: Wed, 3 May 2017 16:15:53 +0100 To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Message-ID: <20170503151553.AC3FE3FB6C@swsrvapps-01.diasemi.com> MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 03/05/2017 12:34:00 Cc: alsa-devel@alsa-project.org, Takashi Sakamoto , Support Opensource , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: da7213: Fix incorrect usage of bitwise '&' operator for SRM check X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP In the SRM lock check section of code the '&' bitwise operator is used as part of checking lock status. Functionally the code works as intended, but the conditional statement is a boolean comparison so should really use '&&' logical operator instead. This commit rectifies this discrepancy. Signed-off-by: Adam Thomson --- sound/soc/codecs/da7213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index 12da558..d114f33 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -771,7 +771,7 @@ static int da7213_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(50); } - } while ((i < DA7213_SRM_CHECK_RETRIES) & (!srm_lock)); + } while ((i < DA7213_SRM_CHECK_RETRIES) && (!srm_lock)); if (!srm_lock) dev_warn(codec->dev, "SRM failed to lock\n");