提交 59858d3d 编写于 作者: C Colin Ian King 提交者: Ross Zwisler

libnvdimm, namespace: remove redundant initialization of 'nd_mapping'

Pointer nd_mapping is being initialized to a value that is never read,
instead it is being updated to a new value in all the cases where it
is being read afterwards, hence the initialization is redundant and
can be removed.

Cleans up clang warning:
drivers/nvdimm/namespace_devs.c:2411:21: warning: Value stored to
'nd_mapping' during its initialization is never rea
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
上级 23fbd7c7
...@@ -2408,7 +2408,7 @@ static struct device **scan_labels(struct nd_region *nd_region) ...@@ -2408,7 +2408,7 @@ static struct device **scan_labels(struct nd_region *nd_region)
static struct device **create_namespaces(struct nd_region *nd_region) static struct device **create_namespaces(struct nd_region *nd_region)
{ {
struct nd_mapping *nd_mapping = &nd_region->mapping[0]; struct nd_mapping *nd_mapping;
struct device **devs; struct device **devs;
int i; int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册