From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0102.outbound.protection.outlook.com ([104.47.42.102]:24667 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728601AbeIBRV0 (ORCPT ); Sun, 2 Sep 2018 13:21:26 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Takashi Iwai , Sasha Levin Subject: [PATCH AUTOSEL 4.18 114/131] ALSA: pcm: Fix sparse warning wrt PCM format type Date: Sun, 2 Sep 2018 13:05:25 +0000 Message-ID: <20180902064601.183036-114-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Takashi Iwai [ Upstream commit f8b6c0cfbdd7359db9bb4da38dd54217296f9264 ] The PCM format type is with __bitwise, hence it needs the explicit cast with __force. It's ugly, but there is a reason for that cost... This fixes the sparse warning: sound/core/oss/pcm_oss.c:1854:55: warning: incorrect type in argument 1 (= different base types) Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/core/oss/pcm_oss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 905a53c1cde5..f8d4a419f3af 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1851,7 +1851,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss= _file *pcm_oss_file) format_mask =3D hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT); for (fmt =3D 0; fmt < 32; ++fmt) { if (snd_mask_test(format_mask, fmt)) { - int f =3D snd_pcm_oss_format_to(fmt); + int f =3D snd_pcm_oss_format_to((__force snd_pcm_format_t)fmt); if (f >=3D 0) formats |=3D f; } --=20 2.17.1