From patchwork Thu Oct 5 19:44:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 114992 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp959088qgn; Thu, 5 Oct 2017 12:45:58 -0700 (PDT) X-Received: by 10.84.244.2 with SMTP id g2mr10485561pll.400.1507232758017; Thu, 05 Oct 2017 12:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507232758; cv=none; d=google.com; s=arc-20160816; b=QNMuIxAIAxweB1ER2KzxHupPuFXcBu+UoLcGut8sg/DI0/CcMjS4DKM5JRu94OVBu7 pnLt1kSGWpnYkYIHhwsLoWkt5uspWMPHAqZNsIaulW66LFxBxHPB68wEQtZaWQ7lh6kL E/6LzFoiy7226mdV5oleKg4u6F5GZv+73VKP4+V+lQWZu4yuyFI2pPK7Lx61f1dmwCia USWnh0ysOspxU1M36L+P5eQfPKgobcW0gAsh6SS5WDO+/2qU4+EYw6KL3zV1luJSLc0C CxlDUYYez1UBvFlAMz1/cTn8zK1zOyNaoHe0Oo79EYwYqwTh4xBrkkUsSEnInSTDsDOa 72rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=N6wWpUT7ykSY26BwluXIPr9JsIf63O+MFlQ/ZHDF6tQ=; b=syVRM+1VEAWA/hCLjvd5X4IahfUHePczJ3oz1Nkk/L/QpknPgAw29J0HQTDRsIdAgB F2AtakaBnGXkAsyGahO0H6WXP684YrZpIxsvphB7vk8f8osly7LvUK5H2pIHipQGL+tJ ity2ycQX2aEWI8C43iaYR5IoVz8Ih3zH436PlaVe3327eK03wYIIgTOHkUoMGgxJi0K2 H+Y/It6kA2RRWERb9EgJOWuK8cF13JnqegmlOGPZQVs/0/tXeSUh1EWhmZVAYBgYb4S1 3/N/Qq+JM717L/yLsAMEi3z9zNt/B7LEVOQZSE8QIdcxXoYvYiM7AlIp8O9QyqVwOk47 jHkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si14228160plb.359.2017.10.05.12.45.57; Thu, 05 Oct 2017 12:45:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbdJETpy (ORCPT + 26 others); Thu, 5 Oct 2017 15:45:54 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33430 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027AbdJEToa (ORCPT ); Thu, 5 Oct 2017 15:44:30 -0400 Received: by mail-oi0-f67.google.com with SMTP id n129so9100692oia.0; Thu, 05 Oct 2017 12:44:30 -0700 (PDT) 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=N6wWpUT7ykSY26BwluXIPr9JsIf63O+MFlQ/ZHDF6tQ=; b=MQP3NlxJbmvxuzC1XvantOnqqqr/f5AX9n9RxCpeosOFcJhwluB4QyKH9vHBuk8RwC CpvA9HxZOmNv2Idf9T+kLtnOwUVkqxIEYV7SVmjzKbhJVZdf8mPO9hbDG23GXZIQyM8f saktrtFUy8TXtmOwimA0+7YgbSc/l9fG50/4f8/o4cYoP4NpNUntf9KBbfjqgykOoGWX xeG5kptbJtxlJfOA/qLiBzyJGc9SnbfkbkLKiqyRGqIwgG/xeVGa/zvbKBNedipKGyKS G2gSV0MmP4pHKJEcoD9MJdPSyuAFrnKh/fJSNTMERpG30kb18QWBCBs0RXa9sAoJ0FOY 6vhQ== X-Gm-Message-State: AMCzsaW8ouvsUJFRc2sBBgHRNm3XD6loZvIJiYIRkEnEN41M7PZoRB9D UdOm+QZvKgOKPZVGlx61rWQq5X0= X-Google-Smtp-Source: AOwi7QBIrxnT3Y1UvLwS97apSAfBZ8tynq/d5irmjgA2CouUS+jum/9LNBD0UeGyCFo3H/8QqWstpw== X-Received: by 10.157.67.42 with SMTP id s39mr3496046ote.243.1507232669731; Thu, 05 Oct 2017 12:44:29 -0700 (PDT) Received: from localhost.localdomain (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id b73sm9011795oii.1.2017.10.05.12.44.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Oct 2017 12:44:28 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Nicolas Pitre , Frank Rowand , Grant Likely Subject: [PATCH 3/6] of: make struct property _flags field configurable Date: Thu, 5 Oct 2017 14:44:19 -0500 Message-Id: <20171005194422.26224-4-robh@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171005194422.26224-1-robh@kernel.org> References: <20171005194422.26224-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only Sparc and CONFIG_OF_DYNAMIC use the struct property._flags field, so make it conditional shrinking struct property a bit. Cc: Nicolas Pitre Cc: Frank Rowand Signed-off-by: Rob Herring --- include/linux/of.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.11.0 diff --git a/include/linux/of.h b/include/linux/of.h index 8f9e96752837..7eb94b7fbcf3 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -37,7 +37,9 @@ struct property { int length; void *value; struct property *next; +#if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC) unsigned long _flags; +#endif #if defined(CONFIG_OF_PROMTREE) unsigned int unique_id; #endif @@ -205,6 +207,7 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) clear_bit(flag, &n->_flags); } +#if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC) static inline int of_property_check_flag(struct property *p, unsigned long flag) { return test_bit(flag, &p->_flags); @@ -219,6 +222,7 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag { clear_bit(flag, &p->_flags); } +#endif extern struct device_node *__of_find_all_nodes(struct device_node *prev); extern struct device_node *of_find_all_nodes(struct device_node *prev);