Message ID | 20210228055645.22253-18-chaitanya.kulkarni@wdc.com |
---|---|
State | New |
Headers | show |
Series | [01/23] target/iblock: remove an extra argument | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index ca5b083d2958..0ec9fe1ebade 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2609,9 +2609,7 @@ static ssize_t target_lu_gp_members_show(struct config_item *item, char *page) struct se_hba *hba; struct t10_alua_lu_gp_member *lu_gp_mem; ssize_t len = 0, cur_len; - unsigned char buf[LU_GROUP_NAME_BUF]; - - memset(buf, 0, LU_GROUP_NAME_BUF); + unsigned char buf[LU_GROUP_NAME_BUF] = { }; spin_lock(&lu_gp->lu_gp_lock); list_for_each_entry(lu_gp_mem, &lu_gp->lu_gp_mem_list, lu_gp_mem_list) {
Instead of initializing the array with memset, use declare init pattern that is present under the kernel tree in other drivers so we can remove the memset call. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> --- drivers/target/target_core_configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)