From patchwork Tue Oct 17 01:17:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 10011013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACAC360211 for ; Tue, 17 Oct 2017 07:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E46A2871D for ; Tue, 17 Oct 2017 07:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92FA22876A; Tue, 17 Oct 2017 07:37:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2A0882871D for ; Tue, 17 Oct 2017 07:37:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 383F96E5EA; Tue, 17 Oct 2017 07:35:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 831186E56A for ; Tue, 17 Oct 2017 01:18:11 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id b11so112910pgn.12 for ; Mon, 16 Oct 2017 18:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zxfLElnPI+lls7EFcik683Rnsy7tcOpk2BAfSegbJkI=; b=YJFNW7HrJ7Ou9q9W0NXw73llEdZ43dflCH8fXnqFtobtrWr2cAJqX2G01AHDADmQJR NSR61+8vkFMQ5wZANYqp/jgQzroyqyuFW/zxfx0U//zdoNWLN9VZX09nLB3zE5ANzdKv lZGrJ9G9S4dFYGaG+5T95oA1v1ywYba6oj4ZCIWBOsi6NlmCmZXykAOm0PulSzxHUGKo tsyvNMk3kaROipgfmnazDZvOg9u9yG46AyRCnuHz5Tbq1esbJ3FjV7V5/iMTU/dn/jqe R3MnDZaXioaZdRawNDut7s0Gh7kVIt7EJqkB+kfTpM1L7zF1kEhBh8ZKw2z3ErVyJ+/E hx2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zxfLElnPI+lls7EFcik683Rnsy7tcOpk2BAfSegbJkI=; b=s3pk0Ktas8m8ZvGQ7I+EgWuFNsDoopsJubwJQYPWzzfoCPeaFHmCVgFSEoG1Rdcszd 4rSA/QBlfeiIi9dpwxhBWT42mKrBgLwEIY0MoQh1TawC+6zEroie3GygWAkMiCEwJv05 IHeVTNokvntw+1kVuagkPMu7o8fuv3fAmJl11LoMWlXj/L0SZc6Gph8QrpllPbaNrNd+ wEIcz5mx1k2NmYdOM1+9bwtLIr8ClA3v+6mK04KY5rxVHLu8g/Pz+xuOiAdkVHmvBFvz HTg3NwU6AhmSckfVnSSKvoupGCv8nY7yQCu59olXky6f7TwI7olzLy8tY3R+Jmn66+dN S57A== X-Gm-Message-State: AMCzsaXGbwK9kvCT6y76Fe89bVbRCbgpuprl2WwjhTf0m3Ip44gchecw LcGaLsndAEoHJxlbWqcdm7s= X-Google-Smtp-Source: AOwi7QBwaUjmpRKj/Hfc22aITlXn91sM8V85jkzVT3inRVZe4GFRM7KmIHgNo7NQj8XqJS1eCr5noA== X-Received: by 10.98.131.197 with SMTP id h188mr10071710pfe.224.1508203090926; Mon, 16 Oct 2017 18:18:10 -0700 (PDT) Received: from localhost.localdomain (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id f1sm16874283pfe.150.2017.10.16.18.18.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Oct 2017 18:18:10 -0700 (PDT) From: frowand.list@gmail.com To: Rob Herring , Pantelis Antoniou , David Airlie , Jyri Sarha Subject: [PATCH v2 04/12] of: overlay: rename identifiers in dup_and_fixup_symbol_prop() Date: Mon, 16 Oct 2017 18:17:46 -0700 Message-Id: <1508203074-26917-5-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508203074-26917-1-git-send-email-frowand.list@gmail.com> References: <1508203074-26917-1-git-send-email-frowand.list@gmail.com> X-Mailman-Approved-At: Tue, 17 Oct 2017 07:35:19 +0000 Cc: Mark Rutland , devicetree@vger.kernel.org, Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Rowand More renaming of identifiers to better reflect what they do. Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 397ef10d1f26..c350742ed2a2 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -90,17 +90,29 @@ static int overlay_notify(struct overlay_changeset *ovcs, return 0; } +/* + * The properties in the "/__symbols__" node are "symbols". + * + * The value of properties in the "/__symbols__" node is the path of a + * node in the subtree of a fragment node's "__overlay__" node, for + * example "/fragment@0/__overlay__/symbol_path_tail". Symbol_path_tail + * can be a single node or it may be a multi-node path. + * + * The duplicated property value will be modified by replacing the + * "/fragment_name/__overlay/" portion of the value with the target + * path from the fragment node. + */ static struct property *dup_and_fixup_symbol_prop( struct overlay_changeset *ovcs, const struct property *prop) { struct fragment *fragment; struct property *new; const char *overlay_name; - char *label_path; + char *symbol_path_tail; char *symbol_path; const char *target_path; int k; - int label_path_len; + int symbol_path_tail_len; int overlay_name_len; int target_path_len; @@ -126,18 +138,18 @@ static struct property *dup_and_fixup_symbol_prop( target_path = fragment->target->full_name; target_path_len = strlen(target_path); - label_path = symbol_path + overlay_name_len; - label_path_len = strlen(label_path); + symbol_path_tail = symbol_path + overlay_name_len; + symbol_path_tail_len = strlen(symbol_path_tail); new->name = kstrdup(prop->name, GFP_KERNEL); - new->length = target_path_len + label_path_len + 1; + new->length = target_path_len + symbol_path_tail_len + 1; new->value = kzalloc(new->length, GFP_KERNEL); if (!new->name || !new->value) goto err_free; strcpy(new->value, target_path); - strcpy(new->value + target_path_len, label_path); + strcpy(new->value + target_path_len, symbol_path_tail); of_property_set_flag(new, OF_DYNAMIC);