From patchwork Wed Jul 3 10:36:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811092 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 F2B0613DDBD; Wed, 3 Jul 2024 10:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003058; cv=none; b=M4+zfuYRDX7PDhvVaV1tIueqO/sPn6Lxxfqf9LY5jMegTzjCoTvVh5ObsrrPd5RMoPBOlwKn6NxCHNQ50W24mRYam+JE5eIWLv6SAHZT8gsHleZegxqDQGU8D5wKtSbdrTfeyTQqHyiDhbiU+CZHDghg7JjXuiEuHRwIS1re/QM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003058; c=relaxed/simple; bh=DTuftCsdyHTYXLuPnKToYa/e/4bqNCbejvDMDH3oLCA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rW80CbkxqZnAdmTFr3tXlZl4SY5fZmS8QcIEHnxWCBSdfFzGOgAvmZJrsIhwkLuLMMUDMdCKqy7YPnsqpF7h7JltxVzOb/gPKmNI2vJLnzpSOTtQcV77mSUx4k+FWg3AI9zaan6cyFI6SRnEtRdexL3TyzJtHaajZBCU/PdKdsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=e7Z06DzD; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="e7Z06DzD" Received: by mail.gandi.net (Postfix) with ESMTPSA id 6BA6540009; Wed, 3 Jul 2024 10:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iOQ14xyN4CI0MwaGvACquTtxcpYCfC508bOrtYrOfp8=; b=e7Z06DzD1HcQuX5TerA/2Xsss/y/ZRNpQXK11rzZa7obUz29MA15WorQAg1MKq8nLfH9d0 bbmyIu+yCTBdYrQoxkYKdADdB3aoUvNMXqdixaC6m2rGHUqt5ekuhIfxF3M9RChIKHeQnB V0CBdJ0g7INGyWplrKyBCDD6UASS4bRrfElBF2x4YkjRP4Jr2rlztdNABgz9PEq/+o9dIW ZE+NjmTH9io4Ti1GokZjpq8Gpraec2pfnl7F5jYzQmbiKrEhSZzxpvBC3R03WDqdDf5NMM KHyH3mV7aq4FTjuCFSLk0D+Kyy9H3G4rmyEpTkueNHkwZiCr4RmAeEWVM6UTHA== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:46 +0200 Subject: [PATCH 02/20] clk: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-2-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/clk/clk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8cca52be993f..8ea168c00997 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -5504,14 +5504,12 @@ static int parent_ready(struct device_node *np) int of_clk_detect_critical(struct device_node *np, int index, unsigned long *flags) { - struct property *prop; - const __be32 *cur; uint32_t idx; if (!np || !flags) return -EINVAL; - of_property_for_each_u32(np, "clock-critical", prop, cur, idx) + of_property_for_each_u32_new(np, "clock-critical", idx) if (index == idx) *flags |= CLK_IS_CRITICAL; From patchwork Wed Jul 3 10:36:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811091 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 B8AC3178386; Wed, 3 Jul 2024 10:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003066; cv=none; b=M/OaDwKtALCzWOvtBZFlcIn0MiJzPQ27OxG0WoFvSdkVZAj9VBnvWMtGIWAFHSgQ4Ep6IGCzObA+io8uO6v974FKb6gerW6VubU7Kufa82KSahsW2w7QTxR/sCZJININDso45vKJS6L7cKw1zcU7TQAvYQ0zW4Fpw7aZBnAyLWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003066; c=relaxed/simple; bh=j5j7znmI5fd3w2hwt9/RrT1UaJBOGy5KU1T1L8mUMro=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZUQAf5L6WdpieZaN5xysEH2+4DUr6mRRNgiof04QbkpEkasmBNaKBbXzfxQDRixM6zBUr/cH9UC/airG6Gc859bJklr7Mv0x6yIyPflkpLGi1ihZJUnOPqIz+GPnLbKUGtrTlM3FdMsvL5tPZiiIy5dxlbd8ZTGkMHNpOW1lezQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=hQT95D3u; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hQT95D3u" Received: by mail.gandi.net (Postfix) with ESMTPSA id 63F4940008; Wed, 3 Jul 2024 10:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rSl3CDHUnEkCbFzcda9N1h+bslENch8LOeZ/5QfMN+g=; b=hQT95D3u1VMRIY9xcB1E834k+wK1UnCHPD1+uqs62UJ0G281n+vVWCbTnLIcL5tDXrSGX0 ukrOE06tTmXg6wVVic1Yf1zGDJvxZxPI2cs/Vh2G9Whgnc+CbuHfCZ5r1Y+IfJI3YN9GYH 8eFlmQvV3foLOCuokJlfWVdnjsf2ov4KcybfiiUGmEnTLUhWoxIkSD4AU2A3WdQ0JdEhNU Yw4iTB7EVnyoDn5NNwCxQEsljM1j1WbYUIrPAE0OAYdx5VIF+fs/XKQl2qXueJGuZ497uO xs/dP5ikFWEjtBAsz65ywcc5sPmTSSy+n884HlDWWF6SwE8fKJHq3xSlkJEWLQ== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:48 +0200 Subject: [PATCH 04/20] clk: sunxi: clk-simple-gates: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-4-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/clk/sunxi/clk-simple-gates.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c index 0399627c226a..a30d14937e0b 100644 --- a/drivers/clk/sunxi/clk-simple-gates.c +++ b/drivers/clk/sunxi/clk-simple-gates.c @@ -21,11 +21,9 @@ static void __init sunxi_simple_gates_setup(struct device_node *node, { struct clk_onecell_data *clk_data; const char *clk_parent, *clk_name; - struct property *prop; struct resource res; void __iomem *clk_reg; void __iomem *reg; - const __be32 *p; int number, i = 0, j; u8 clk_bit; u32 index; @@ -47,7 +45,7 @@ static void __init sunxi_simple_gates_setup(struct device_node *node, if (!clk_data->clks) goto err_free_data; - of_property_for_each_u32(node, "clock-indices", prop, p, index) { + of_property_for_each_u32_new(node, "clock-indices", index) { of_property_read_string_index(node, "clock-output-names", i, &clk_name); From patchwork Wed Jul 3 10:36:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811090 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 C49E317B42E; Wed, 3 Jul 2024 10:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003074; cv=none; b=WWhvLyNV12bKNN2djrG8SckWVXgpUOjs2czyvU1o/S+Vq9SSe+fJytuDg+Dt9BkW9+NhwaLX779vWfeJzlrEaSO6xo5711lbLjRLZz90sdIeyEJ33dMDNoOtwO749bdfCGl6OdOG9dPO9hVQ76IsVwgOMaE1rMQV/UtOZQTrOaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003074; c=relaxed/simple; bh=vkqpcuKYEwUWQXFrMVTTiI5ObvrU9oa0sRP6m0t/RAs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CzXbmmVDjYbhcrmTLXOWq/ZsWsDBiapUzwmBLlDVukcIGkob7l5HzGrTJwfnTGvXKiOJPvxrcx37T+HT5kpR+yywFwG9iYM5Obfiha5JWUZmD33DfxiDOH2Hhy9Ap5iGMR6SCAnJIqLwGolWnsrc6HynVCCxw/8RFThoAr3IB5Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=lvyFr1Kg; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="lvyFr1Kg" Received: by mail.gandi.net (Postfix) with ESMTPSA id 676D540002; Wed, 3 Jul 2024 10:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1zHG+kgTAxY6YXuOFQtSuqWr0U2+nyHWGxYZLheatik=; b=lvyFr1KgdlM8fWsBIY5v+NGg/+DCXDRInTjVtnh9n/uT3o0w5TGRzUlsY+e8XghtNV52SL YOQTrE08/uiOUXBQYrDFIL0l6w3tNcK3tXJ6bt6MYni27LjOpYaHsifXseDH2vd+CfNJCF UXSdsCrp/wRv2O1iE6G7+kHhKtpCtkl2vnOOboOh4EAVw5k3osBbyvlh4xD8xAJIxInA+5 YGzXuZHzfxIBDVgarTXjYDUz0mBx18c3Qs69P0XUklXAOpiVJREwZeMhQMMbVcO6VsOMFF 5jIQz1najcx5oDNnP5ihqZI7kny1OxYyxyvNWyNMgEBS+yMKLxQYoLwUkJZe/g== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:50 +0200 Subject: [PATCH 06/20] clocksource/drivers/samsung_pwm: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-6-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/clocksource/samsung_pwm_timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 6e46781bc9ac..b5ae411bc077 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -418,8 +418,6 @@ void __init samsung_pwm_clocksource_init(void __iomem *base, static int __init samsung_pwm_alloc(struct device_node *np, const struct samsung_pwm_variant *variant) { - struct property *prop; - const __be32 *cur; u32 val; int i, ret; @@ -427,7 +425,7 @@ static int __init samsung_pwm_alloc(struct device_node *np, for (i = 0; i < SAMSUNG_PWM_NUM; ++i) pwm.irq[i] = irq_of_parse_and_map(np, i); - of_property_for_each_u32(np, "samsung,pwm-outputs", prop, cur, val) { + of_property_for_each_u32_new(np, "samsung,pwm-outputs", val) { if (val >= SAMSUNG_PWM_NUM) { pr_warn("%s: invalid channel index in samsung,pwm-outputs property\n", __func__); continue; From patchwork Wed Jul 3 10:36:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811089 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 EE60014430D; Wed, 3 Jul 2024 10:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003082; cv=none; b=Bk902aM+Hv/ulcusant1lvjTkW6gy/mjA43Ue1A/yiidSnRuJtyhhl00Kuaea4iqvxyfSVvc0G4q3S77waeQ+mJlviMgV8BIgDHYjoyqpcwsYEHcuzdoO/rq+5Fm9oA7vJodZnjoS4LLG+TNNdm8Fl7b5xFNAwKt5GM/T9bPt7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003082; c=relaxed/simple; bh=Siwwo3GBEP5mTY9Rcl5UPHfZGLF8rw0KZ6wcPCYaSUY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PeP5+EyOZAIzRVUdsgCFgZgMzPHehbUsjZxak3qJDAgXieg8oyB8avwigLJbLM7ubLvTI/5dOPwzNVajEcQPJr9QvlE6EbiyND9jNNWsNDjcn7+2mCWQuhOT4kixn33ZdKCR+/X0KR9tk4dnM4K+VKKJWCs2kLkVnZ8ezKvdKtY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=M1vtRZ/I; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="M1vtRZ/I" Received: by mail.gandi.net (Postfix) with ESMTPSA id 8268640007; Wed, 3 Jul 2024 10:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ObZqIn61RNEy1X0aCEEJcJ3TWqr0KXyZ0h8jl51/dRQ=; b=M1vtRZ/IwZA73ShP/81Am2+1HF7s4FmiDSV9DEbuggRaHcKQERp7OSPzywsZUadCPqsxaR RZ7oCjkG0C8ViUS6anX2ndvvJHX2z7DdcITxSZ12zgS3G5KqbQAXHCT4KkxX9nIVquZUy5 15LLa5bd5PLS4v07vuIgeRs4STDPZtGPsgXPh06/GA6Qudtdx0Fny6/LYyK5olTsct1HMA CU4vip10scfCAV+QM/o2bhZlf4YgKbKpZ2BH1KagdlEV/37l3LzbomatP49hAXtTXvQgU2 EKMDSO4JJomZuAYfInK+g5FgIWtvH9+N8OhUTELm/RUseTXOmmYBYbCHO97pNg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:52 +0200 Subject: [PATCH 08/20] lk: clk-conf: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-8-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/clk/clk-conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c index 1a4e6340f95c..290dd1230bad 100644 --- a/drivers/clk/clk-conf.c +++ b/drivers/clk/clk-conf.c @@ -81,13 +81,11 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier) static int __set_clk_rates(struct device_node *node, bool clk_supplier) { struct of_phandle_args clkspec; - struct property *prop; - const __be32 *cur; int rc, index = 0; struct clk *clk; u32 rate; - of_property_for_each_u32(node, "assigned-clock-rates", prop, cur, rate) { + of_property_for_each_u32_new(node, "assigned-clock-rates", rate) { if (rate) { rc = of_parse_phandle_with_args(node, "assigned-clocks", "#clock-cells", index, &clkspec); From patchwork Wed Jul 3 10:36:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811088 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 542A417FAA2; Wed, 3 Jul 2024 10:38:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003090; cv=none; b=DIMKXFu0gOKe/1AcIAV11ZZyc9cKyqss8mcYq+E3FjYnfEwjtbitVg29YTHR+iC14WYHRG+bu7xtsZZz7zU4dpip/hP71ktFkogUv9xFJ1zH1sN2ItsAuSKdlq9gdVajN71NMCPyaAWqvnMGdM7lwW8shIUFzS3EMAsmm2ag0sA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003090; c=relaxed/simple; bh=tLDf0jN/+OTJID5VEM05S7mVHbzKVdlHVZuoTJIUcFA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h4nc+GmBQTcX6NBTwUvjw3yob9AJOPo/5weJ6rVfJXezEdpcbF0bPdWm2oWzAPTt9veGgAoCQY3MVZDdCTcEObn+NwMfrdvzD5Jvz9G3Hl2ggxe78LlgqVbuG3/BjfifLoUimcMmN4lknRM/uGxHTI8wIglUUvtryWhxILEpDtA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=KDra0sLx; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="KDra0sLx" Received: by mail.gandi.net (Postfix) with ESMTPSA id D3A6A4000B; Wed, 3 Jul 2024 10:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kkDzWgqNUaE82FJnkubFv5bmOm6gl+/qOlOF60MzBZI=; b=KDra0sLx8nTaCo2T20Rc+TTQn6dCftv+NLxXaIVH+RIs1q2YoMq0B82YrEyVgDvGjds6nu RC2jLpfRcLHtf2pR9BxXyBbFfxUIIlp6w5d5IuYUNsHEqb0XXHvrI6eTEkZI8Pao8QkZo1 npSEexxCHK5YjW6udTXDNIQB9KQm5SQTA+Q1D4zyO5QgOyHhdtDJdiG5AWTLN6xyGdm7mn /rWYkwWLKd5725CoTxczcY5BmOKymQHIaEPwiKZRPPwVVLko5kKwiYIOwkX0YkSZs8ExX0 uWjIn4FxLkr+64anVbbkf4GN0HOCjjfWYJVJmVaQxxlx9SayHwzv1TA6Kd/5CQ== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:54 +0200 Subject: [PATCH 10/20] pinctrl: s32cc: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-10-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/pinctrl/nxp/pinctrl-s32cc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/nxp/pinctrl-s32cc.c b/drivers/pinctrl/nxp/pinctrl-s32cc.c index f0cad2c501f7..6aeb93af77ed 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32cc.c +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c @@ -735,9 +735,7 @@ static int s32_pinctrl_parse_groups(struct device_node *np, struct s32_pin_group *grp, struct s32_pinctrl_soc_info *info) { - const __be32 *p; struct device *dev; - struct property *prop; unsigned int *pins, *sss; int i, npins; u32 pinmux; @@ -768,7 +766,7 @@ static int s32_pinctrl_parse_groups(struct device_node *np, return -ENOMEM; i = 0; - of_property_for_each_u32(np, "pinmux", prop, p, pinmux) { + of_property_for_each_u32_new(np, "pinmux", pinmux) { pins[i] = get_pin_no(pinmux); sss[i] = get_pin_func(pinmux); From patchwork Wed Jul 3 10:36:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811087 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 02D3B181B93; Wed, 3 Jul 2024 10:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003098; cv=none; b=aFCJCtNBSMVQ62JTiHKA8AaivEd8lw9Lt3AbftnBqI4/sZBB6NmKajs6www9a9Lrm9HKbJ2Vlsw2WTxmdPjTCKOmDuQp2Pvq741s/eZkKoLNW4B2a+kWZiydAVh+uVSsjVKidHOvJROSXAgglj+waGOIpaMheAcK6sJQuzoe23g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003098; c=relaxed/simple; bh=fGYi73hgDS5Rv5+1Sa5HL9L5zXbbHHgnDvkETXpxFbI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bmypn8LtbV/BKeNt2JJZb201tm8TLUznqwztr7TjcYlxouWtPA86wmrrDi1e/5AP4uqzwGeggfYEDWf1tcH0W1HGOAZOJn585dJs7lPPC8QRA3ROYk1ZhJHo5T42gQ/ngBYQ9xnahjnCiW8Np1T3tar2nsN2y3CXPjKyzZcjNT4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=QjQJZfS3; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QjQJZfS3" Received: by mail.gandi.net (Postfix) with ESMTPSA id E267B40002; Wed, 3 Jul 2024 10:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JB7jnVV90mJW2p0b0n6I13HQQYwTmmWWoFEk/HwlIBA=; b=QjQJZfS3hQSmHwIyTs5N6cWBkKEhVJTnmXxV93K/mH/jCw3bNE8vBVQazsP6i+9s7H/eKZ WQ573YI8LUuy/E7FsVFy7LphtduSQki23ZLleDsQAiHGRYob4mVEeLvvfzWmuC++ENo7GP z56ULB449b1QKqRW49icT0WrmlOIurvHPx95lM4gK0zARettlLCbxHyglvYZt7IuPzQwDZ pPyregDeYjogULkibHX5sMVBCzcCYzEI290IYlZOTNreRVC/JZ9ORcuum4RGJIjQ0j/Tu3 bkDdZHqjZdtRBTwwd8l0pwDZZ+Xl6swWizUKdCrki+QAvN2fUScfyf28Brju6g== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:56 +0200 Subject: [PATCH 12/20] iio: adc: ti_am335x_adc: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-12-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/iio/adc/ti_am335x_adc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 95fa857e8aad..ca0f542ebc77 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -564,13 +564,11 @@ static int tiadc_parse_dt(struct platform_device *pdev, struct tiadc_device *adc_dev) { struct device_node *node = pdev->dev.of_node; - struct property *prop; - const __be32 *cur; int channels = 0; u32 val; int i; - of_property_for_each_u32(node, "ti,adc-channels", prop, cur, val) { + of_property_for_each_u32_new(node, "ti,adc-channels", val) { adc_dev->channel_line[channels] = val; /* Set Default values for optional DT parameters */ From patchwork Wed Jul 3 10:36:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811086 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 206EE183095; Wed, 3 Jul 2024 10:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003106; cv=none; b=TpQaQXvkSroeJFVfMVpVvNCdgunZyBVPcOTrgMa0vdZEo6S/of53rR30STPN5ZjFx+nNC/DI/eppNowCq/LK0zgSyV3JdmROg4bsuFJU8t8ZpLT3m4o7uoOL4mZHnpZffIAjPt3Y9Xez4BNh1Fphgt9P0eNPSoldp9rgGyRxgTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003106; c=relaxed/simple; bh=I9iBNVjeQxL9Gpmd8TxfYsLoUBB81r7M+FReCkPJlx0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sx299AM/21JFAxQAGdbg8kEieEYlO6RV0pyVJIGQ+EJtnToSmMWnzp24DzuzvUe2KiENVUjgFiQ3YqiueVpDksOifqdYjYpG0SBsgmg2BprW138/uaxLdrjbb2PEpvxyo58CWyyBsCRd5awdbHpPICvWQCh2WsRgBppYJMCpgH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=oXUa31OD; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="oXUa31OD" Received: by mail.gandi.net (Postfix) with ESMTPSA id E28834000D; Wed, 3 Jul 2024 10:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=78C35tW4lsYFlY1YR8UtHYwhkc3TnVCBtcNefWaJVZc=; b=oXUa31ODiP9nVQgcAJYvkSJjw3Nl2xFkxoaUzbjkYfoZy0WqW3XM09Ra2i4md0DVO/df0t uzTPi9Mn7rVmhdGD7Y1I3UmO0z3XeaklUDL1qX4csSZO2ZrOFbBlsG9UPGLp+QmqkV+Hoc TRCec4TuUqXAgW/qR2UGILaYaPYt4+pBAtb/OP9thxJesMbY+DSuiw7MnpCGOmmB4MmI3b Km2dkMTd/9bCebKT2xBVzdPVNVEg86RF7Y/XtEw8Yg2UwoWQu7+Z12VU1X/ofhPrafsSC0 0RKAGKrDYJ4h9dTCEnLg/BUsSSq/9f/jPdbkRxLFapx2puNRwIHp/UMj7smt6Q== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:58 +0200 Subject: [PATCH 14/20] tty: sysrq: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-14-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/tty/sysrq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index e5974b8239c9..719376dda5c1 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -770,8 +770,6 @@ static void sysrq_of_get_keyreset_config(void) { u32 key; struct device_node *np; - struct property *prop; - const __be32 *p; np = of_find_node_by_path("/chosen/linux,sysrq-reset-seq"); if (!np) { @@ -782,7 +780,7 @@ static void sysrq_of_get_keyreset_config(void) /* Reset in case a __weak definition was present */ sysrq_reset_seq_len = 0; - of_property_for_each_u32(np, "keyset", prop, p, key) { + of_property_for_each_u32_new(np, "keyset", key) { if (key == KEY_RESERVED || key > KEY_MAX || sysrq_reset_seq_len == SYSRQ_KEY_RESET_MAX) break; From patchwork Wed Jul 3 10:37:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811085 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 4318D1850B1; Wed, 3 Jul 2024 10:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003114; cv=none; b=CfmJIIbTsyr73pxd24vZbabW5ZMR3rnZgKPevILOFX7U1G6wRdiGsTHPMoVcgRMTz4btPKjMLsmUyymisufvlfT0i5bZis7XzS6pnJVcIBdidVuLwG9+iKIcfn5fAVCKJWKzXZJpiNJVyv3d9fuNmmtG/wR6OzGdQlXtWE3E8x4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003114; c=relaxed/simple; bh=UOS2fmRwATRSVcnVizbaJaydeBdam8RNgQgTfEKCaXU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GzWyTKex2IpA8MCV4ZwoahZQaZKNvKJCOBhHk9XjfY+61Lr/5cjfemuMkBhKrn8DJ2jymws7hZq/liO+/wdpBtfgZKLyvuWrBNbbHHz3fW9QtygW+KXUFnwqOs8/MDZkkmRhwwnudBfz7T5r31IN0Wmicx2DayjS/UzX2sInpKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=QHZuw6Oi; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QHZuw6Oi" Received: by mail.gandi.net (Postfix) with ESMTPSA id E4CB84000B; Wed, 3 Jul 2024 10:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=imP4H/ERPSE6KZ0W7q22wukZU6P/ZNa1h2LRRg5LPSE=; b=QHZuw6OixcFOf1fmX7hr0vv6C5X6qtVBD6nwyc/mtaoJV27PNoTaRYDMr1H7OzlZvi4/bT 2YGle6Qhcx2ekS2M2kUmkbY0YflInP7/4aNiheGiNRTI+kIj4ZyHOjuT/iuTTvGttyFTx1 mZHEZour3jCbqjqEbH0udwlKJ7YcYpKFsxC1x6/Ze7kdpU8CZ7qKJxBxWkszlyEzzb6j4u TDWInmuOi4dYzH/pOWH5Nb7Zq+N9j0N0VkB88X9GYj6xQIDu5zvSqSLb0dXuBDfyBQLOey Yp9zkmm43vokpDk/jIF2hByFQDKg4eXCJ84Gqy+i39DwtK9oDiqQ5v8gutjCrg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:37:00 +0200 Subject: [PATCH 16/20] mfd: ti_am335x_tscadc: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-16-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- drivers/mfd/ti_am335x_tscadc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 4bbd542d753e..a2e6112f885f 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -119,8 +119,6 @@ static int ti_tscadc_probe(struct platform_device *pdev) struct clk *clk; struct device_node *node; struct mfd_cell *cell; - struct property *prop; - const __be32 *cur; bool use_tsc = false, use_mag = false; u32 val; int err; @@ -167,7 +165,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) } node = of_get_child_by_name(pdev->dev.of_node, "adc"); - of_property_for_each_u32(node, "ti,adc-channels", prop, cur, val) { + of_property_for_each_u32_new(node, "ti,adc-channels", val) { adc_channels++; if (val > 7) { dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n", From patchwork Wed Jul 3 10:37:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811084 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 5A190187551; Wed, 3 Jul 2024 10:38:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003122; cv=none; b=sqBZn8kwqNHHPBArDWlFWc4wDgAbEqqP1G+g3kNmUslrrabt3JGsXQKcTTVyPUgYNjMUNaIU311m7e/HvsSaEI97IGtcT8H9hPhIho53+pwW1L878dHGTOJANFoUsOpWzuJCMebELlSLz+72RPttfy5BrxJt5yA+f3nUEhEAP0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003122; c=relaxed/simple; bh=ZA1MlZdBI7doZt78PDSBd4igLHTUrxDMaO72gu1vD6I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pGKDuAlBAchUcuDkP/3ejshkaws1zSiworfb3aLMtsNUkEcLgdpcLcLRXMXKzpOsvXjb+Gl+SRta+mFfafig5/2CPoAKB09tHwYH+weClsyVr50YsSlZ83Hraum4hXAg5AGVgeMFSnMGdrpEx6UTPuKhi3AqPLZK3T/QhJ0hGOA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jFdqi5Os; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jFdqi5Os" Received: by mail.gandi.net (Postfix) with ESMTPSA id 18AC440011; Wed, 3 Jul 2024 10:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oMehpDNTeRyaz1zic+l04kLg7AXLrSaEnuPGELbIuZE=; b=jFdqi5OsnQOEYKAlVCxNckkwV8Npp65NBgpjBiqLL7g/ksg2thGvjn9+Ax+I2jTLZgTnQC YVaI76MrWZUOgxVJEDA1IHM6CIfwmMaPul1TkX4/FFliVn1zV3Y6Ojrmz1w5gbn7WRXZ2Y NXfuOsS5q++HwQAgAJDmjuU3CPj9pCe1dRxKpRjNltGurs5MuL/8luLny1NIhi7kgQkLpZ 5gO1z3R/HKqtfEtYkC5ME/AGs6ZXp1zPaDVoFmodU6XfMO3FqvCzbEYHuMaWhpK+eRV0te lUS3ta95c7K7fK0d85HSuLNauUMJw0G4uDvN/JZ0q0YpISfNysTfZ1KdEdJO4w== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:37:02 +0200 Subject: [PATCH 18/20] powerpc/xive: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-18-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com 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 --- arch/powerpc/sysdev/xive/native.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c index 517b963e3e6a..de31a1588303 100644 --- a/arch/powerpc/sysdev/xive/native.c +++ b/arch/powerpc/sysdev/xive/native.c @@ -559,9 +559,7 @@ bool __init xive_native_init(void) struct device_node *np; struct resource r; void __iomem *tima; - struct property *prop; u8 max_prio = 7; - const __be32 *p; u32 val, cpu; s64 rc; @@ -592,7 +590,7 @@ bool __init xive_native_init(void) max_prio = val - 1; /* Iterate the EQ sizes and pick one */ - of_property_for_each_u32(np, "ibm,xive-eq-sizes", prop, p, val) { + of_property_for_each_u32_new(np, "ibm,xive-eq-sizes", val) { xive_queue_shift = val; if (val == PAGE_SHIFT) break; From patchwork Wed Jul 3 10:37:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 811083 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 ACA7D174EFC; Wed, 3 Jul 2024 10:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003131; cv=none; b=r4/INWpD/I9EOj9UDIXdTMaNMby767ttIzrf3cMjwucmSYapYJCK2Z4Vnutd55U36A0crQEhWw8N9ZTKm1KYqR7JMVQWG1Wcxk3pqjGn4xdmsUCAYTZ75j41+OlV9XKKsxM00/KngC4Qd9VsLoNGB+ETHr7KD+YjWbC4+EEluuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003131; c=relaxed/simple; bh=imYEkBXowZEctWnX7RSJaxD8kZRYLJFmccuWAyTSK7w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hZ2gaGvWk4rLmnrliowh1iqj/3YZRPWUPmgcwqPFC7lNG/mQQtdUsPGiuur27Hhc8aJ2r1dE+Xh6ZTLqLibDuCYJTJFyOHCEKTEgesAWowM80FjkFiBoOvYGof5d9pIObXqkAEDjr3S4V0luWQ8L6V0ayVrIpMfdKmZAGcrFrMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=aLctC95x; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="aLctC95x" Received: by mail.gandi.net (Postfix) with ESMTPSA id 42E2C40006; Wed, 3 Jul 2024 10:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Bx2CQCZLnvl2mGaHzoLhHeTCe30chHxVgbi6fu5d+s=; b=aLctC95xt2Q6rMLnoKMX3FJ/PPaRdMHQEBg8Yh4ab3FSY9cbwu/dUFTyd2apLZ20deWbHL p+IzkHN10jVZ1AG9Zn60wT53j8GY4YjZh45RcrSYSRiZO/UmHE3QPIVv0XvnhM2mXl2hWz VOJOVdL5ZPhpZJKh1jWQ96KV9qbUgn5W/5TTMt7H+C2eSDixGWwEKYYBbQX1xXqSkyGHz5 91ju+rAKcnrwNcrolgluBFlh3QFO+/DQF5Wl+7Xbh+KtpnaGIUDYbYcsxewuu+9dpHQeok x6ehLSPvrF/uwBxNqrMB68JqQwCZNKNJ8SkpeUBfTvTBYcpghA0kpCr+80jVbg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:37:04 +0200 Subject: [PATCH 20/20] of: deprecate and rename of_property_for_each_u32() Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-20-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> To: 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?= =?utf-8?q?=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 , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Luca Ceresoli X-Mailer: b4 0.14.0 X-GND-Sasl: luca.ceresoli@bootlin.com of_property_for_each_u32() is meant to disappear. All the call sites not using the 3rd and 4th arguments have already been replaced by of_property_for_each_u32_new(). Deprecate the old macro. Also rename it to minimize the number of new usages and encourage conversion to the of_property_for_each_u32_new() macro in not(-yet)-upstream code. Signed-off-by: Luca Ceresoli --- Notes: * The following files have not been build-tested simply because I haven't managed to have a config that enables them so far: drivers/irqchip/irq-pic32-evic.c drivers/pinctrl/pinctrl-k210.c * These have not been converted yet as they are not trivial, and they will need to use a more specific function that does the lookup they need and returns the result: drivers/clk/clk-si5351.c drivers/clk/clk.c --- .clang-format | 2 +- drivers/clk/clk-si5351.c | 4 ++-- drivers/clk/clk.c | 2 +- drivers/irqchip/irq-pic32-evic.c | 2 +- drivers/pinctrl/pinctrl-k210.c | 2 +- include/linux/of.h | 3 ++- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.clang-format b/.clang-format index db25cde2651a..a91b9bb39d9b 100644 --- a/.clang-format +++ b/.clang-format @@ -569,8 +569,8 @@ ForEachMacros: - 'nr_node_for_each_safe' - 'of_for_each_phandle' - 'of_property_for_each_string' - - 'of_property_for_each_u32' - 'of_property_for_each_u32_new' + - 'of_property_for_each_u32_old' - 'pci_bus_for_each_resource' - 'pci_dev_for_each_resource' - 'pcl_for_each_chunk' diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index 4ce83c5265b8..ff990b15d616 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1191,7 +1191,7 @@ static int si5351_dt_parse(struct i2c_client *client, * property silabs,pll-source : , [<..>] * allow to selectively set pll source */ - of_property_for_each_u32(np, "silabs,pll-source", prop, p, num) { + of_property_for_each_u32_old(np, "silabs,pll-source", prop, p, num) { if (num >= 2) { dev_err(&client->dev, "invalid pll %d on pll-source prop\n", num); @@ -1232,7 +1232,7 @@ static int si5351_dt_parse(struct i2c_client *client, pdata->pll_reset[0] = true; pdata->pll_reset[1] = true; - of_property_for_each_u32(np, "silabs,pll-reset-mode", prop, p, num) { + of_property_for_each_u32_old(np, "silabs,pll-reset-mode", prop, p, num) { if (num >= 2) { dev_err(&client->dev, "invalid pll %d on pll-reset-mode prop\n", num); diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8ea168c00997..aae940c18459 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -5383,7 +5383,7 @@ const char *of_clk_get_parent_name(const struct device_node *np, int index) /* if there is an indices property, use it to transfer the index * specified into an array offset for the clock-output-names property. */ - of_property_for_each_u32(clkspec.np, "clock-indices", prop, vp, pv) { + of_property_for_each_u32_old(clkspec.np, "clock-indices", prop, vp, pv) { if (index == pv) { index = count; break; diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-evic.c index 1d9bb28d13e5..d9aec87f8b59 100644 --- a/drivers/irqchip/irq-pic32-evic.c +++ b/drivers/irqchip/irq-pic32-evic.c @@ -196,7 +196,7 @@ static void __init pic32_ext_irq_of_init(struct irq_domain *domain) int i = 0; const char *pname = "microchip,external-irqs"; - of_property_for_each_u32(node, pname, prop, p, hwirq) { + of_property_for_each_u32_old(node, pname, prop, p, hwirq) { if (i >= ARRAY_SIZE(priv->ext_irqs)) { pr_warn("More than %d external irq, skip rest\n", ARRAY_SIZE(priv->ext_irqs)); diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c index b6d1ed9ec9a3..03acca8b01ef 100644 --- a/drivers/pinctrl/pinctrl-k210.c +++ b/drivers/pinctrl/pinctrl-k210.c @@ -797,7 +797,7 @@ static int k210_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, if (ret < 0) goto exit; - of_property_for_each_u32(np, "pinmux", prop, p, pinmux_group) { + of_property_for_each_u32_old(np, "pinmux", prop, p, pinmux_group) { const char *group_name, *func_name; u32 pin = FIELD_GET(K210_PG_PIN, pinmux_group); u32 func = FIELD_GET(K210_PG_FUNC, pinmux_group); diff --git a/include/linux/of.h b/include/linux/of.h index 756847539384..15c291ab6e71 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -1429,7 +1429,8 @@ static inline int of_property_read_s32(const struct device_node *np, err == 0; \ err = of_phandle_iterator_next(it)) -#define of_property_for_each_u32(np, propname, prop, p, u) \ +/* deprecated - will be removed */ +#define of_property_for_each_u32_old(np, propname, prop, p, u) \ for (prop = of_find_property(np, propname, NULL), \ p = of_prop_next_u32(prop, NULL, &u); \ p; \