From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B1EA13247D; Wed, 3 Jul 2024 11:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720006372; cv=none; b=UTBCxnXDRn1jpKLGLYtbJmn6A7bmM8AfpS9+lCWRtrC//b3M0I4yevjrN16NB1p73Sk7XqSP9t1WVwsKakDouyQANcu3p1VohLUn4pv7C/nsfG5qyD3hNoQM/P6v+RZxFV+xn/xxGY7rAX8L2tBMnaoerQhhZpKeWcfZXredFiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720006372; c=relaxed/simple; bh=vZi55+d/iX+EuvKV8mN+e7KkXuHSSU/Dtl2KCpiRmP0=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=T0J+PHDq3vjFvEMvoy+RlhiAhLmNMUqvqED9MMcftp48Qw9L/wHyacxuVWoYgMPgnCIQahPR2tSiz3SfqwmkVXf9lKxzpydScIPs1IUpzrC//n2xm5ie0kmuKSw8k0qqVSy+yhp0M4/KHu2zd8I5+3OO9lxPMlv/RC/dEU6MZ0E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=nmgAGu9Q; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="nmgAGu9Q" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4636mxjt003511; Wed, 3 Jul 2024 06:31:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=f37i3vEXbnh14lMCwflrH5FfWLKGacpcQ9pw+V8X0GM=; b= nmgAGu9QNNUy+G+YvJbJdLDq3r5Fy6Tlvw22gJFuOhC/HUVavm2zyhCYI2OsrfAU mDwZcEl1Ie0x2Rgl8iIhzLQtM75dpvKeYlXQz4E9/9wzgMOiW1NBymVDkVs0cTmu JrK/H/3DummtYV3aHM2KFCYbKNXUwvtz7SG9OT4cRFAPBEILdNBAos0jQqGiEr3t oi7Em/CxuTdS52KqxbQqLFHVuvcJjnJJi1ZWq5PU7lS2UOXmy0Q0EPAGOj1qBR7M lZ91HcM0b6ZMw/944h0ilF+OF6+f/+KyPnSZdWznrzM0Dnba7pZz4Xv9KWNq0Kg6 bSGAR7m1b6TnrBo5lsVPKg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 402epjd9kx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jul 2024 06:31:30 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 3 Jul 2024 12:31:29 +0100 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1544.9 via Frontend Transport; Wed, 3 Jul 2024 12:31:29 +0100 Received: from [198.90.208.18] (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id E8801820244; Wed, 3 Jul 2024 11:31:28 +0000 (UTC) Message-ID: <0796b481-3eec-4618-b92e-a372b7da5381@opensource.cirrus.com> Date: Wed, 3 Jul 2024 12:31:28 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 17/20] ASoC: arizona: convert to of_property_for_each_u32_new() To: Luca Ceresoli , Miguel Ojeda , Rob Herring , Saravana Kannan , Nathan Chancellor , "Michael Turquette" , Stephen Boyd , "Tony Lindgren" , Bjorn Andersson , =?UTF-8?Q?Emilio_L=C3=B3pez?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , "Florian Fainelli" , "Broadcom internal kernel review list" , Linus Walleij , Bartosz Golaszewski , "Jonathan Cameron" , Lee Jones , Shawn Guo , Pengutronix Kernel Team , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Greg Kroah-Hartman , Jiri Slaby , "Richard Leitner" , Liam Girdwood , Mark Brown , Nicolas Ferre , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Damien Le Moal CC: "Peng Fan (OSS)" , Thomas Petazzoni , , , , , , , , , , , , , , , , , , References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> <20240703-of_property_for_each_u32-v1-17-42c1fc0b82aa@bootlin.com> Content-Language: en-GB From: Richard Fitzgerald In-Reply-To: <20240703-of_property_for_each_u32-v1-17-42c1fc0b82aa@bootlin.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: CFz_RdAJOFjMU2QBvo3bIc4bvB6lzh5q X-Proofpoint-ORIG-GUID: CFz_RdAJOFjMU2QBvo3bIc4bvB6lzh5q X-Proofpoint-Spam-Reason: safe On 03/07/2024 11:37, Luca Ceresoli wrote: > Simplify code using of_property_for_each_u32_new() as the two additional > parameters in of_property_for_each_u32() are not used here. > > Signed-off-by: Luca Ceresoli > --- > sound/soc/codecs/arizona.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c > index 7434aeeda292..1a64b9815809 100644 > --- a/sound/soc/codecs/arizona.c > +++ b/sound/soc/codecs/arizona.c > @@ -2786,15 +2786,13 @@ int arizona_of_get_audio_pdata(struct arizona *arizona) > { > struct arizona_pdata *pdata = &arizona->pdata; > struct device_node *np = arizona->dev->of_node; > - struct property *prop; > - const __be32 *cur; > u32 val; > u32 pdm_val[ARIZONA_MAX_PDM_SPK]; > int ret; > int count = 0; > > count = 0; > - of_property_for_each_u32(np, "wlf,inmode", prop, cur, val) { > + of_property_for_each_u32_new(np, "wlf,inmode", val) { > if (count == ARRAY_SIZE(pdata->inmode)) > break; > > @@ -2803,7 +2801,7 @@ int arizona_of_get_audio_pdata(struct arizona *arizona) > } > > count = 0; > - of_property_for_each_u32(np, "wlf,dmic-ref", prop, cur, val) { > + of_property_for_each_u32_new(np, "wlf,dmic-ref", val) { > if (count == ARRAY_SIZE(pdata->dmic_ref)) > break; > > @@ -2812,7 +2810,7 @@ int arizona_of_get_audio_pdata(struct arizona *arizona) > } > > count = 0; > - of_property_for_each_u32(np, "wlf,out-mono", prop, cur, val) { > + of_property_for_each_u32_new(np, "wlf,out-mono", val) { > if (count == ARRAY_SIZE(pdata->out_mono)) > break; > > @@ -2821,7 +2819,7 @@ int arizona_of_get_audio_pdata(struct arizona *arizona) > } > > count = 0; > - of_property_for_each_u32(np, "wlf,max-channels-clocked", prop, cur, val) { > + of_property_for_each_u32_new(np, "wlf,max-channels-clocked", val) { > if (count == ARRAY_SIZE(pdata->max_channels_clocked)) > break; > > @@ -2830,7 +2828,7 @@ int arizona_of_get_audio_pdata(struct arizona *arizona) > } > > count = 0; > - of_property_for_each_u32(np, "wlf,out-volume-limit", prop, cur, val) { > + of_property_for_each_u32_new(np, "wlf,out-volume-limit", val) { > if (count == ARRAY_SIZE(pdata->out_vol_limit)) > break; > > Reviewed-by: Richard Fitzgerald