summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Tjin <pattjin@google.com>2020-07-23 23:40:15 -0700
committerPat Tjin <pattjin@google.com>2020-07-24 06:49:53 +0000
commit1cf0bbf290fe431fddcb25f8f7cc235b3f48fae0 (patch)
treeac202af7d6c2d2dfdc06a5f663d80f5e6cbbb6ff
parent70e0e6393059c56e4cb2dae1e25f785ac1fa83be (diff)
downloadabrolhos-1cf0bbf290fe431fddcb25f8f7cc235b3f48fae0.tar.gz
edgetpu: fix compiler warnings (W=1)
edgetpu-firmware-util.c:12:7: error: no previous prototype for function 'edgetpu_fwutil_name_from_attr_buf' [-Werror,-Wmissing-prototypes] char *edgetpu_fwutil_name_from_attr_buf(const char *buf) ^ edgetpu-firmware-util.c:12:1: note: declare 'static' if the function is not intended to be used outside of this translation unit char *edgetpu_fwutil_name_from_attr_buf(const char *buf) ^ static abrolhos-firmware.c:109:5: error: no previous prototype for function 'abrolhos_edgetpu_firmware_create' [-Werror,-Wmissing-prototypes] int abrolhos_edgetpu_firmware_create(struct edgetpu_dev *etdev) ^ abrolhos-firmware.c:109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int abrolhos_edgetpu_firmware_create(struct edgetpu_dev *etdev) ^ static abrolhos-firmware.c:114:6: error: no previous prototype for function 'abrolhos_edgetpu_firmware_destroy' [-Werror,-Wmissing-prototypes] void abrolhos_edgetpu_firmware_destroy(struct edgetpu_dev *etdev) ^ abrolhos-firmware.c:114:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void abrolhos_edgetpu_firmware_destroy(struct edgetpu_dev *etdev) ^ static >-------if (ret) { abrolhos-pm.c:67:53: error: format specifies type 'int' but the argument has type 'u64' (aka 'unsigned long long') [-Werror,-Wformat] dev_dbg(dev, "Power state %d -> %d\n", curr_state, val); ~~ ^~~ %llu abrolhos-pm.c:105:5: error: no previous prototype for function 'abrolhos_pwr_policy_set' [-Werror,-Wmissing-prototypes] int abrolhos_pwr_policy_set(void *data, u64 val) ^ abrolhos-pm.c:105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int abrolhos_pwr_policy_set(void *data, u64 val) ^ static Signed-off-by: Patrick Tjin <pattjin@google.com> Change-Id: Ie263785f9657a68ff37d0109b9c157691ebf2040
-rw-r--r--drivers/edgetpu/abrolhos-firmware.c1
-rw-r--r--drivers/edgetpu/abrolhos-pm.c4
-rw-r--r--drivers/edgetpu/edgetpu-firmware-util.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/drivers/edgetpu/abrolhos-firmware.c b/drivers/edgetpu/abrolhos-firmware.c
index 831df44..aaa1c80 100644
--- a/drivers/edgetpu/abrolhos-firmware.c
+++ b/drivers/edgetpu/abrolhos-firmware.c
@@ -7,6 +7,7 @@
#include <linux/dma-mapping.h>
+#include "abrolhos-firmware.h"
#include "abrolhos-platform.h"
#include "edgetpu-config.h"
#include "edgetpu-firmware.h"
diff --git a/drivers/edgetpu/abrolhos-pm.c b/drivers/edgetpu/abrolhos-pm.c
index 50e994c..2fe70df 100644
--- a/drivers/edgetpu/abrolhos-pm.c
+++ b/drivers/edgetpu/abrolhos-pm.c
@@ -64,7 +64,7 @@ static int abrolhos_pwr_state_set(void *data, u64 val)
curr_state = exynos_acpm_get_rate(TPU_ACPM_DOMAIN, 0);
- dev_dbg(dev, "Power state %d -> %d\n", curr_state, val);
+ dev_dbg(dev, "Power state %d -> %llu\n", curr_state, val);
if (curr_state == TPU_OFF && val > TPU_OFF) {
ret = pm_runtime_get_sync(dev);
@@ -102,7 +102,7 @@ static int abrolhos_pwr_state_get(void *data, u64 *val)
return 0;
}
-int abrolhos_pwr_policy_set(void *data, u64 val)
+static int abrolhos_pwr_policy_set(void *data, u64 val)
{
struct edgetpu_platform_dev *edgetpu_pdev =
(struct edgetpu_platform_dev *)data;
diff --git a/drivers/edgetpu/edgetpu-firmware-util.c b/drivers/edgetpu/edgetpu-firmware-util.c
index 16d0fec..ad9cc1f 100644
--- a/drivers/edgetpu/edgetpu-firmware-util.c
+++ b/drivers/edgetpu/edgetpu-firmware-util.c
@@ -9,6 +9,8 @@
#include <linux/slab.h>
#include <linux/string.h>
+#include "edgetpu-firmware-util.h"
+
char *edgetpu_fwutil_name_from_attr_buf(const char *buf)
{
size_t len;