From patchwork Wed Jul 3 10:36:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721833 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 1CB2B157465; Wed, 3 Jul 2024 10:37:30 +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=1720003055; cv=none; b=tbYKqN8f4Frl7wbtyZgg11pfXVdDfoolsiJR9Sh2VPFe6xsKb35rHevJt/dgtDngEC7PHzUUJoHYUIi5dyOE93J3sX7zkNAKslG4VnEwepbPI0XXQ2pSCvVv4vw/KpQwQ9BQOj+rxJ1LayEZiEO+m7Ti8qvf2joIpYIOlkA4UQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003055; c=relaxed/simple; bh=JRlOqZSEo2CMRYS8IQRBKMPdUWAm5lV0kV/q8+AIns8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ElEMCJGNtjqR/jGAEdXBncuB2Hy9qIyEvhD3P1EMgWH409Kd7HQw0eAd/yW9q06LAMT4rOaG4f7aD/D1970kNo7FXDYxr7tiuc+KnL24TEcjs7slneeeza21iBVOvz9a+X+JcQvCDXpNcdU7k+csUqXsZwp8iEGay19VUaCkip4= 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=SnP12D1w; 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="SnP12D1w" Received: by mail.gandi.net (Postfix) with ESMTPSA id 73EE740003; Wed, 3 Jul 2024 10:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003049; 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=moEPnxiSi/c1D9xrX6V2cKPTilxyr+PMhbb8iCAH8yw=; b=SnP12D1wMBqz1K2C4ZP0DkuGcdvpvaSCHDwQRfHVaIbo9cTSIG+C3GanMB3Dz8GR1iRJrd qnT046Tf39IN3CmQhaX95SRGYP2nBDEAM5tGTOWFgBSFQDsTd3m/dsrpRU3zhAPEsF5Fl3 jkrXFwskrz4Gh0DqUXLrMHFmuKCKCVO7or2fBHpusUScb+WZVc0lnSMePPEIldt+2+ATel APU1p+k00hbC0js5s0PaqwB0P2+9N6XB0yVYAx/ctq0jtZTiTZeWeHTIt6iQc8ScOmGN8+ /UnjLPcOgpoVK2LpsDsZC2GBUe7tZlqLk8QzpQNhH6KoJ167npVDF16CAtqTyQ== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:45 +0200 Subject: [PATCH 01/20] of: add of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-1-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 The of_property_for_each_u32() macro needs five parameters, two of which are often only used internally by the macro itself (in the for() clause). Now that the kernel uses C11 to build these two parameters can be avoided by declaring them internally. Add a new macro for that, which is meant to eventually replace the existing one. Since two variables cannot be declared in the for clause, declare one struct that contain the two variables we actually need. Since the variables inside this struct are not meant to be used by users of this macro, give the struct instance the noticeable name "_it" so it is visible during code reviews, helping to avoid new code to use it directly. Signed-off-by: Luca Ceresoli --- .clang-format | 1 + include/linux/of.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index ccc9b93972a9..db25cde2651a 100644 --- a/.clang-format +++ b/.clang-format @@ -570,6 +570,7 @@ ForEachMacros: - 'of_for_each_phandle' - 'of_property_for_each_string' - 'of_property_for_each_u32' + - 'of_property_for_each_u32_new' - 'pci_bus_for_each_resource' - 'pci_dev_for_each_resource' - 'pcl_for_each_chunk' diff --git a/include/linux/of.h b/include/linux/of.h index a0bedd038a05..756847539384 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -430,11 +430,9 @@ extern int of_detach_node(struct device_node *); #define of_match_ptr(_ptr) (_ptr) /* - * struct property *prop; - * const __be32 *p; * u32 u; * - * of_property_for_each_u32(np, "propname", prop, p, u) + * of_property_for_each_u32_new(np, "propname", u) * printk("U32 value: %x\n", u); */ const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur, @@ -1437,6 +1435,13 @@ static inline int of_property_read_s32(const struct device_node *np, p; \ p = of_prop_next_u32(prop, p, &u)) +#define of_property_for_each_u32_new(np, propname, u) \ + for (struct {struct property *prop; const __be32 *item; } _it = \ + {of_find_property(np, propname, NULL), \ + of_prop_next_u32(_it.prop, NULL, &u)}; \ + _it.item; \ + _it.item = of_prop_next_u32(_it.prop, _it.item, &u)) + #define of_property_for_each_string(np, propname, prop, s) \ for (prop = of_find_property(np, propname, NULL), \ s = of_prop_next_string(prop, NULL); \ 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: 13721834 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-omap@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:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721835 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 BB8D3174EDF; Wed, 3 Jul 2024 10:37:38 +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=1720003062; cv=none; b=GGKf4l8dpfBsCccWQ99uLEiK78zr3tJ0LGTLOHzOSCf8pvpSbCHQ4xKG67W3ugodhv2k/4ef3qNpLJfteVv5hbFnW0/u+GM7QXsQtmgHLKpPbGZ7ykJ6fnx4AxjYQwX5rXFmx7WYhWFAUzzOdyJeUFJaiOWzmwFZgSWY68HO+Bo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003062; c=relaxed/simple; bh=rtNZnRiWa1jmI3Y6+8iWCBBruHAuuVtSN7QCEAUjhh0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DiWzovYZ5UCmALgfqXMtx43+9o1XJiUbtuJmQXg9MeTZpKmhxwOE7BgdDEYEzabQfS+5njeOTa1UzmY1T9/mLMrbYiGK8J5OaeAgF6rmVzVccoE4gcDTsIZuze/UT8qJ6RfUGbNGSd/y/jeT8dqiUlsMEMO7tCo+FCylTKYLVwU= 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=CGb70O0L; 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="CGb70O0L" Received: by mail.gandi.net (Postfix) with ESMTPSA id 714AB40007; Wed, 3 Jul 2024 10:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003057; 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=rx4+azxs/nr6UN4dbsJ4ODf9UYt0TlbIW0kWebCuftU=; b=CGb70O0LKHcH8JXuy55spACA4E8LSU1InmxWYOYScMS2hs1YLLU2skVvLnutVN2WF1NPHL RPN6+r3bLqcWXGEDa9iqym02HcVIQUVd6Hu7IFw22ugx7l1Bi+ewm0r0FibgVh8trCF9Sz I+dCgIbVyvn9KpMbwFtzeM8VuYEJgEe3RF5/rZLE9v/ga2IcN+OW1Y6MUwT0RGI9MinjsN INdiY7a/ahocLBOYh10W1sqtY6WtH7LnqN1n79lCm4l8vjxreVupuDYNO7cyq4imKsqrAE 3zWphVZXKmEAHYJt7dn1p50FPaTRVrJPzlrkk5D+KbVEeqsvoKIeHs0lE5lDEg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:47 +0200 Subject: [PATCH 03/20] clk: qcom: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-3-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/qcom/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index 48f81e3a5e80..43e4918dc4e9 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -226,11 +226,9 @@ EXPORT_SYMBOL_GPL(qcom_cc_register_sleep_clk); static void qcom_cc_drop_protected(struct device *dev, struct qcom_cc *cc) { struct device_node *np = dev->of_node; - struct property *prop; - const __be32 *p; u32 i; - of_property_for_each_u32(np, "protected-clocks", prop, p, i) { + of_property_for_each_u32_new(np, "protected-clocks", i) { if (i >= cc->num_rclks) continue; 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: 13721836 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-omap@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 Reviewed-by: Andre Przywara --- 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:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721837 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 BFBAE17A5A7; Wed, 3 Jul 2024 10:37:46 +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=1720003070; cv=none; b=Dh4I+sEOOtpyUIHTn8MCvlq2FbJKprsAU2ZHCuettmgEfD4wFveq/inzpNmRvkhW9ZkYkRFhb/EbWqozWvBdA3oQ6f7GhTJ/MK8GOq0wkGUOwAMYhSYhOcVWamLmx8eWcKber1q3ndatMNBtS19LVUB6xriDhfcL0mVEodilbrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003070; c=relaxed/simple; bh=s9vFYXP3nXOAk7cL4g544PIIrJmopU3NhWQWiHJFr6U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c1amoh0nzYUaRwkaI7npmoy8n6c040UUfSRdkRgPe8HAq5cLGbXVDcuPt4o7U7GsX2EMKDshSuyBcCUYfdHx0I1bkf2M+ik9asjJPzHmzQJHU4ZP6B/QgyCaodWmapIneRyqDX8zghI7hDzTbbOkUtwoBePopW7otqAdYwFoiJU= 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=TPCAz/T0; 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="TPCAz/T0" Received: by mail.gandi.net (Postfix) with ESMTPSA id 5EC1A40006; Wed, 3 Jul 2024 10:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003065; 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=EvMBzEn14e6yKk5PjlGvtI8raWMZkyEBi2fnHcWl8HU=; b=TPCAz/T0KUC1JcWljkNS1m/3QQPUV+bEGPxCj8IHbM5VT+MElhk1+4+fNs6/MFLApyfzQI XLJb5BEYNj8uvqWA4kyMPl4VmRum+z/g0Ey74g1rLWcXwUeikXEzM9WDrlRUXnYH6PIW3F Iox3ELMaRCRQsdNxNJSALqvTH7jyOCz3FLcvVMpM8XCWuLzYOPQEJQVgcrzlZkwO8cjQ74 Wy0xJhEAkgSRmRNZfzP0Jh/MXKV5VlDWmYeb0/gSRSP5GeluQZFz3bTg1YW7cvWASusmH7 xWIVXdz5a4TLRvuZ/izHJASIV+zkOOFdhl3RbgDSucxASS+p1shj+JY6WfKcQw== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:49 +0200 Subject: [PATCH 05/20] clk: sunxi: clk-sun8i-bus-gates: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-5-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 Reviewed-by: Andre Przywara --- drivers/clk/sunxi/clk-sun8i-bus-gates.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c index b87f331f63c9..21f036457a86 100644 --- a/drivers/clk/sunxi/clk-sun8i-bus-gates.c +++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c @@ -24,11 +24,9 @@ static void __init sun8i_h3_bus_gates_init(struct device_node *node) const char *parents[PARENT_MAX]; struct clk_onecell_data *clk_data; const char *clk_name; - struct property *prop; struct resource res; void __iomem *clk_reg; void __iomem *reg; - const __be32 *p; int number, i; u8 clk_bit; int index; @@ -58,7 +56,7 @@ static void __init sun8i_h3_bus_gates_init(struct device_node *node) goto err_free_data; i = 0; - 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: 13721838 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-omap@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:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721839 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 9F7EE17B51A; Wed, 3 Jul 2024 10:37:54 +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=1720003077; cv=none; b=PxssgoV7kzmykfwSC4SJt62QKsi74A7Yqq/ZPmAXo6qUNhAGVrbd5VTzf+UdVNdDs7Bs299C9pLjNGckOTusySnFzmsTcuxrqXjsdfY5hszVqn7MosASVVAJW8j4rzqkE7lfc0tFHIwHhFdrJOF+YrCXDRy8y07ZWq7p1xjiTqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003077; c=relaxed/simple; bh=fq9DUV8ZkrGGfr2sPMEi/bzlK5AgIQ455+exy/1Df0k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tdnGtfWfPH2dWkN9nYhWIj3jlKGYfU6n1PpmNF/F6QKoYyEBXUuoC8b4zVFtwCE+tMZpiMmrWYU3ejHp/+0u0wX17Xob0ozM08YEetsWeF+Ep+yDA7s6Jjt3JvcFx4qRiCc6LRKPXib6sHQ6Rc1BSaHe4V5I2oE22hKeka3QOys= 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=mKr+b4Ho; 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="mKr+b4Ho" Received: by mail.gandi.net (Postfix) with ESMTPSA id 7254D40004; Wed, 3 Jul 2024 10:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003073; 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=eb/MG1X9ZyCPKkfMiLJRzBYl1psyg/JqqItzDc7u8oM=; b=mKr+b4HoPQo1Bbt3MDOJiBq9QDRNlzbhJzVl4AeA0Bf+v1zIO3zjJ/lkkLWUl9vVQjJwMj GttRzJh2ll37uZc3T9+da0g8WgP0WK4eBV3Vh0zxip1Vyrqw9JcBUeUdIOgoHNg3KBvJnT +8ed+7bmTxXLLfO8t+hFeawDez5BRpjqW2qGF4j8JnxhgjW/jZ7ECR4H1QVqTgA6x9xaSf mBsmesIOt9vICeLPBULX+Ry1Hki1Qv3FUm4I418GCg27OH8dyMjyOfFD63735uKDyNeZQ2 A1FFEdDsCYFcBwTrZOYROGc6Z8mRxdAtz9zOk9dgBIRpvPyxCrCsgAvEr2f/4A== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:51 +0200 Subject: [PATCH 07/20] bus: ti-sysc: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-7-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/bus/ti-sysc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 8767e04d6c89..3d19777f1e31 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2291,11 +2291,9 @@ static int sysc_init_idlemode(struct sysc *ddata, u8 *idlemodes, const char *name) { struct device_node *np = ddata->dev->of_node; - struct property *prop; - const __be32 *p; u32 val; - of_property_for_each_u32(np, name, prop, p, val) { + of_property_for_each_u32_new(np, name, val) { if (val >= SYSC_NR_IDLEMODES) { dev_err(ddata->dev, "invalid idlemode: %i\n", val); return -EINVAL; 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: 13721840 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-omap@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:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721841 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 034B417DA04; Wed, 3 Jul 2024 10:38:02 +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=1720003086; cv=none; b=aWXR/P/vrOL6fs7wnA9lKnYPO5QWMO2nlfRMrwcB6SBv/5ReG9JACRMoV56HETCZflvnzas22BQh2/7xrRwpmhlN/701Q181GLl4fj6t0BK1Lm08549uHKrafSSl5q6P4HndJIiJ006hUu+hRyyb7MvupZ0JuMS5jIdNI5i2oCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003086; c=relaxed/simple; bh=FiM2tocmKQVG72xvG87Ocg3vkwWai7QxIW/GdxV84YQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EWwFE6gE3F/JCcFYAE7AHUEQRSVGOJA4XQyG0FCH4NxxW7NEB1r1ycHvcYAhcPXMuMYIO8wTzgO9OJp8D0Q6YQqqLNmeAbNstVVL+7bVeHMo3nuGcJMqjjLzzzl7/7w2GHu+JoyLhPq9Wk6XF2syUwmJXTdgOQH3qfoqDw1vC+U= 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=PXSKTR7G; 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="PXSKTR7G" Received: by mail.gandi.net (Postfix) with ESMTPSA id B050440008; Wed, 3 Jul 2024 10:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003081; 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=8VfUyDEnUBHMYjfO4mnvOnujVbzdny+Xmf64Qw4TtE0=; b=PXSKTR7G+vhp1MMTIX4fVICs2eEattO3+fekPacJce4Q3BwGaDyX9bly0M5x71zeAYENq3 L+POg1T5oDgJ4hjGA1TfmlgtRH6J5muhqFmouMew+3B3PVI/kLqFjUiQKFWpabiv6tYatP v13RUSFpPI3eDcNeXOmLySxD2K7vRVyninm9hhPO/ZBUNHKJIgss785QRGfdw8AothmYH9 pA6ARdXWf+WrxVGQR6omvR1D3LW5TRKisC7GFZfe5Wb2Fj5idDzXZ5dzslvY1pKt2PJuEm PgJRmL+vSfc7mtPsMGz+qHi/1PgiwBVfhsgcDcBw5DwdPBozOdPur1QtHlbTCg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:53 +0200 Subject: [PATCH 09/20] gpio: brcmstb: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-9-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 Acked-by: Bartosz Golaszewski --- drivers/gpio/gpio-brcmstb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index 8dce78ea7139..77557bc596cd 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -591,8 +591,6 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) void __iomem *reg_base; struct brcmstb_gpio_priv *priv; struct resource *res; - struct property *prop; - const __be32 *p; u32 bank_width; int num_banks = 0; int num_gpios = 0; @@ -636,8 +634,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) flags = BGPIOF_BIG_ENDIAN_BYTE_ORDER; #endif - of_property_for_each_u32(np, "brcm,gpio-bank-widths", prop, p, - bank_width) { + of_property_for_each_u32_new(np, "brcm,gpio-bank-widths", bank_width) { struct brcmstb_gpio_bank *bank; struct gpio_chip *gc; 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: 13721842 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-omap@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:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721843 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 083FA181304; Wed, 3 Jul 2024 10:38:10 +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=1720003094; cv=none; b=eCemMZsLl9/FT6sq0ImDN5oct0L5D1Bc40YmInsXS0yb6SSl7VNE//pEaa4w5wNSsdEEzvzTNA78UgnG99qv6bSeqrh+7nxQYyWs0xaZLhdLUCQ17VGF09kCu7EQyKj6li1Lu7xnL2AkB4xJSKIiO+PZ4+f8S+NXnYr1VcH5SWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003094; c=relaxed/simple; bh=MWb3iKSy3KuhMAp3Fcz0XaJXmnFKQzA4tbf+M+qvL1I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KdS5omXaffs4dZVl0a00ihcyusx4BXU5nPSe+ILAAFbpYhREfknubFyGxz6C5yvozo9oL/thBeJU3Z11FmT/vnjlPkogNbgHQbEer8PQHDg3FzeuZ8YUT5NEhGGCm/w/YkuOBbjlJUwtjnNqi6dPndnX5HUIzZcMlWxI9i0GZhk= 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=MG5/4/cp; 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="MG5/4/cp" Received: by mail.gandi.net (Postfix) with ESMTPSA id E6DCC4000C; Wed, 3 Jul 2024 10:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003089; 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=m4n9Na9c++gxwPPGLgqtYV2GyYYvNsA2Yt/HwrgABCM=; b=MG5/4/cpLUMYOoTYdFn5GEE4xSFBzFjdeyIQ7Ld1HS4jyQDwPVsZ+sRL0NZJG4V/L8kZmK AgucvPwKtMSRmVMMFP/pyy6BmAd8dH0RIR69LfAGutPOXk4KF/W3VXvSAyQduxnAUBUPwU l6wZER48jsIRJRKiz33tDEYUFGUJy6RCkV/TNP4d5b5SSy7IpASLaQ+r2nHReMZ3eLbjM2 HGa18fhNeNscNVPKqWC9mUCVYrb5FfcvTdaf/U2NNGahQ78hr7yJ98q08+AVuSs0yLA1OB fumgPcFVsUlRIKMhXK5RBPsv4fND81CPBwB7KkNckBhTs8MkFV9Mxy1yBSsghg== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:55 +0200 Subject: [PATCH 11/20] irqchip/atmel-aic: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-11-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 Acked-by: Nicolas Ferre --- drivers/irqchip/irq-atmel-aic-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c index 072bd227b6c6..543ea249df53 100644 --- a/drivers/irqchip/irq-atmel-aic-common.c +++ b/drivers/irqchip/irq-atmel-aic-common.c @@ -111,8 +111,6 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain) struct device_node *node = irq_domain_get_of_node(domain); struct irq_chip_generic *gc; struct aic_chip_data *aic; - struct property *prop; - const __be32 *p; u32 hwirq; gc = irq_get_domain_generic_chip(domain, 0); @@ -120,7 +118,7 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain) aic = gc->private; aic->ext_irqs |= 1; - of_property_for_each_u32(node, "atmel,external-irqs", prop, p, hwirq) { + of_property_for_each_u32_new(node, "atmel,external-irqs", hwirq) { gc = irq_get_domain_generic_chip(domain, hwirq); if (!gc) { pr_warn("AIC: external irq %d >= %d skip it\n", 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: 13721844 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-omap@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 Acked-by: Jonathan Cameron --- 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:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721845 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 0D4FA1822CC; Wed, 3 Jul 2024 10:38:18 +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=1720003102; cv=none; b=LgbOMrcPR9TorjqSNL1buhmqSEr32vKPHpOLHmoWDBopRpZ0s3l9hRN7LfZsEM2WqQ3w5OviJORoSsL9lXmqQdOfEcKWsKcc+ll/YGe/ZmY4F/1EseHwRPrD2jUBjGwcY5CMG4bsySz7mCMkz/Y8U5SHS2OgH2LZq3m3LfpTHk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003102; c=relaxed/simple; bh=8F+2pnZqcbzuv30oTMR83+vxjtItRaeqDfsbeU/W1U8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mDvqhy33AZImbY4aP5Ez9RT0sMWZjU6+qtd+npqdap+Ff11NfXMccG3JLnhIXWPdVaJOULQ0vCHfMZ5rLOVJetVgLJWuVEzMRBSwz9+1DyPKneQR7wgikpXBVtN++dYHI0ipHwyO41wdgtBzD3Qp1h7mhgqgGx6WjjoZzYMVrHc= 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=Ib/PFCUF; 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="Ib/PFCUF" Received: by mail.gandi.net (Postfix) with ESMTPSA id D49E740006; Wed, 3 Jul 2024 10:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003097; 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=dZPPBHSyI/+YbF/9TI9GwF+CUzeEA2RsST6wsDA28Y0=; b=Ib/PFCUFguJgExTJzeLBH/xgT815E4W6OuByXZJoKzK1jTZ0BKQ6yzzGZ+tFwqfA+nCZYT Nmi154RSR+0y3gE4okF0tI41PAeQtJ50AXcE2FBzGNCKJm0u904u7dys+Dc3UYYescC8Zz az7DlTYiLVXAhIJX13CFLr5t+nXUAObbnbENT/513x1OxOrNGXGFixyBZdKaOaECjwQu88 JWAT+gu9maylMym9RKrd330DygX8qEP5aYKWm9bqPbP2r2J/O6+BKDQiocvcfc0vyNX3JR 0Loom3v5nYdkLj1K0iaDilqc1db8vDYfnvgGOk0A6qwaJtrYHrYDqx3ld+tbwA== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:57 +0200 Subject: [PATCH 13/20] pwm: samsung: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-13-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 Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-samsung.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index efb60c9f0cb3..fef02a0b023e 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -510,8 +510,6 @@ static int pwm_samsung_parse_dt(struct pwm_chip *chip) struct samsung_pwm_chip *our_chip = to_samsung_pwm_chip(chip); struct device_node *np = pwmchip_parent(chip)->of_node; const struct of_device_id *match; - struct property *prop; - const __be32 *cur; u32 val; match = of_match_node(samsung_pwm_matches, np); @@ -520,7 +518,7 @@ static int pwm_samsung_parse_dt(struct pwm_chip *chip) memcpy(&our_chip->variant, match->data, sizeof(our_chip->variant)); - 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) { dev_err(pwmchip_parent(chip), "%s: invalid channel index in samsung,pwm-outputs property\n", 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: 13721846 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-omap@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:36:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721847 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 0F71C18413C; Wed, 3 Jul 2024 10:38:26 +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=1720003110; cv=none; b=Y/UUl+JT9tgZRt6sI4n/MpDlQviiuLb0+KudL0REvNt+FmV/G4McfNamWRCaQkAT7Ns+0z7jeRZcVRjRkHvfJzH3vW1OuCy42YV+OnOiMfAnNlAj5ryw7UynymeyjtN2lMhC6/xdvxDWyVXAUJ+x9Sc/HeLloQTI3WA08r0iwTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003110; c=relaxed/simple; bh=c4saLX5wOHczbddVTiiEd/0s56vL0gXhRWmpKJ5Wq00=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lWa3OaB9E5Cpt9yV+rFFNM7I40e8rDF2SRCqcL4zuWmK0piSQRZdXjkbEGUzQ055mICDGWS+Z3yfLhAOT2aPgPsV6PYqmOrtmBn/TR2fZGlcXRjTnzuj8d/fy2TA4qOM9ElIBxWixRtgUF9G9R+Po7wVnor5W29AR1FtAk1fA2s= 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=e+Mq4EaG; 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="e+Mq4EaG" Received: by mail.gandi.net (Postfix) with ESMTPSA id E0AC74000A; Wed, 3 Jul 2024 10:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003105; 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=rOJ5i98/CQuCItGEeFqAsSQmPhPnVLAmT8q3wQ8pUDQ=; b=e+Mq4EaGPKsQtOaL/hcb7BkqlwBkygWkVPvMMP/nz0ny1E/R0XNQ1uuwq/INfgIMdOaiom QMws49a+H6qJRb6Vhxkc4mthDjhkYUZKYLhjkFy8W9llpAdF6qzI3TgpElExLZy1lO7Pg4 Kka5f9FcGAJwuwOWt7NM0RXmmtdmtV1vBE8iQiURX7V73plKan8Vo+gah25l/b9tjEfBo5 ZyvmSpG2FkKKsVRNCIL0rylj+MWjLBdAJ/+gyrPTR7UHN0lp4PHU8yEa/5+Cfm6snx1rY/ wUF6j1XVT2DZvBgXst9mgSHbJZviXQ7n17OPQDV/ocXZWzap2y2no/0H+BuH4w== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:36:59 +0200 Subject: [PATCH 15/20] usb: usb251xb: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-15-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 Acked-by: Richard Leitner --- drivers/usb/misc/usb251xb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 7da404f55a6d..490004dbb9d8 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -382,11 +382,9 @@ static void usb251xb_get_ports_field(struct usb251xb *hub, bool ds_only, u8 *fld) { struct device *dev = hub->dev; - struct property *prop; - const __be32 *p; u32 port; - of_property_for_each_u32(dev->of_node, prop_name, prop, p, port) { + of_property_for_each_u32_new(dev->of_node, prop_name, port) { if ((port >= ds_only ? 1 : 0) && (port <= port_cnt)) *fld |= BIT(port); else 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: 13721848 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-omap@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:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721849 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 47C9818629E; Wed, 3 Jul 2024 10:38:35 +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=1720003118; cv=none; b=BalrjpxTTGLKJzluo5yZQBm+3s45PIpH3MuIgl4V+W6mh2Y8G7g2+M0KI5+Rr3tVc0Qj36/fyJMDENXYTtYu48oC2qFxBtOvOu43dHyLzbuTL0dmXifkWUTES3rUDai12RUdI/zaiDDyX0bdE0KVbJBJKb+qGKHH8qg6pdBmcOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003118; c=relaxed/simple; bh=7YYtT92MBrhUvwr5Xf3auiYyhieH/7rEI4oqnle8qPw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jx6TQ50LQTA3f0QN5a735n7uwS9lDh4Oe5R3Iqafs/fr2dfT0xN2uvUmVoPXLiwFaQ1NYHrT0eQKS5yzTewhCUn0/vs2JV+qHOXke5IewQ6/qNvSiRIi/vmkSeozk2CAHXmiqhxs+oU7kLy+L32PcVglq2T3xiHJuWz5SZojZeA= 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=cPZSrbgY; 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="cPZSrbgY" Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B34140007; Wed, 3 Jul 2024 10:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003113; 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=RU3pzYG6bF53Hk2/xb6Gkld3bSr1k5kQ8wZC1imwq1g=; b=cPZSrbgY1uyHHUyxN4ire6Mmb4TO2Vu4T16Cw0ijX9WtOdQxRVHvR8xZ+jgMpz5IE44inL vII6SqG0BXZ0XbJVzXjYjxMz8zquGtkc7ojMGbf+/xzpe9vPjARGlOsl4Kt/bELXixFXbH 5T4k5i2pHjA7qYSjwFIN2biRcDna40ZV3h1eAQappwyEIKEtCUiI5XdvuyfwdrmtIeJjgC EmXxc3JWVdEIgSVbA2I6p8eyD4T5kYYxryDYm4ngJCNcK71xw65khBJRmgNBswdV/gvQA8 WY/WU4scw62nCs+t+3Qq4YDu8vQayuKSd07TBXf+564kOUKkT1WLhWlM6A8vaQ== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:37:01 +0200 Subject: [PATCH 17/20] ASoC: arizona: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-17-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 Reviewed-by: Richard Fitzgerald Acked-by: Mark Brown --- 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; 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: 13721850 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-omap@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:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13721851 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 A5F861891D1; Wed, 3 Jul 2024 10:38:43 +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=1720003127; cv=none; b=OY9XgVrULktQh2Qo3v7uQSgRjNPEREBq2uZhgMNvj4kZA/ODbWflCSXGL5x1VZjf6dZduqy4nZgSjb5/ChyCw35uNfw5gnuYLVmKLZVhxFprVOp8Nq9GD2XDTa+tq+xpITrhFXcYi/hHPR4uOkYqz2RPOpLiIHvK1DlhDC02wRE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720003127; c=relaxed/simple; bh=bG0q0ufmJP2yodDDmvE7NDm00PnuvAQBPFd/AHfsIKg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IrjFi/k9qXGlwibpOurCLDhQ+EQDZ9SS7skpTERuksWvk9x5z59T8AIuStSS3L1CLsPhunmSLBq5IaQxA9FbZDBxlFG2Wp0fuh7SSpR6GbS5YeGLTwKByn0K1476Xot7MW+uG+hyXrOSLSLQ5EaI5OkWwseU0E0ldw1HHMLeOQo= 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=krq9F3d5; 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="krq9F3d5" Received: by mail.gandi.net (Postfix) with ESMTPSA id 41D1340003; Wed, 3 Jul 2024 10:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720003122; 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=8hUMVYtBkjPdiTzE0TuzO7cuagNMWqN2g5DCdgBLSEk=; b=krq9F3d5fBd6bfy6FrrQ002RWueFPpkeVNZCRwuTg00aWfcsCAo+TqJP4lQX1lNb1wnXx8 8EFt540AMIJBMaxeUFLkQZT4IJffE+hEjvm/KC8c7bvRPvQNpTIO2EjrMZkQXl6020l+ii 3JJCVUB6s9ma44O0w2gRu+DYyEwnCB7wKWEP232QtvdGIGUIWZVUgNnTWwPDH9ook3kbME D1peSErXCT5Jkj8vWWwbbj3NsFjOLFQHq2H5LTJRhcGEPUiywAMdZa3b2WOwjNwo07rHbL UCHQQH7s337h9dfyUpfbcNeOaTH9uKaERBtKoDjD94zwX+pk5NZ396JKb9qCGQ== From: Luca Ceresoli Date: Wed, 03 Jul 2024 12:37:03 +0200 Subject: [PATCH 19/20] powerpc/xive: convert to of_property_for_each_u32_new() Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-of_property_for_each_u32-v1-19-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. In this case only the 'prop' variable can be removed and not 'reg', because 'reg' is used in _previous_ lines of the same function. There is no side effect because the of_property_for_each_u32() macro being removed would anyway write 'reg' bwfore reading its value, and 'reg' is not used in _following_ lines. Signed-off-by: Luca Ceresoli --- arch/powerpc/sysdev/xive/spapr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerpc/sysdev/xive/spapr.c index e45419264391..ffa6ca5db183 100644 --- a/arch/powerpc/sysdev/xive/spapr.c +++ b/arch/powerpc/sysdev/xive/spapr.c @@ -814,7 +814,6 @@ bool __init xive_spapr_init(void) struct device_node *np; struct resource r; void __iomem *tima; - struct property *prop; u8 max_prio; u32 val; u32 len; @@ -866,7 +865,7 @@ bool __init xive_spapr_init(void) } /* Iterate the EQ sizes and pick one */ - of_property_for_each_u32(np, "ibm,xive-eq-sizes", prop, reg, 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: 13721852 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-omap@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; \