clean warnings: Silence unused (or private) functions
authorBen Widawsky <ben@bwidawsk.net>
Thu, 25 Apr 2013 02:05:18 +0000 (19:05 -0700)
committerBen Widawsky <ben@bwidawsk.net>
Thu, 25 Apr 2013 02:11:03 +0000 (19:11 -0700)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
lib/intel_iosf.c
lib/intel_mmio.c

index 0ab14df..26ca7d0 100644 (file)
@@ -69,7 +69,8 @@ int intel_punit_read(uint8_t addr, uint32_t *val)
        return vlv_punit_rw(IOSF_PORT_PUNIT, PUNIT_OPCODE_REG_READ, addr, val);
 }
 
-int intel_punit_write(uint8_t addr, uint32_t val)
+static int intel_punit_write(uint8_t addr, uint32_t val) __attribute__ ((unused));
+static int intel_punit_write(uint8_t addr, uint32_t val)
 {
        return vlv_punit_rw(IOSF_PORT_PUNIT, PUNIT_OPCODE_REG_WRITE, addr, &val);
 }
@@ -79,7 +80,8 @@ int intel_nc_read(uint8_t addr, uint32_t *val)
        return vlv_punit_rw(IOSF_PORT_NC, PUNIT_OPCODE_REG_READ, addr, val);
 }
 
-int intel_nc_write(uint8_t addr, uint32_t val)
+static int intel_nc_write(uint8_t addr, uint32_t val) __attribute__ ((unused));
+static int intel_nc_write(uint8_t addr, uint32_t val)
 {
        return vlv_punit_rw(IOSF_PORT_NC, PUNIT_OPCODE_REG_WRITE, addr, &val);
 }
index c11b85d..f9e13f6 100644 (file)
@@ -221,21 +221,20 @@ done:
        mmio_data.inited++;
        return 0;
 }
+static int
+intel_register_access_needs_wake(void)
+{
+       return mmio_data.key != FAKEKEY;
+}
 
 void
 intel_register_access_fini(void)
 {
-       if (mmio_data.key && mmio_data.key != FAKEKEY)
+       if (mmio_data.key && intel_register_access_needs_wake())
                release_forcewake_lock(mmio_data.key);
        mmio_data.inited--;
 }
 
-int
-intel_register_access_needs_wake(void)
-{
-       return mmio_data.key == FAKEKEY;
-}
-
 uint32_t
 intel_register_read(uint32_t reg)
 {