diff --git a/qdf/inc/qdf_mem.h b/qdf/inc/qdf_mem.h index ac23673685..01cfe27876 100644 --- a/qdf/inc/qdf_mem.h +++ b/qdf/inc/qdf_mem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -191,7 +191,7 @@ static inline uint32_t qdf_str_lcopy(char *dest, const char *src, uint32_t bytes */ static inline uint32_t qdf_mem_map_nbytes_single(qdf_device_t osdev, void *buf, qdf_dma_dir_t dir, int nbytes, - uint32_t *phy_addr) + qdf_dma_addr_t *phy_addr) { #if defined(HIF_PCI) return __qdf_mem_map_nbytes_single(osdev, buf, dir, nbytes, phy_addr); diff --git a/qdf/inc/qdf_util.h b/qdf/inc/qdf_util.h index aabd1c3923..b49eca3218 100644 --- a/qdf/inc/qdf_util.h +++ b/qdf/inc/qdf_util.h @@ -432,6 +432,11 @@ static inline uint8_t *qdf_get_u32(uint8_t *ptr, uint32_t *value) */ #define qdf_function __qdf_function +/** + * qdf_min - minimum of two numbers + */ +#define qdf_min(a, b) __qdf_min(a, b) + /** * qdf_get_pwr2() - get next power of 2 integer from input value * @value: input value to find next power of 2 integer diff --git a/qdf/linux/src/i_qdf_mem.h b/qdf/linux/src/i_qdf_mem.h index ebc2868bf2..712a4de2d9 100644 --- a/qdf/linux/src/i_qdf_mem.h +++ b/qdf/linux/src/i_qdf_mem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -141,7 +141,7 @@ static inline uint32_t __qdf_str_lcopy(char *dest, const char *src, static inline uint32_t __qdf_mem_map_nbytes_single(qdf_device_t osdev, void *buf, qdf_dma_dir_t dir, int nbytes, - uint32_t *phy_addr) + qdf_dma_addr_t *phy_addr) { /* assume that the OS only provides a single fragment */ *phy_addr = dma_map_single(osdev->dev, buf, nbytes, dir); diff --git a/qdf/linux/src/i_qdf_trace.h b/qdf/linux/src/i_qdf_trace.h index 40aa8a903d..2076a93732 100644 --- a/qdf/linux/src/i_qdf_trace.h +++ b/qdf/linux/src/i_qdf_trace.h @@ -63,7 +63,7 @@ do { \ extern int qdf_dbg_mask; \ if (qdf_dbg_mask >= log_level) { \ - printk("qdf: "args); \ + printk(args); \ printk("\n"); \ } \ } while (0) diff --git a/qdf/linux/src/i_qdf_util.h b/qdf/linux/src/i_qdf_util.h index 52cefb0ebc..38d042603d 100644 --- a/qdf/linux/src/i_qdf_util.h +++ b/qdf/linux/src/i_qdf_util.h @@ -219,8 +219,8 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1, /** * @brief memory barriers. */ -#define __qdf_min(_a, _b) ((_a) < (_b) ? _a : _b) -#define __qdf_max(_a, _b) ((_a) > (_b) ? _a : _b) +#define __qdf_min(_a, _b) min(a, b) +#define __qdf_max(_a, _b) max(a, b) #define MEMINFO_KB(x) ((x) << (PAGE_SHIFT - 10)) /* In kilobytes */