summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorEmil Medve <Emilian.Medve@Freescale.com>2014-01-16 09:36:59 (GMT)
committerEmilian Medve <Emilian.Medve@freescale.com>2014-01-16 15:31:13 (GMT)
commite154b82a45804b322c1ddfa7fade625ed1ac2733 (patch)
tree57d0a9cf11b0ffda5901d9e09204214257e44e61 /drivers/staging
parentc0ba7ddbedcbf435bc2d8c653a16286d077e9183 (diff)
downloadlinux-fsl-qoriq-e154b82a45804b322c1ddfa7fade625ed1ac2733.tar.xz
fsl_dce: Fix tester(s) build warnings
drivers/staging/fsl_dce/tests/common/test_frame_helpers.c: In function ‘print_dce_data_list’: drivers/staging/fsl_dce/tests/common/test_frame_helpers.c:272:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat=] pr_info(" cpumem = %p, size = %lu\n", ^ drivers/staging/fsl_dce/tests/common/test_frame_helpers.c:283:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat=] pr_info(" cpumem = %p, size = %lu\n", ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c: In function ‘copy_bman_output_to_buffer’: drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:388:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ [-Wformat=] pr_info("total frame length != calulated length (%lu)" ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:398:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ [-Wformat=] pr_info("sg length != frame output length (%lu) (%u)\n", ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c: In function ‘write_file’: drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:522:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat=] pr_info("Error %d, data_len %lu\n", rc, data_len); ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c: In function ‘dce_loopback_shutdown’: drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:694:77: warning: comparison of distinct pointer types lacks a cast [enabled by default] do_div(dce_freq, 2); ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:694:2: warning: right shift count >= width of type [enabled by default] do_div(dce_freq, 2); ^ drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:694:2: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type [enabled by default] In file included from arch/powerpc/include/asm/div64.h:1:0, from include/linux/kernel.h:111, from drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c:33: include/asm-generic/div64.h:35:17: note: expected ‘uint64_t *’ but argument is of type ‘uint32_t *’ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); ^ Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Change-Id: If682239365c0d59bf01d7fc712cbfc410de0854c Reviewed-on: http://git.am.freescale.net:8181/8003 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Emilian Medve <Emilian.Medve@freescale.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/fsl_dce/tests/common/test_frame_helpers.c4
-rw-r--r--drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/fsl_dce/tests/common/test_frame_helpers.c b/drivers/staging/fsl_dce/tests/common/test_frame_helpers.c
index 1dd23d0..3274f0e 100644
--- a/drivers/staging/fsl_dce/tests/common/test_frame_helpers.c
+++ b/drivers/staging/fsl_dce/tests/common/test_frame_helpers.c
@@ -269,7 +269,7 @@ void print_dce_data_list(struct dce_data_list_t *data_list)
if (data_list->sg) {
pr_info("Multi-Buffer\n");
for (i = 0; i < data_list->nents; i++) {
- pr_info(" cpumem = %p, size = %lu\n",
+ pr_info(" cpumem = %p, size = %zu\n",
data_list->data_item[i].cpumem,
data_list->data_item[i].size);
print_hex_dump(KERN_ERR, " data@"AT": ",
@@ -280,7 +280,7 @@ void print_dce_data_list(struct dce_data_list_t *data_list)
print_dce_sg(data_list->sg[i]);
} else {
pr_info("Single Buffer\n");
- pr_info(" cpumem = %p, size = %lu\n",
+ pr_info(" cpumem = %p, size = %zu\n",
data_list->data_item->cpumem,
data_list->data_item->size);
print_hex_dump(KERN_ERR, " data@"AT": ",
diff --git a/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c b/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
index dc3edd9..d14a6d7 100644
--- a/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
+++ b/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
@@ -385,7 +385,7 @@ static int copy_bman_output_to_buffer(struct qm_sg_entry *sg, size_t cpylen,
} while (1);
if (cpylen != cal_total_lenght) {
- pr_info("total frame length != calulated length (%lu)"
+ pr_info("total frame length != calulated length (%zu)"
" (%llu)\n", cpylen, cal_total_lenght);
}
} else {
@@ -395,7 +395,7 @@ static int copy_bman_output_to_buffer(struct qm_sg_entry *sg, size_t cpylen,
fsl_dce_unmap(phy_addr);
cpumem = phys_to_virt(phy_addr);
if (cpylen != sg->length) {
- pr_info("sg length != frame output length (%lu) (%u)\n",
+ pr_info("sg length != frame output length (%zu) (%u)\n",
cpylen, sg->length);
}
memcpy(buffer, cpumem, sg->length);
@@ -519,7 +519,7 @@ static int write_file(const char *file, char *data, size_t data_len)
rc = vfs_write(filp, data, data_len, &pos);
if (rc != data_len) {
pr_info("Failed to write '%s'.\n", file);
- pr_info("Error %d, data_len %lu\n", rc, data_len);
+ pr_info("Error %d, data_len %zu\n", rc, data_len);
goto out;
}
@@ -684,8 +684,8 @@ void dce_loopback_shutdown(void)
uint64_t decomp_Mbps = 0;
unsigned int cpufreq = 0;
uint64_t run_time_usec = 0;
- uint32_t sysfreq = 0, dce_freq = 0;
- uint64_t dce_max_freq = 400000000; /* Hz */
+ uint32_t sysfreq = 0;
+ uint64_t dce_freq = 0, dce_max_freq = 400000000; /* Hz */
uint64_t scaled_val;
uint64_t temp;
@@ -705,7 +705,7 @@ void dce_loopback_shutdown(void)
scaled_val = dce_max_freq * 1000;
do_div(scaled_val, dce_freq);
- pr_info("DCE Freq = %u hz\n", dce_freq);
+ pr_info("DCE Freq = %llu hz\n", dce_freq);
pr_info("CPU Freq: %u\n", cpufreq);
pr_info("Cycles to complete = %llu\n", run_time_cycle);
pr_info("Time (usec) to complete = %llu\n", run_time_usec);