From patchwork Fri Mar 4 20:57:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 548132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22BF7C433F5 for ; Fri, 4 Mar 2022 21:00:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4CA221F4F; Fri, 4 Mar 2022 21:59:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4CA221F4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646427641; bh=2JK0mNcu7PUPAwarOyY/Z+yeDnC1ZKF9pTQ519uiz7g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=C8cAsmruIRTGpQY9+HIsh9q422RQTW++ztVS2FdPC4oe4iYb1fzgkPnfiPvUrU+hC aD2iM/U1q1FZEJ6jC4iBQmmiIKh3Z8U2Y0tnzwMhKzQKFylVjw+0JbDvHdt+YKGMMP pXvsVtdZR+DyVrXFGOv506/WCULztTvHNwOitCF0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5A0BCF80527; Fri, 4 Mar 2022 21:57:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92AA4F80139; Fri, 4 Mar 2022 21:57:55 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 60492F80519 for ; Fri, 4 Mar 2022 21:57:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60492F80519 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lTkIQbVw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646427472; x=1677963472; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2JK0mNcu7PUPAwarOyY/Z+yeDnC1ZKF9pTQ519uiz7g=; b=lTkIQbVwWmHF76NzbBrYbOKboc4En2L5HkfDnQH2b+xvN9Gs3+8/qT47 L3HuHNhrtIejDo4NOpFlJL3bWv1hGup1BHRfffLQaN90Qzv4xTJbbxWK5 dZOvPEO++8mjqOjNx2KMhMC0e1c4FcQ/yk3i60qhGq0Qc9Av5H0wP8irj gTVTzBm/hcOx5z+y1TOBDoQwphs1an4B7orihiAKuegqztwmaBxHuQKDo HccVePda9Nya6sM1877wfU68GRAmZlhJyo/g43KNKk6kt93woQ9RhIQx8 wXq55ri7CTUsuCEamK9BnYT0RSs1/Fc/Ck0teIb88CoHdfS8iBcqsQ+cW w==; X-IronPort-AV: E=McAfee;i="6200,9189,10276"; a="340492557" X-IronPort-AV: E=Sophos;i="5.90,156,1643702400"; d="scan'208";a="340492557" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2022 12:57:47 -0800 X-IronPort-AV: E=Sophos;i="5.90,156,1643702400"; d="scan'208";a="631271303" Received: from grmundad-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.115.48]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2022 12:57:47 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 09/10] ASoC: SOF: debug: clarify operator precedence Date: Fri, 4 Mar 2022 14:57:32 -0600 Message-Id: <20220304205733.62233-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220304205733.62233-1-pierre-louis.bossart@linux.intel.com> References: <20220304205733.62233-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, broonie@kernel.org, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart , Ranjani Sridharan X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" cppcheck warning: sound/soc/sof/debug.c:398:46: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; ^ Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index 145fd0d1e166..7b1139961a99 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -395,7 +395,7 @@ static void snd_sof_dbg_print_fw_state(struct snd_sof_dev *sdev, const char *lev void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, const char *msg, u32 flags) { - char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; + char *level = (flags & SOF_DBG_DUMP_OPTIONAL) ? KERN_DEBUG : KERN_ERR; bool print_all = sof_debug_check_flag(SOF_DBG_PRINT_ALL_DUMPS); if (flags & SOF_DBG_DUMP_OPTIONAL && !print_all)