* [PATCH v2 02/10] fs/openpromfs: Use of_node_name_eq for node name comparisons
@ 2018-11-16 21:06 Rob Herring
0 siblings, 0 replies; only message in thread
From: Rob Herring @ 2018-11-16 21:06 UTC (permalink / raw)
To: sparclinux
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
Signed-off-by: Rob Herring <robh@kernel.org>
---
fs/openpromfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index 3d8e9bcfe239..1b2d0d2fe2ee 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -246,7 +246,7 @@ static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry
set_nlink(inode, 2);
break;
case op_inode_prop:
- if (!strcmp(dp->name, "options") && (len = 17) &&
+ if (of_node_name_eq(dp, "options") && (len = 17) &&
!strncmp (name, "security-password", 17))
inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR;
else
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-16 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16 21:06 [PATCH v2 02/10] fs/openpromfs: Use of_node_name_eq for node name comparisons Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.