Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1786712pxf; Fri, 26 Mar 2021 15:02:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJbQ7txNwxhNmiD0Qfzx0pRLXAkCxeutEHp6j41qtEtp0aLhCuJn4UKS7SKOpBd6UXlD09 X-Received: by 2002:aa7:cf16:: with SMTP id a22mr17051847edy.288.1616796126447; Fri, 26 Mar 2021 15:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616796126; cv=none; d=google.com; s=arc-20160816; b=MWGMOWSrIjD9U3aYCmnKjlg6Ry2d+9LxL5MferAghXPabpxbrIfk8qGMJu/yteY3Jr 0G1kqcbwZS9le+bbMexTjpp/9vspNy76C1JXhyY0qsbOlac1KasZ77K8xDIZlA0g1JrC F1HWH6gTp15Xf6AkG78t3lFN3o3x++GOy+hTOPlORr3A+J1ujLK/S53laUgn83tcQ+/M OSdNPPRSexRFY9MnWvKKCqwtdBOKcOmBvPYbHNes2VwE/52fKCEI5HjNZKK3gGafK2WE cLhVEjk0L6kirwIczizlfuK40bFt6Q42yaAxYulMwG5aTaQ/3DILcZ1lwSKVUJInIrcM glMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=7iGHBsM2d2fkF5abvnac6AvaLPbBvKzlYg3S1+5sEaw=; b=RlbTqGrQP8xqI6Pd211zVea0EBwmezx1R5O+5QuJqHOgnrN8aV4bGXHdfDq3aBRKrU Wp+V2Bg+hG3qxU0ZY6ubYkWdLWt9U0mGIS1EJW+IuQnwGwOW2pQ6qm9w2dJqTaDQEY/d 1Avj8VJqTdgYl8Jcccrjnv0MvPKNuWFEZVWCFq8D7lBn+5mqmbfa1hcF5Ejx/C2p+jYJ 7RBT7E0ArfA+26U+uDpPN2E76q3WtuOPm8JzagZ4L8kNvadZuLcX2/Tlj3b0STDhcUTr PwAX68KKPwwtxxauO/cVOOkYEs335Q9DJ3kBKtNcI3Ix0jvJh6ZWewnKRS9RBy6VZg4c 47rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si7550384ejy.55.2021.03.26.15.01.44; Fri, 26 Mar 2021 15:02:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbhCZWAt (ORCPT + 99 others); Fri, 26 Mar 2021 18:00:49 -0400 Received: from mga04.intel.com ([192.55.52.120]:61331 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbhCZWAL (ORCPT ); Fri, 26 Mar 2021 18:00:11 -0400 IronPort-SDR: U+fJW4g7LTZLd28DuNmt4lZlc37JRHZG/Yv/BXp9+eWGCRESrjWiJeGYvhGuKS5IQMZZpG7j6c UTrB0gQApAnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9935"; a="188957119" X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="188957119" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:11 -0700 IronPort-SDR: Kd1I434yTkLH637JLQVyyM35CrcQFJ4t6dh3hzI2PrFA8z+j0URTOizazVklMi2PFM0tl3NGir XvqBkBjvY/aQ== X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="416706860" Received: from zcmahone-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.231.203]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:10 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support) Subject: [PATCH 11/17] ASoC: sunxi: sun8i-codec: clarify expression Date: Fri, 26 Mar 2021 16:59:21 -0500 Message-Id: <20210326215927.936377-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> References: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cppcheck warning: sound/soc/sunxi/sun8i-codec.c:488:28: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] return sample_rate % 4000 ? 22579200 : 24576000; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 460924fc173f..518bfb724a5b 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -485,7 +485,7 @@ static int sun8i_codec_get_lrck_div_order(unsigned int slots, static unsigned int sun8i_codec_get_sysclk_rate(unsigned int sample_rate) { - return sample_rate % 4000 ? 22579200 : 24576000; + return (sample_rate % 4000) ? 22579200 : 24576000; } static int sun8i_codec_hw_params(struct snd_pcm_substream *substream, -- 2.25.1