From patchwork Tue May 23 08:20:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 9742053 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 D711060388 for ; Tue, 23 May 2017 08:20:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B032B280CF for ; Tue, 23 May 2017 08:20:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4F0A287BA; Tue, 23 May 2017 08:20:34 +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 297AD280CF for ; Tue, 23 May 2017 08:20:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B5C872670B1; Tue, 23 May 2017 10:20:21 +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 29BE82670B5; Tue, 23 May 2017 10:20:20 +0200 (CEST) Received: from mail1.bemta3.messagelabs.com (mail1.bemta3.messagelabs.com [195.245.230.172]) by alsa0.perex.cz (Postfix) with ESMTP id 6355B266A65 for ; Tue, 23 May 2017 10:20:15 +0200 (CEST) Received: from [85.158.137.19] by server-12.bemta-3.messagelabs.com id C9/E6-11537-FB0F3295; Tue, 23 May 2017 08:20:15 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRWlGSWpSXmKPExsUSt3Opse7+D8q RBkvec1lcuXiIyWLqwydsFt+udDBZXN41h81i4tLVzBadu/pZLTZ8X8vowO6x4XMTm8fOWXfZ PTat6mTz2Pd2GZvHoV2OHuu3XGXx+LxJLoA9ijUzLym/IoE148Sqp+wFt9grJr9Ua2A8xdbFy MkhJLCeUeLnlzwIu0LizLVzjCA2m4CFxOQTD8BqWARUJb5cfQJkc3AICyRIfHyh1MXIxSEi0M UosfrVY3YQh1lgCaPE3dvXwZp5BRwk1j18zwphC0qcnPmEBcRmFpCQOPjiBTPEMgOJ0wsaweI SAvYS099fZQZZICGgL9F4LBYibCjxfdY3qBJziXvT9jFOYOSfhWTqLCRTFzAyrWLUKE4tKkst 0jU00UsqykzPKMlNzMzRNTQw1stNLS5OTE/NSUwq1kvOz93ECAxvBiDYwbhiu+chRkkOJiVR3 j0JypFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHhV3gPlBItS01Mr0jJzgJEGk5bg4FES4RUESf MWFyTmFmemQ6ROMepyzLn39T2TEEtefl6qlDivHkiRAEhRRmke3AhY1F9ilJUS5mUEOkqIpyC 1KDezBFX+FaM4B6OSMG88yBSezLwSuE2vgI5gAjrC9S7YESWJCCmpBsZ195TEg84dNb5n2Ks0 Z+6OcpYZW9XcVzntlguKLPP5eMY+7n/0m49aFyzOJfvEdD6eZ6X6jrNTzfr+vS0vX9xdf/F6a uM5v6Unl2dYSM66Jr2Ig4l5n0ChmQTze7de25cBq/kcXeYpcbc+ad86V0tpgfVWLtapFXp3xd c4l590fVdpnHhpK6sSS3FGoqEWc1FxIgAyQyCf9QIAAA== X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-2.tower-39.messagelabs.com!1495527614!86297881!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14642 invoked from network); 23 May 2017 08:20:15 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-2.tower-39.messagelabs.com with AES128-SHA encrypted SMTP; 23 May 2017 08:20:15 -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; Tue, 23 May 2017 09:20:13 +0100 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id 981693FAD4; Tue, 23 May 2017 09:20:13 +0100 (BST) From: Adam Thomson Date: Tue, 23 May 2017 09:20:13 +0100 To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Message-ID: <20170523082013.981693FAD4@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: 23/05/2017 05:41:00 Cc: alsa-devel@alsa-project.org, Takashi Sakamoto , Support Opensource , linux-kernel@vger.kernel.org Subject: [alsa-devel] [RESEND PATCH] ASoC: da7218: 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 Reviewed-by: Takashi Sakamoto --- sound/soc/codecs/da7218.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c index d256ebf..6e1940e 100644 --- a/sound/soc/codecs/da7218.c +++ b/sound/soc/codecs/da7218.c @@ -1457,7 +1457,7 @@ static int da7218_dai_event(struct snd_soc_dapm_widget *w, ++i; msleep(DA7218_SRM_CHECK_DELAY); } - } while ((i < DA7218_SRM_CHECK_TRIES) & (!success)); + } while ((i < DA7218_SRM_CHECK_TRIES) && (!success)); if (!success) dev_warn(codec->dev, "SRM failed to lock\n");