From patchwork Fri Nov 21 01:35:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 41271 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05D3D25AEA for ; Fri, 21 Nov 2014 01:36:57 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf2426977eek.4 for ; Thu, 20 Nov 2014 17:36:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=K+ZobD7526X3bwHZlSHqJzErNrBgGAzdefZbXalCDuU=; b=cPiN00PMr7PVb4JguULAq8cA1yeg035bnfXwHaMFZrwGq9MB4wosNZ9lNHFRd3lcxq MYJLgds604UoOhFbPOLX/x3MLXlFUbH3DAPYEp/goGUAe0v/+so9rS0/4SJiOH21uCNw iqknSx3a4BzNtRcc5Z8VgX35Sr7FAr1hqB0ru6qm6Uc5VCkDXnCRnl8cjcE5JcE0DBRo +c4DFVcbLIOoK0q9Z7J1NO4FTJvA6SW/AK75+eRa2PCr/s7vX3qsVuckwGw8Iv1ODewr 5C/CKoAueqHb0ioAzW1/ayStyKJ1g8LY73nx6rVNb1+0iDEm5TxzAEN0GmeZDHhk20iM pCJQ== X-Gm-Message-State: ALoCoQlFHJEoD9ESD9LuEcd/WxaNvbEgjSqatIJqr8t1NSlGSLW4tOHanrAnf+PpVSDuHW3vXska X-Received: by 10.194.133.39 with SMTP id oz7mr518443wjb.3.1416533816284; Thu, 20 Nov 2014 17:36:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.72 with SMTP id q8ls103580laq.98.gmail; Thu, 20 Nov 2014 17:36:56 -0800 (PST) X-Received: by 10.152.22.135 with SMTP id d7mr1345837laf.46.1416533816124; Thu, 20 Nov 2014 17:36:56 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id am7si3479416lac.124.2014.11.20.17.36.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Nov 2014 17:36:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so3316715lbi.29 for ; Thu, 20 Nov 2014 17:36:56 -0800 (PST) X-Received: by 10.112.45.102 with SMTP id l6mr1354716lbm.46.1416533815930; Thu, 20 Nov 2014 17:36:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp369259lbc; Thu, 20 Nov 2014 17:36:55 -0800 (PST) X-Received: by 10.70.129.81 with SMTP id nu17mr2444233pdb.54.1416533814316; Thu, 20 Nov 2014 17:36:54 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nw13si5606019pdb.199.2014.11.20.17.36.53 for ; Thu, 20 Nov 2014 17:36:54 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757720AbaKUBgw (ORCPT + 4 others); Thu, 20 Nov 2014 20:36:52 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:45147 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757684AbaKUBfd (ORCPT ); Thu, 20 Nov 2014 20:35:33 -0500 Received: by mail-wg0-f52.google.com with SMTP id a1so5263049wgh.11 for ; Thu, 20 Nov 2014 17:35:32 -0800 (PST) X-Received: by 10.180.39.106 with SMTP id o10mr20842350wik.54.1416533732732; Thu, 20 Nov 2014 17:35:32 -0800 (PST) Received: from trevor.secretlab.ca (host86-166-84-117.range86-166.btcentralplus.com. [86.166.84.117]) by mx.google.com with ESMTPSA id fq1sm9049153wib.12.2014.11.20.17.35.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Nov 2014 17:35:31 -0800 (PST) Received: by trevor.secretlab.ca (Postfix, from userid 1000) id ECD99C416D7; Fri, 21 Nov 2014 01:35:21 +0000 (GMT) From: Grant Likely To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pantelis Antoniou Cc: Rob Herring , Grant Likely Subject: [PATCH 8/8] of: Add debug output for OF_RECONFIG notifiers Date: Fri, 21 Nov 2014 01:35:15 +0000 Message-Id: <1416533715-9758-9-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416533715-9758-1-git-send-email-grant.likely@linaro.org> References: <1416533715-9758-1-git-send-email-grant.likely@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add some additional debug output to cover OF_RECONFIG notifier activity. At the same time, refactor the changeset debug output to use the same strings as the notifier debug output. Signed-off-by: Grant Likely --- drivers/of/dynamic.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 7634c2f69d4a..de20ae46b370 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -77,10 +77,38 @@ int of_reconfig_notifier_unregister(struct notifier_block *nb) } EXPORT_SYMBOL_GPL(of_reconfig_notifier_unregister); +#ifdef DEBUG +const char *action_names[] = { + [OF_RECONFIG_ATTACH_NODE] = "ATTACH_NODE", + [OF_RECONFIG_DETACH_NODE] = "DETACH_NODE", + [OF_RECONFIG_ADD_PROPERTY] = "ADD_PROPERTY", + [OF_RECONFIG_REMOVE_PROPERTY] = "REMOVE_PROPERTY", + [OF_RECONFIG_UPDATE_PROPERTY] = "UPDATE_PROPERTY", +}; +#endif + int of_reconfig_notify(unsigned long action, void *p) { int rc; +#ifdef DEBUG + struct device_node *dn = p; + struct of_prop_reconfig *pr = p; + + switch (action) { + case OF_RECONFIG_ATTACH_NODE: + case OF_RECONFIG_DETACH_NODE: + pr_debug("of/notify %-15s %s\n", action_names[action], + dn->full_name); + break; + case OF_RECONFIG_ADD_PROPERTY: + case OF_RECONFIG_REMOVE_PROPERTY: + case OF_RECONFIG_UPDATE_PROPERTY: + pr_debug("of/notify %-15s %s:%s\n", action_names[action], + pr->dn->full_name, pr->prop->name); + break; + } +#endif rc = blocking_notifier_call_chain(&of_reconfig_chain, action, p); return notifier_to_errno(rc); } @@ -431,27 +459,15 @@ static void __of_changeset_entry_dump(struct of_changeset_entry *ce) { switch (ce->action) { case OF_RECONFIG_ADD_PROPERTY: - pr_debug("%p: %s %s/%s\n", - ce, "ADD_PROPERTY ", ce->np->full_name, - ce->prop->name); - break; case OF_RECONFIG_REMOVE_PROPERTY: - pr_debug("%p: %s %s/%s\n", - ce, "REMOVE_PROPERTY", ce->np->full_name, - ce->prop->name); - break; case OF_RECONFIG_UPDATE_PROPERTY: - pr_debug("%p: %s %s/%s\n", - ce, "UPDATE_PROPERTY", ce->np->full_name, - ce->prop->name); + pr_debug("of/cset<%p> %-15s %s/%s\n", ce, action_names[ce->action], + ce->np->full_name, ce->prop->name); break; case OF_RECONFIG_ATTACH_NODE: - pr_debug("%p: %s %s\n", - ce, "ATTACH_NODE ", ce->np->full_name); - break; case OF_RECONFIG_DETACH_NODE: - pr_debug("%p: %s %s\n", - ce, "DETACH_NODE ", ce->np->full_name); + pr_debug("of/cset<%p> %-15s %s\n", ce, action_names[ce->action], + ce->np->full_name); break; } }