Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3260152rwb; Mon, 15 Aug 2022 22:34:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR498QxMd1kEnFPDUgPOhLK48/xT9JjHQiRb5yRb503bKMCLsvV3EBjGAHeVLRPz3D0WRndr X-Received: by 2002:a17:903:32ca:b0:16f:1c87:9ecd with SMTP id i10-20020a17090332ca00b0016f1c879ecdmr21090337plr.54.1660628065967; Mon, 15 Aug 2022 22:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628065; cv=none; d=google.com; s=arc-20160816; b=gaJD0g9lvjSl0jCndlZIwkrPBnv0tLc59EBCoBrZDrRY7+F5ohMxkHKm2I1pRlDGo7 ak+SaM+quUEfsltxTl3Xp+vi8pLHgQTl61Q5swX4VajtKz0eiCdXvOToMWDBCCwLPotC GWrPTZwI06RaJE2yx4KZ1zBSEWmCG9LNv0SBRReKqWXBOobpNW7nPOekXt0NvsOrIBcg 0UUP0VC1jSkedTVdhkTfdjIitg2lK1nmhgwb1dSwp1ydsOtBbZzH1+OOh8FCk6Y7UoN6 lySa9GTp9iPo1NVYrx80TtUKxws5KkvEbYiodTEPSIInCUvvYlM0WWR82Qna3tFLjmbo 8/kg== 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=17T4Gn+HthiW8lFV0GDYajoczyl4lrcyRzGDlyG4IrM=; b=kX+nRiN0jvNrX4ZYoJtsyeyw0RnHpA5UQVHzYV0g0wRO4xaLwMb0KzwReqEMT9m7JN GZDP8pSZo2c7OxM8TsrGUJ6P2FtE/z6+DaUi4BW3GN56FMZPfmLpozd0J7o2Jsa95eaC QoOI5IZ9MFE6R99aYnFjwUokI12EDcMMCqU4fmydaoHhl/urtBmnMr40BdwRmrgpjs77 r+GB3J2mHmpRZ5NurJS+Aeiy+N7fzGov/n8EdodEKSHH5Js828dg5SWZSgOKx+qdNzhM 4FSsEAuPcvxoaw+mwpO5gCQEP+2+xn7H/TG6qbOiwUKNPyCzgH2ouoYI+2RyniVXB/8s dxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LGfDIRoQ; 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 j1-20020a63fc01000000b0041b539aec98si12211077pgi.816.2022.08.15.22.34.14; Mon, 15 Aug 2022 22:34:25 -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=LGfDIRoQ; 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 S232877AbiHPEwk (ORCPT + 99 others); Tue, 16 Aug 2022 00:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232889AbiHPEsj (ORCPT ); Tue, 16 Aug 2022 00:48:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6D2BCD538; Mon, 15 Aug 2022 13:43:46 -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 ams.source.kernel.org (Postfix) with ESMTPS id 29650B80EAD; Mon, 15 Aug 2022 20:43:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0406CC433C1; Mon, 15 Aug 2022 20:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596223; bh=oZGOCMV2dnlc2c/xaoUlqt5cyP+8PuLV7tdYjOkXkgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LGfDIRoQJHtMEzs5lidcnuH+edM10NetBMRUa7pp6Euk7y9005xa0Ku/MA+OK/dUI K8+26nOosSlMfADZzcGohAtdZ8amn8GPpaKj4jIKX/o1jtRnMz/pdfLvrpSqIEEONK na0vy6cyYEi5CNZiZ5gFXmmTYk5/3l4XzNbEufFA= 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.19 0978/1157] ASoC: fsl_asrc: force cast the asrc_format type Date: Mon, 15 Aug 2022 20:05:34 +0200 Message-Id: <20220815180518.860319842@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 20a9f8e924b3..aa5edf32d988 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