From patchwork Tue Oct 3 03:53:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 9981869 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 C4C7160291 for ; Tue, 3 Oct 2017 07:20:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7644286BE for ; Tue, 3 Oct 2017 07:20:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC37F28882; Tue, 3 Oct 2017 07:20:24 +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 5F630286BE for ; Tue, 3 Oct 2017 07:20:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A92CF6E3ED; Tue, 3 Oct 2017 07:19:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 592DB6E08B for ; Tue, 3 Oct 2017 03:54:08 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id i23so7681363pfi.2 for ; Mon, 02 Oct 2017 20:54:08 -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=u3xjRMQs0YdIaKm0cHv6T1h05isDXJBk3wWhsg7fbPe++1F1ya+DsaL0lP25rEtm28 MEtxHR7aL78TeRrL8nZGI3yOlSsiYK80evlObKU4AJi8fmXLS1dugDoobpnsEzkQMPUa az8CevxAQpVsX3K3n88bpkFIzqouwsvJvzbz+Tp8DGo1ZJ+I5gCmdoBqIErVQmTwOIhe 6r6VCxYawo3G2rloGFGtmF261xcNx6ESVyGSQs2BbxZ8LxADnoyTfLtlGU/LS0yPLBxY 1blYf50k/R7c/aM1xET0oqYd3qu9h0HGmhF2/cOY7KF4JZpJFV3IDFkrWb5QPUOruDXF G/Rw== 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=pNhQKNwjs6R29PU1mPttYvJk4PMIPlEYy1khePRDt/pTClc/JlzPSvrdt3FSP3srE2 BqOhn5iKgElJMTRGCtO1CGrwhqpDcdsZCMRNBiJDSsn+V86S12MqYab3FI3E4fp1jpJG J90ykRAGmGCiLLFDntFWNwD708GbsJ6SIsk3Ge5uxOKRzCKrb/gJB9DQftp06Kf02Iop aE0QxSNlezGUKl5Soio1fKqqY0T/yNBy8vOS43nW1Bq5uY+DdbYhewGA5iCSzOG1vaZ6 Rmav+dHYslZ3Zvwg/pCSIWdwl63S+fQRSzzm8eh7X62CKswlmiYz9qOh1rbmIQEu1BWj K/Qw== X-Gm-Message-State: AMCzsaUu4vkbdU/ssqep01hNXZA/iHcdQXPfGMqLvqRWSZWFR4Ee/AIi rRn4vHRaInhb6rInPTSbPQs= X-Google-Smtp-Source: AOwi7QAtm4fvrGzZKYMhjo78/IqO2oD921uIKFn3G6GNRb3K/D4NNx+meWcgHsl0TdXGOjkkWH1+OA== X-Received: by 10.98.234.13 with SMTP id t13mr6465267pfh.120.1507002847844; Mon, 02 Oct 2017 20:54:07 -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 c16sm18609930pfj.123.2017.10.02.20.54.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 20:54:07 -0700 (PDT) From: frowand.list@gmail.com To: Rob Herring , Pantelis Antoniou , David Airlie , Jyri Sarha Subject: [PATCH 04/12] of: overlay: rename identifiers in dup_and_fixup_symbol_prop() Date: Mon, 2 Oct 2017 20:53:38 -0700 Message-Id: <1507002826-16393-5-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507002826-16393-1-git-send-email-frowand.list@gmail.com> References: <1507002826-16393-1-git-send-email-frowand.list@gmail.com> X-Mailman-Approved-At: Tue, 03 Oct 2017 07:19:35 +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);