From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBEB4C04AB5 for ; Thu, 6 Jun 2019 21:27:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2A40208E4 for ; Thu, 6 Jun 2019 21:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559856447; bh=+4E0XxqMZx4ZMjUpgPDHwvBgIlhYyT6apccXu6sV07c=; h=From:To:Cc:Subject:In-Reply-To:Date:List-ID:From; b=yEC/1Yu5PYXij2rOXEkEIfioERD7j+MXGjbFdmtc/kEMXbZOHCuZlpYXVRP7HfgMx up4foeNd5K56zvx/MY5BIHvIcErq7eSmbAHlCvLzqvObAGfRYWZXJ0NB69nWCKEkbo HUSC9sm3ZUmHuE2YjUvdOmeunw0ZkD4/+Io8QLMY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728435AbfFFV11 (ORCPT ); Thu, 6 Jun 2019 17:27:27 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:58600 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbfFFV10 (ORCPT ); Thu, 6 Jun 2019 17:27:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=fq+nuTht58G4C364ngqEgcV6Y7E0hYDOrgAWsKDoLw0=; b=c8OQxnyHwLAw vSyNcSDlmyvBIxt8UaN+wgrRiFDXWBWMO1AdjUEKSrZoDPf/r+IDxqxX1NhyMKusZalchecp+evD2 yuSW719Lgp9WXikfdQHBwNddApeztJUSQhrO7PJWX6LNKk7zt7rT9Kn0rlTy9cfZaUHurqt+Cb/G+ wQ0Ak=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hYzuq-0007VI-94; Thu, 06 Jun 2019 21:27:20 +0000 Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id B0F8B440046; Thu, 6 Jun 2019 22:27:19 +0100 (BST) From: Mark Brown To: Nathan Chancellor Cc: alsa-devel@alsa-project.org, Bard Liao , clang-built-linux@googlegroups.com, Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , Nick Desaulniers , Oder Chiou , Shuming Fan Subject: Applied "ASoC: rt1011: Mark format integer literals as unsigned" to the asoc tree In-Reply-To: <20190606051227.90944-1-natechancellor@gmail.com> X-Patchwork-Hint: ignore Message-Id: <20190606212719.B0F8B440046@finisterre.sirena.org.uk> Date: Thu, 6 Jun 2019 22:27:19 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: rt1011: Mark format integer literals as unsigned has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 83a6edbb8fe928e801b9b6cab13e81109b185918 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 5 Jun 2019 22:12:27 -0700 Subject: [PATCH] ASoC: rt1011: Mark format integer literals as unsigned Clang warns: sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ sound/soc/codecs/rt1011.c:2123:13: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ 2 warnings generated. Mark the integer literals as unsigned explicitly so that if the kernel does ever bump the C standard it uses, the behavior is consitent. Fixes: d6e65bb7ff0d ("ASoC: rt1011: Add RT1011 amplifier driver") Link: https://github.com/ClangBuiltLinux/linux/issues/506 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Mark Brown --- sound/soc/codecs/rt1011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 349d6db7ecd4..3a0ae80c5ee0 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1288,7 +1288,7 @@ static int rt1011_r0_load_mode_put(struct snd_kcontrol *kcontrol, if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { rt1011->r0_reg = ucontrol->value.integer.value[0]; - format = 2147483648; /* 2^24 * 128 */ + format = 2147483648U; /* 2^24 * 128 */ r0_integer = format / rt1011->r0_reg / 128; r0_factor = ((format / rt1011->r0_reg * 100) / 128) - (r0_integer * 100); @@ -2120,7 +2120,7 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag) dev_err(dev, "Calibrate R0 Failure\n"); ret = -EAGAIN; } else { - format = 2147483648; /* 2^24 * 128 */ + format = 2147483648U; /* 2^24 * 128 */ r0_integer = format / r0[0] / 128; r0_factor = ((format / r0[0] * 100) / 128) - (r0_integer * 100); -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Applied "ASoC: rt1011: Mark format integer literals as unsigned" to the asoc tree Date: Thu, 6 Jun 2019 22:27:19 +0100 (BST) Message-ID: <20190606212719.B0F8B440046@finisterre.sirena.org.uk> References: <20190606051227.90944-1-natechancellor@gmail.com> Return-path: In-Reply-To: <20190606051227.90944-1-natechancellor@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Nathan Chancellor Cc: alsa-devel@alsa-project.org, Bard Liao , clang-built-linux@googlegroups.com, Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , Nick Desaulniers , Oder Chiou , Shuming Fan List-Id: alsa-devel@alsa-project.org The patch ASoC: rt1011: Mark format integer literals as unsigned has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >>From 83a6edbb8fe928e801b9b6cab13e81109b185918 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 5 Jun 2019 22:12:27 -0700 Subject: [PATCH] ASoC: rt1011: Mark format integer literals as unsigned Clang warns: sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ sound/soc/codecs/rt1011.c:2123:13: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ 2 warnings generated. Mark the integer literals as unsigned explicitly so that if the kernel does ever bump the C standard it uses, the behavior is consitent. Fixes: d6e65bb7ff0d ("ASoC: rt1011: Add RT1011 amplifier driver") Link: https://github.com/ClangBuiltLinux/linux/issues/506 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Mark Brown --- sound/soc/codecs/rt1011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 349d6db7ecd4..3a0ae80c5ee0 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1288,7 +1288,7 @@ static int rt1011_r0_load_mode_put(struct snd_kcontrol *kcontrol, if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { rt1011->r0_reg = ucontrol->value.integer.value[0]; - format = 2147483648; /* 2^24 * 128 */ + format = 2147483648U; /* 2^24 * 128 */ r0_integer = format / rt1011->r0_reg / 128; r0_factor = ((format / rt1011->r0_reg * 100) / 128) - (r0_integer * 100); @@ -2120,7 +2120,7 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag) dev_err(dev, "Calibrate R0 Failure\n"); ret = -EAGAIN; } else { - format = 2147483648; /* 2^24 * 128 */ + format = 2147483648U; /* 2^24 * 128 */ r0_integer = format / r0[0] / 128; r0_factor = ((format / r0[0] * 100) / 128) - (r0_integer * 100); -- 2.20.1