lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201224010907.263125-7-djrscally@gmail.com>
Date:   Thu, 24 Dec 2020 01:08:59 +0000
From:   Daniel Scally <djrscally@...il.com>
To:     linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-media@...r.kernel.org, devel@...ica.org
Cc:     rjw@...ysocki.net, lenb@...nel.org, gregkh@...uxfoundation.org,
        yong.zhi@...el.com, sakari.ailus@...ux.intel.com,
        bingbu.cao@...el.com, tian.shu.qiu@...el.com, mchehab@...nel.org,
        robert.moore@...el.com, erik.kaneda@...el.com, pmladek@...e.com,
        rostedt@...dmis.org, sergey.senozhatsky@...il.com,
        andriy.shevchenko@...ux.intel.com, linux@...musvillemoes.dk,
        laurent.pinchart+renesas@...asonboard.com,
        jacopo+renesas@...ndi.org, kieran.bingham+renesas@...asonboard.com,
        hverkuil-cisco@...all.nl, m.felsch@...gutronix.de,
        niklas.soderlund+renesas@...natech.se, slongerbeam@...il.com,
        heikki.krogerus@...ux.intel.com, linus.walleij@...aro.org
Subject: [PATCH v3 06/14] include: fwnode.h: Define format macros for ports and endpoints

OF, ACPI and software_nodes all implement graphs including nodes for ports
and endpoints. These are all intended to be named with a common schema,
as "port@n" and "endpoint@n" where n is an unsigned int representing the
index of the node. To ensure commonality across the subsystems, provide a
set of macros to define the format.

Suggested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Signed-off-by: Daniel Scally <djrscally@...il.com>
---
Changes in v3
	- Patch introduced

 include/linux/fwnode.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index 9506f8ec0974..52889efceb7d 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -32,6 +32,19 @@ struct fwnode_endpoint {
 	const struct fwnode_handle *local_fwnode;
 };
 
+/*
+ * ports and endpoints defined in OF, ACPI and as software_nodes should all
+ * follow a common naming scheme; use these macros to ensure commonality across
+ * the subsystems.
+ *
+ * The *PREFIX_LEN macros refer to the length of the "port@" and "endpoint@"
+ * sections of the naming scheme.
+ */
+#define FWNODE_GRAPH_PORT_NAME_FORMAT		"port@%u"
+#define FWNODE_GRAPH_PORT_NAME_PREFIX_LEN	5
+#define FWNODE_GRAPH_ENDPOINT_NAME_FORMAT	"endpoint@%u"
+#define FWNODE_GRAPH_ENDPOINT_PREFIX_LEN	9
+
 #define NR_FWNODE_REFERENCE_ARGS	8
 
 /**
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ