Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883368rwb; Mon, 15 Aug 2022 13:15:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR77+Z56TFCAMe3Nf6LGZT2uVx8v9xG5RbF5X0tF0eHCtmxfywROBYgrmOYFbn39OwyMYNqY X-Received: by 2002:a17:906:11d:b0:712:abf:3210 with SMTP id 29-20020a170906011d00b007120abf3210mr11450366eje.292.1660594533945; Mon, 15 Aug 2022 13:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594533; cv=none; d=google.com; s=arc-20160816; b=s3m1JJaHAl3MdYlnDQCWL3SZoAJQwo1j/juw3JnzVWovpchu3tK/BUgciNVkzQX7hs vQeRtuWNIsfhk4wa4WeGRZLwkUNyvHk91dsW+fMyN2dOTwpPeKbMgv4zwGU4ADlo9MiW ILP8aklQyRm7x6SqwNF1u5K1jmTgPYfyAqM7hlayOa8TNmiKQdlGJlVZqxo3MMOhgkQg ZdViWZuF3WmJNHwkDPXQCsHXSYImfoZ92sKaFrIF9zdm5Ytpx3Qv/jdkYWc7HVnBVZBf TMccghK95C4OGHh+1EXsb8FXjaf7W21jVEAX1CpltspEDs4BBm4vqzk1tNepzXvNKG4D 39ug== 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=Jjo7o1AvLwuAcGb3fe+c2NRoiEmiz8x/jRp1anOH8KNsR/W39fV6Aq9qS1ocU0/Y0s pf0hngb0HooICnZ1eoVocpuLSwRE3ZJfYrSnFIA2+9w8q/ODa+D9qsxIAQXkmalWTCpK UQBVNwY5/xm/ob16zUqmDCjfxs1v44jyXUvWfW/Sux5jOnD8SHqibOsfESMUVWxuyhd7 2lIyOTa2Bo2ECA0dTCFYdZRgDc45/qWCZICNOzH73HAOF/QoSLosuUL6yAp9UBH/YKBP k3AaANbyNOD8c8dPxHmlZa0zz/UdSYs1jQBlSXYYvlmPXixaiReD0Pu2sz4ot2qHYIVl IMFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CmNx+hm3; 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 md17-20020a170906ae9100b00730d33c8fb3si7788759ejb.49.2022.08.15.13.15.07; Mon, 15 Aug 2022 13:15:33 -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=CmNx+hm3; 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 S1344302AbiHOTjq (ORCPT + 99 others); Mon, 15 Aug 2022 15:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344129AbiHOTgQ (ORCPT ); Mon, 15 Aug 2022 15:36:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A14852FC0; Mon, 15 Aug 2022 11:45:37 -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 67176611EA; Mon, 15 Aug 2022 18:45:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AD20C433C1; Mon, 15 Aug 2022 18:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589135; bh=FlydeP6PYQGyn0AYt0muUhmpUF8x2hn0JEyYh0BdFuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmNx+hm3vrHMvQo/5kewqeVxeAbKrLnqRfSq6ZT6ozYRTlpf0Ch8GYvUPfTovevi3 LnbGpckvS14M84tMW8OoDU3VW8MK3qxSn3MXaxuykkB/vAZw1W0m4iy0FibnZe7Z+u 1IeR+34HfW0LkL0oe+xg5TrbfCslFw4gLgzAep8E= 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.15 623/779] ASoC: fsl_asrc: force cast the asrc_format type Date: Mon, 15 Aug 2022 20:04:27 +0200 Message-Id: <20220815180404.026562897@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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