summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaitik Bharadiya <bharad@codeaurora.org>2019-10-14 16:05:02 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-04-28 04:25:50 -0700
commitbde02ce1d5bea68c852155f3d003f78efe25dc28 (patch)
tree0bbae961b090545e586a168fa230b107408d7e1e
parentb803b1f3f2ce98db7b3cebcc6ea59d1c1e302ced (diff)
soc: qcom: glink_debugfs: Fix compilation error with clang
use destination string size in strlcpy size argument to fix clang compilation error. Change-Id: Ice7fa2753d07e07c5c214ffb0792450985378643 Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org> Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
-rw-r--r--drivers/soc/qcom/glink_debugfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/soc/qcom/glink_debugfs.c b/drivers/soc/qcom/glink_debugfs.c
index 8e65e4ac9b8e..4bc01704d8aa 100644
--- a/drivers/soc/qcom/glink_debugfs.c
+++ b/drivers/soc/qcom/glink_debugfs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2015, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -559,9 +559,9 @@ void glink_dfs_update_list(struct dentry *curr_dent, struct dentry *parent,
dbgfs_dent_s->parent = parent;
dbgfs_dent_s->self = curr_dent;
strlcpy(dbgfs_dent_s->self_name,
- curr, strlen(curr) + 1);
+ curr, sizeof(dbgfs_dent_s->self_name));
strlcpy(dbgfs_dent_s->par_name, par_dir,
- strlen(par_dir) + 1);
+ sizeof(dbgfs_dent_s->par_name));
mutex_lock(&dent_list_lock_lha0);
list_add_tail(&dbgfs_dent_s->list_node, &dent_list);
mutex_unlock(&dent_list_lock_lha0);