diff options
author | David Kershner <david.kershner@unisys.com> | 2016-09-20 16:28:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-21 12:06:19 +0200 |
commit | 3838925ce22063cb8e2b70311d3163b869bc6592 (patch) | |
tree | 605a993a693a92588687c164b8a1ad850c823d85 /drivers/staging/unisys | |
parent | d616700e38d91f9ec11d83ccf64d8e038935f26d (diff) | |
download | talos-obmc-linux-3838925ce22063cb8e2b70311d3163b869bc6592.tar.gz talos-obmc-linux-3838925ce22063cb8e2b70311d3163b869bc6592.zip |
staging: unisys: include: remove unused function pathname_last_n_nodes
The function pathname_last_n_nodes is not used, get rid of it.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/include/channel.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h index ff86f7af2c3d..e42f46c9f26f 100644 --- a/drivers/staging/unisys/include/channel.h +++ b/drivers/staging/unisys/include/channel.h @@ -347,38 +347,6 @@ static inline int spar_check_channel_server(uuid_le typeuuid, char *name, return 1; } -/* Given a file pathname <s> (with '/' or '\' separating directory nodes), - * returns a pointer to the beginning of a node within that pathname such - * that the number of nodes from that pointer to the end of the string is - * NOT more than <n>. Note that if the pathname has less than <n> nodes - * in it, the return pointer will be to the beginning of the string. - */ -static inline u8 * -pathname_last_n_nodes(u8 *s, unsigned int n) -{ - u8 *p = s; - unsigned int node_count = 0; - - while (*p != '\0') { - if ((*p == '/') || (*p == '\\')) - node_count++; - p++; - } - if (node_count <= n) - return s; - while (n > 0) { - p--; - if (p == s) - break; /* should never happen, unless someone - * is changing the string while we are - * looking at it!! - */ - if ((*p == '/') || (*p == '\\')) - n--; - } - return p + 1; -} - static inline int spar_channel_client_acquire_os(void __iomem *ch, u8 *id) { |