From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5766DC433EF for ; Wed, 4 May 2022 15:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343987AbiEDPpl (ORCPT ); Wed, 4 May 2022 11:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233791AbiEDPpk (ORCPT ); Wed, 4 May 2022 11:45:40 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86621BB6; Wed, 4 May 2022 08:42:03 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5C93640012; Wed, 4 May 2022 15:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1651678921; 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; bh=2uwE18lvQXGT+MV4DaiAsxn2e6wCWwqahOsIaa5OmaM=; b=dpXoNiNnHoTEgi2anyHIOlRxTKdUdoCcBE4AOUNKSbZ7q4lmtUqAcbev/Hn2l0PkyBslQy K3dXSLM0m95kki4zL31F1DZLzLuFzgSPE1GotvHNbqLb+IJv0RQPB96+PF5NmFpXco8Hjg sHLALex2BxwPMY3KS/FHok0EBEyVhw3JUwxO/Y6GzlS24WJ3COpoHDNyFHidj+qvNdYbGg RJGJCJXcUvYZKT6aSW/57wGku2rLotH6CGwbLoTNrfUwKcPb6h0PgyrBKUXSWeNv6f4tlo c5VtSkchhavu64cUsgDcZ1xJVJJh3qINYafdcb5G+GrpPTE9B62W67+FeGJseA== From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rob Herring , Frank Rowand , Nathan Lynch , Laurent Dufour , Daniel Henrique Barboza , David Gibson , Andrew Morton , David Hildenbrand , Ohhoon Kwon , "Aneesh Kumar K.V" , YueHaibing Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni Subject: [PATCH 0/3] of: add of_property_alloc/free() and of_node_alloc/free() Date: Wed, 4 May 2022 17:40:30 +0200 Message-Id: <20220504154033.750511-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to be able to create new nodes and properties dynamically from drivers, add of_property_alloc/free() and of_node_alloc/free(). These functions can be used to create new nodes and properties flagged with OF_DYNAMIC and to free them. Some powerpc code was already doing such operations and thus, these functions have been used to replace the manual creation of nodes and properties. Clément Léger (3): of: dynamic: add of_property_alloc() and of_property_free() of: dynamic: add of_node_alloc() and of_node_free() powerpc/pseries: use of_property_*() and of_node_*() functions arch/powerpc/platforms/pseries/dlpar.c | 51 +----- .../platforms/pseries/hotplug-memory.c | 27 +-- arch/powerpc/platforms/pseries/reconfig.c | 44 ++--- drivers/of/dynamic.c | 160 +++++++++++++----- include/linux/of.h | 25 +++ 5 files changed, 166 insertions(+), 141 deletions(-) -- 2.34.1