From 3c0b461e4c8fde467bd803e368d9a78ec2da5f8a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 20 Jul 2012 12:35:14 -0700 Subject: [PATCH] staging: csr: remove odd pointer typedefs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit No one was using CsrPtrdiff or CsrUintptr, but CsrIntptr is used in one place, so replace that with ptrdiff_t. Odds are all it really wants is a void * there, but hey, I'll play along for now. Cc: Mikko Virkkilä Cc: Lauri Hintsala Cc: Riku Mettälä Cc: Veli-Pekka Peltola Signed-off-by: Greg Kroah-Hartman --- drivers/staging/csr/csr_types.h | 5 ----- drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/csr/csr_types.h b/drivers/staging/csr/csr_types.h index fb0f07c..76f95615 100644 --- a/drivers/staging/csr/csr_types.h +++ b/drivers/staging/csr/csr_types.h @@ -26,11 +26,6 @@ extern "C" { #undef TRUE #define TRUE (1) -/* Basic types */ -typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */ -typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */ -typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */ - /* * 64-bit integers * diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c index 8aba828..9f2343c 100644 --- a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c +++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c @@ -1740,7 +1740,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr, /* if os_data_ptr is not 4-byte aligned, then allocate a new buffer and copy data to new buffer to ensure the address passed to unifi_bulk_rw is 4-byte aligned */ - if (len != 0 && (dir == UNIFI_SDIO_WRITE) && (((CsrIntptr)bdslot->os_data_ptr + offset) & 3)) + if (len != 0 && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3)) { host_bulk_data_slot = CsrMemAllocDma(len); @@ -1799,7 +1799,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr, #ifdef CSR_WIFI_ALIGNMENT_WORKAROUND /* moving this check before we clear host data slot */ - if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((CsrIntptr)bdslot->os_data_ptr + offset) & 3)) + if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3)) { CsrMemFreeDma(host_bulk_data_slot); } -- 2.7.4