Message ID | 20230801-dt-changeset-fixes-v3-0-5f0410e007dd@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp1964926vqi; Sat, 19 Aug 2023 04:18:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHv40gTEIqqHs6q1jAc0Zv47H1fz//UwvrzYvFLoqiqK4QO4ot/EVjVjPYSAhicZjPrqFy X-Received: by 2002:a05:6808:14c4:b0:3a8:4d1f:9da5 with SMTP id f4-20020a05680814c400b003a84d1f9da5mr942672oiw.31.1692443914994; Sat, 19 Aug 2023 04:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692443914; cv=none; d=google.com; s=arc-20160816; b=LTiocIpcLeL67U8yVAi1/pjVKIajNfkTmexsVyyvDQQrFAHhaArU9G6FcL2oZWXiER tTIYF1cx1GLBBUTt7qtzAx7qZ+AhgsPZWFH7GEASlQL5lfh7xgUVaKrULUghTGzwu3Ba wlgRJZTf9ulgmCSMPzYsBT17wsyeCHsWJA1heUnwpgmuMFZz1494AXTf+e3d7Al66ipf cmfqv75u1LE5XL4rJDBoBxxrPN0SvDX60MLQfiS2nfh3xnCKMropZVq0yj6CwF2fioes pHMSCfm7yX4jgIErpOZBm+Ni+pqP7vIiuv2UtsacJqUiHV3mZKs42pN4OwLoj72/FFGC zzIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=M5fYweQLscE7F8GCSxP7YR+UhEMv9N1jO+zLnikeFYQ=; fh=9muYjwzOjeujIiOiqgEm7G2SJDFzcm638Q1NXjJ2Sec=; b=ar4wwnzUbQv8qrf5VmCt3d1ricqbTfvPCtbj1CiKwKKsQNihMoNpXtryMStiKHrlKk /K+i4+KnA8oVYAFPrZ+ZFJ7QV3k7mi22WVWdsYMziF4xnIguO29dQXMhy0zqW6I4DNFq fHU1bcGGM12Y/2WGFdRE3bDxACXrk12AkVwXDan30udVG/DnF8KV/YfxnwIwaX3+DraX Ty22nYnBnJk6nxu+YUOESLVvHO+mcleWeFgZ0JcIMWWtthsvrdbNEXgqJ0QRr74JNGm/ jPLJJyhNHrSjejzHJz/i2Um1d806++42oW5foCWMdd3VJ/aQyW/X5bAJhGWMp9wI/KJg nlQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tsL8mpeb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id js13-20020a17090b148d00b0026b6a7d9e43si3297544pjb.14.2023.08.19.04.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 04:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tsL8mpeb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C515C603C9; Sat, 19 Aug 2023 01:33:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380004AbjHRUlS (ORCPT <rfc822;somadevkernel@gmail.com> + 99 others); Fri, 18 Aug 2023 16:41:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379996AbjHRUlM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 18 Aug 2023 16:41:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C90D13C3E; Fri, 18 Aug 2023 13:41:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F3C2617F0; Fri, 18 Aug 2023 20:41:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F32F9C433C8; Fri, 18 Aug 2023 20:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692391268; bh=WE9GdKedY0emopTr/mvPIRbpVTkJ4T2T0VGKmW2AUj0=; h=From:Subject:Date:To:Cc:From; b=tsL8mpebVofrk6FU/aaLpACk29i5Wol9y5KH6cB/ATjfKJrgdAr2r1CMqg1gjpNda fI9OfgixKd1wVndkv6P4NNKkSOu5aA9/fxYN2MFJzp2C3Ut0hXl6sjAF3+46f+cDsg gP39yjgEtfRf/MMmwuSsVWM5Gj8r6ow2OmJ3+beskXnfEqhK5fb2DF68L90zZBBXCk 6ohm9a0qsQBg/dKgjxPaPEdz1AZns/kIKbMMF91R6Rz1ssCmlNVEUwuvbdylx4uo9G d3YY+Sc9UR0ABjS2aPtT4y+JjzlxIJe6If8rSr5FHeAo/JSxqdGFDtDKZQFRy2s68S xMeJv20433ZfA== Received: (nullmailer pid 545135 invoked by uid 1000); Fri, 18 Aug 2023 20:41:06 -0000 From: Rob Herring <robh@kernel.org> Subject: [PATCH v3 0/6] dt: changeset fixes and cleanups Date: Fri, 18 Aug 2023 15:40:55 -0500 Message-Id: <20230801-dt-changeset-fixes-v3-0-5f0410e007dd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFfX32QC/4WOyw7CIBBFf8WwdiwPa6sr/8O4KDC0pIYaIKSm6 b8LdeVGl3duzrmzkIDeYiCX3UI8Jhvs5HIQ+x1RQ+d6BKtzJpxyQVvKQEf4FAEjGDtjANmcZNs aVOooSAZlFxCk75waCjpOvq90rBzOsdRPjxuXu9s958GGOPnX9kJi5fpzLTGgIGtOBQqjODfXE b3DxyHPkOJL/L+DZ4fisqGsbs4a8cuxrusb68xrOhgBAAA= To: Frank Rowand <frowand.list@gmail.com>, "Enrico Weigelt, metux IT consult" <info@metux.net>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Petr Mladek <pmladek@suse.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Geert Uytterhoeven <geert+renesas@glider.be> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774656070591152710 X-GMAIL-MSGID: 1774656070591152710 |
Series | dt: changeset fixes and cleanups | |
Message
Rob Herring
Aug. 18, 2023, 8:40 p.m. UTC
Geert's locking fix[1] prompted my closer look at
__of_changeset_entry_apply() and related functions. The result is a
couple of fixes I found and some refactoring that unifies the "old
dynamic API" and the changeset API implementations.
[1] https://lore.kernel.org/all/c593d8389352c574b5be69d4ca4810da13326a50.1690533838.git.geert+renesas@glider.be/
Signed-off-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- Drop print changeset entry pointers
- Add bounds check for action value
- Further rework deadprops helper to remove a property from either list
- Keep existing style for deadprops loop
- Link to v2: https://lore.kernel.org/r/20230801-dt-changeset-fixes-v2-0-c2b701579dee@kernel.org
Changes in v2:
- Rework debug printing to fix issues with pr_debug() not having a
return value with dynamic debug
- Split action print refactoring into separate patch from fix
- Make removing property from deadprops a helper function
- Rework __of_add_property()/__of_update_property() exit code
- Link to v1: https://lore.kernel.org/r/20230801-dt-changeset-fixes-v1-0-b5203e3fc22f@kernel.org
---
Rob Herring (6):
of: unittest: Fix EXPECT for parse_phandle_with_args_map() test
of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock
of: dynamic: Refactor changeset action printing to common helpers
of: dynamic: Fix race in getting old property when updating property
of: dynamic: Move dead property list check into property add/update functions
of: Refactor node and property manipulation function locking
drivers/of/base.c | 92 +++++++++++++++++-------------
drivers/of/dynamic.c | 153 +++++++++++---------------------------------------
drivers/of/unittest.c | 4 +-
3 files changed, 88 insertions(+), 161 deletions(-)
---
base-commit: 66a4210bc82e024e6de0f94298ad9230984a5924
change-id: 20230801-dt-changeset-fixes-b76b88fecc43
Best regards,
Comments
Hi Rob, Thanks for the update! On Fri, Aug 18, 2023 at 10:41 PM Rob Herring <robh@kernel.org> wrote: > Several places print the changeset action with node and property > details. Refactor these into a common printing helper. The complicating > factor is some prints are debug and some are errors. Solve this with a > bit of preprocessor magic. > > Signed-off-by: Rob Herring <robh@kernel.org> > --- > v3: > - Drop printing changeset entry pointers I think it would be good to mention this in the actual patch description, too. > --- a/drivers/of/dynamic.c > +++ b/drivers/of/dynamic.c > @@ -598,7 +568,7 @@ static int __of_changeset_entry_apply(struct of_changeset_entry *ce) > unsigned long flags; > int ret = 0; > > - __of_changeset_entry_dump(ce); > + of_changeset_action_debug("applying: ", ce->action, ce->np, ce->prop); s/applying/apply/ ? The rest LGTM, so Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert