Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3023883rwb; Mon, 15 Aug 2022 16:21:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR41q40++HPa6gCK2m9k1NYWtztaG5y6ZotMmMhWbv5PyLQ7gA+sKLC5Vi855pQE9EM9KOqE X-Received: by 2002:a17:907:1df1:b0:730:b058:ef95 with SMTP id og49-20020a1709071df100b00730b058ef95mr11649857ejc.600.1660605594849; Mon, 15 Aug 2022 16:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605594; cv=none; d=google.com; s=arc-20160816; b=qfbPT0tpChA7sep+JRPwuC7bA9vwfMVt0ViQJKsRzG2p/INjg6f72tQZfokh2MRduG TvIXpyrdbAv6CAF3fT6uBXlk9C5UdhkOyiSTCOwEV7qhboL5KN+5CYSs/iAPGbwIGlYB mFNK2ubiFTaYrX7fkFYjYixp3uopPDfpQsZwhnMcKoB7pYpgNudgy9QhG1w3aSkMwRi1 vKxAo+7vswl93kYMcXJLIE5X4OSnRQWBTP9jNuWdoIOkdU1S6f9aYtazevs+qQFi3Xxr SgUa7d6NkxhtLLr84b6zn4IPUbtDVzd0f6KQ/MK1DYSD7kmrUvwEqnytcmMysG/2lSKJ iRGQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RUZumoaecjuMOW0WuAamIDmBN20r6OgB40OXP70Ci+w=; b=j3OerSW5tN9sWEPfgL86SXWEkPe5HDa9ZkFHU64O5nzkmLTV9xmzzDaNkuZeCwkQEJ HoIUPW3g+CtKIJi5VZCtLKg9W745m4mFr1I+Cul61P92zX6YSdH8uOgEJtCBiUtjziVR +ULdHqr6fCetTR6VXKVeUw0iJeNk3lwylQPzk3JYbPa/dqZAjPrmzDV3Qf4Y9WRGLp6+ ZnDzWeGMgrPtZ1gU23D6+gHK7lYOsDGny/qAd33+KeCd5fWdPWcutB9gavQWDJg1lUz+ UeouxZeCoKjK4p14KsIgH2O6U8mY3EvGPDfkSZJd2Bkfe7r66Y6tAePQRrUDkX8HzXrm XiAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QfF1BUi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du8-20020a17090772c800b00733ca35c0a6si9349804ejc.626.2022.08.15.16.19.30; Mon, 15 Aug 2022 16:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QfF1BUi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351598AbiHOWpr (ORCPT + 99 others); Mon, 15 Aug 2022 18:45:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351258AbiHOWlp (ORCPT ); Mon, 15 Aug 2022 18:41:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBA4A73926; Mon, 15 Aug 2022 12:52:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E70076125C; Mon, 15 Aug 2022 19:52:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4B68C433D6; Mon, 15 Aug 2022 19:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593129; bh=FlydeP6PYQGyn0AYt0muUhmpUF8x2hn0JEyYh0BdFuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QfF1BUi1344SR8SeyMUsNFO2FnSNlrqwSybJnLhP5E0fLVd9PGlrbLf1qqGjVfsm4 16cIft6JFYZI0VHk10jyz0g5WzksY3gLshR0shfXcRHYlViixqYeUOPNBvEsH7uUzL pM1tLrMT/TVGisIap/DhmCHU56n3mkFugB04x8N4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 5.18 0900/1095] ASoC: fsl_asrc: force cast the asrc_format type Date: Mon, 15 Aug 2022 20:04:59 +0200 Message-Id: <20220815180506.534797777@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shengjiu Wang [ Upstream commit c49932726de24405d45516b3f8ad2735714fdf05 ] Fix sparse warning: sound/soc/fsl/fsl_asrc.c:1177:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_asrc.c:1177:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_asrc.c:1177:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_asrc.c:1200:47: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 4520af41fd21 ("ASoC: fsl_asrc: Support new property fsl,asrc-format") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_asrc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index d7d1536a4f37..44dcbf49456c 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -1066,6 +1066,7 @@ static int fsl_asrc_probe(struct platform_device *pdev) struct resource *res; void __iomem *regs; int irq, ret, i; + u32 asrc_fmt = 0; u32 map_idx; char tmp[16]; u32 width; @@ -1174,7 +1175,8 @@ static int fsl_asrc_probe(struct platform_device *pdev) return ret; } - ret = of_property_read_u32(np, "fsl,asrc-format", &asrc->asrc_format); + ret = of_property_read_u32(np, "fsl,asrc-format", &asrc_fmt); + asrc->asrc_format = (__force snd_pcm_format_t)asrc_fmt; if (ret) { ret = of_property_read_u32(np, "fsl,asrc-width", &width); if (ret) { @@ -1197,7 +1199,7 @@ static int fsl_asrc_probe(struct platform_device *pdev) } } - if (!(FSL_ASRC_FORMATS & (1ULL << asrc->asrc_format))) { + if (!(FSL_ASRC_FORMATS & pcm_format_to_bits(asrc->asrc_format))) { dev_warn(&pdev->dev, "unsupported width, use default S24_LE\n"); asrc->asrc_format = SNDRV_PCM_FORMAT_S24_LE; } -- 2.35.1