summaryrefslogtreecommitdiff
path: root/drivers/dax
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2017-10-18 12:21:55 -0600
committerDan Williams <dan.j.williams@intel.com>2017-10-19 17:02:18 -0700
commit0a3ff78699d1817e711441715d22665475466036 (patch)
tree941b56810dfbd61184decbb5482ccb3a40e26392 /drivers/dax
parent7fc9be3c136c140b02021c7973b91b20fb1981e5 (diff)
dev/dax: fix uninitialized variable build warning
Fix this build warning: warning: 'phys' may be used uninitialized in this function [-Wuninitialized] As reported here: https://lkml.org/lkml/2017/10/16/152 http://kisskb.ellerman.id.au/kisskb/buildresult/13181373/log/ Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index e9f3b3e4bbf4..6833ada237ab 100644
--- a/drivers/dax/device.c
+++ b/drivers/dax/device.c
@@ -222,7 +222,8 @@ __weak phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff,
unsigned long size)
{
struct resource *res;
- phys_addr_t phys;
+ /* gcc-4.6.3-nolibc for i386 complains that this is uninitialized */
+ phys_addr_t uninitialized_var(phys);
int i;
for (i = 0; i < dev_dax->num_resources; i++) {