Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3086177rwb; Mon, 15 Aug 2022 17:47:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR7x5TqVnLb1yBUchsSIfV+uyAh6q0c3PvCRI6/WM08MbKsc3mCAaQMORNjGRX8bYmXldL5L X-Received: by 2002:a17:907:a218:b0:731:2b2b:f34 with SMTP id qp24-20020a170907a21800b007312b2b0f34mr12005622ejc.404.1660610850998; Mon, 15 Aug 2022 17:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610850; cv=none; d=google.com; s=arc-20160816; b=LFAwjyEFS56sml9iHTYLR08svydoB+z+qQeBNILGBoBuCe5bfyFde4J11F1LbS319C Bpdia/myMRgnOH26svdCpToL5aBryJeOkHF+oREumNz/Y7mMX47ImQzwj5f/xKVlTY6S RSMJxw397ppWto9ZN0YFvlqDK/0W4zGDmP5SQovxEK4dDK57K9dCzRIRI9YUqc96LqaV BbDpdizFOAHN8Mt+yB5SZANvUTM4zuCnew7q/Qqw3HW99ovCdYv8tru8TAZjQWRsoAfR Ta2FnX/O1n+Q8y4+rf/54+pmphDEdW9itTqcVgW8AjMgoJ6uwt2jIagdpwNsQ9eNWt1K dhgQ== 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=dmjT1fq9Bdh1nMEhE0No4sMAvhnv3fPaN7gW6rUcGuU=; b=ZmCr8UytawMRiWQkqTeyGb3Ln2g8Vl/ZwAeJ+krBnLa90dVFuhlgJNv071FRCDO393 +uv7GD2Cv7VyPDO/Ik6YrBdm1J0U4LPARYxDmqGVKaOvR+fUDjFbVe6dnY9bcNG9qgY4 LiCjslMZGfHJAEt5vv6Mj6AtFqXCbrZ8Q6agm7r72qpLX96K+gHZpV/G/WCs0g/0a+Bs 5LqGr6i0QMn45vcdihvpMgjBwhJWpmNJr1zIOYQYDL2+uWNo42vj2EnkfwYfFs/w0wg0 jh57FPzRzwSaVxqWYRJLGqqs79m34yrpWgyi7LOCVDejTXOTOgoUVT2PFqi60L8syc+m /9jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iZVB/zn3"; 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 y2-20020a056402440200b0043be7b8aebcsi9521633eda.97.2022.08.15.17.47.03; Mon, 15 Aug 2022 17:47:30 -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="iZVB/zn3"; 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 S1351695AbiHOWqR (ORCPT + 99 others); Mon, 15 Aug 2022 18:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351381AbiHOWnm (ORCPT ); Mon, 15 Aug 2022 18:43:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74C787C53B; Mon, 15 Aug 2022 12:52:33 -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 EA82DB80EAD; Mon, 15 Aug 2022 19:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4414EC433C1; Mon, 15 Aug 2022 19:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593150; bh=6WQcaD39Z7X1fJpxXq9yMC2ENvQGk6DSE/u5decyplU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iZVB/zn3h1zmuAkHN0cOhbFNqC6lOY4UYltqOAYSIxIdojR/1RuYaioi5WQwk1VaN /yBPwuYecqAK5tFNd+p7//s59f5DevmbHTbEPyHJWesnRbHyXfO7CWN9p9/nZ+fZ0Z HNx5nbD4f+E8jmm0mf2hWdN11PKM1AT7HWMtkdK4= 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 0903/1095] ASoC: imx-card: use snd_pcm_format_t type for asrc_format Date: Mon, 15 Aug 2022 20:05:02 +0200 Message-Id: <20220815180506.658906582@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 409a8652e909e323c715f3088e6c3133e37c8881 ] Fix sparse warning: sound/soc/fsl/imx-card.c:653:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:653:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:653:59: sparse: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/imx-card.c:655:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:655:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:655:59: sparse: got restricted snd_pcm_format_t [usertype] Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1658399393-28777-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/imx-card.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index c0eb218a254b..4a8609b0d700 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -118,7 +118,7 @@ struct imx_card_data { struct snd_soc_card card; int num_dapm_routes; u32 asrc_rate; - u32 asrc_format; + snd_pcm_format_t asrc_format; }; static struct imx_akcodec_fs_mul ak4458_fs_mul[] = { @@ -474,7 +474,7 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); snd_mask_none(mask); - snd_mask_set(mask, data->asrc_format); + snd_mask_set(mask, (__force unsigned int)data->asrc_format); return 0; } @@ -493,6 +493,7 @@ static int imx_card_parse_of(struct imx_card_data *data) struct dai_link_data *link_data; struct of_phandle_args args; int ret, num_links; + u32 asrc_fmt = 0; u32 width; ret = snd_soc_of_parse_card_name(card, "model"); @@ -639,7 +640,8 @@ static int imx_card_parse_of(struct imx_card_data *data) goto err; } - ret = of_property_read_u32(args.np, "fsl,asrc-format", &data->asrc_format); + ret = of_property_read_u32(args.np, "fsl,asrc-format", &asrc_fmt); + data->asrc_format = (__force snd_pcm_format_t)asrc_fmt; if (ret) { /* Fallback to old binding; translate to asrc_format */ ret = of_property_read_u32(args.np, "fsl,asrc-width", &width); -- 2.35.1