Skip to content

Commit

Permalink
libnvdimm, namespace: remove redundant initialization of 'nd_mapping'
Browse files Browse the repository at this point in the history
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: Colin Ian King <[email protected]>
Reviewed-by: Ross Zwisler <[email protected]>
Signed-off-by: Ross Zwisler <[email protected]>
  • Loading branch information
Colin Ian King authored and Ross Zwisler committed Feb 3, 2018
1 parent 23fbd7c commit 59858d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvdimm/namespace_devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ static struct device **scan_labels(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;
int i;

Expand Down

0 comments on commit 59858d3

Please sign in to comment.