From 4ca70f7fcbf9a4cd44c52f582ef4cfb678f3f560 Mon Sep 17 00:00:00 2001 From: Henry Ptasinski Date: Thu, 7 Oct 2010 19:52:09 -0700 Subject: [PATCH] staging: brcm80211: Remove dead code from linux_osl.c. Removed several completely unused functions: osl_malloc_failed osl_pcmcia_attr osl_pcmcia_read_attr osl_pcmcia_write_attr osl_pktdup and related macros Signed-off-by: Henry Ptasinski Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/include/linux_osl.h | 12 ------ drivers/staging/brcm80211/util/linux_osl.c | 41 ------------------- 2 files changed, 53 deletions(-) diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h index 1e4a920a174e..5ef540f94169 100644 --- a/drivers/staging/brcm80211/include/linux_osl.h +++ b/drivers/staging/brcm80211/include/linux_osl.h @@ -52,14 +52,6 @@ extern void osl_assert(char *exp, char *file, int line); #define OSL_DELAY(usec) osl_delay(usec) extern void osl_delay(uint usec); -#define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) \ - osl_pcmcia_read_attr((osh), (offset), (buf), (size)) -#define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) \ - osl_pcmcia_write_attr((osh), (offset), (buf), (size)) -extern void osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size); -extern void osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, - int size); - /* PCI configuration space access macros */ #define OSL_PCI_READ_CONFIG(osh, offset, size) \ osl_pci_read_config((osh), (offset), (size)) @@ -114,8 +106,6 @@ extern uint osl_malloced(osl_t *osh); #define NATIVE_MALLOC(osh, size) kmalloc(size, GFP_ATOMIC) #define NATIVE_MFREE(osh, addr, size) kfree(addr) -#define MALLOC_FAILED(osh) osl_malloc_failed((osh)) -extern uint osl_malloc_failed(osl_t *osh); #ifdef BRCM_FULLMAC #define DMA_CONSISTENT_ALIGN PAGE_SIZE @@ -343,14 +333,12 @@ extern int osl_error(int bcmerror); #define PKTSETLEN(skb, len) __skb_trim((struct sk_buff *)(skb), (len)) #define PKTPUSH(skb, bytes) skb_push((struct sk_buff *)(skb), (bytes)) #define PKTPULL(skb, bytes) skb_pull((struct sk_buff *)(skb), (bytes)) -#define PKTDUP(osh, skb) osl_pktdup((osh), (skb)) #define PKTTAG(skb) ((void *)(((struct sk_buff *)(skb))->cb)) #define PKTALLOCED(osh) (((osl_pubinfo_t *)(osh))->pktalloced) #define PKTSETPOOL(osh, skb, x, y) do {} while (0) #define PKTPOOL(osh, skb) FALSE extern void *osl_pktget(osl_t *osh, uint len); extern void osl_pktfree(osl_t *osh, void *skb, bool send); -extern void *osl_pktdup(osl_t *osh, void *skb); #ifdef BRCM_FULLMAC #ifdef DHD_USE_STATIC_BUF diff --git a/drivers/staging/brcm80211/util/linux_osl.c b/drivers/staging/brcm80211/util/linux_osl.c index 4055f7e7add4..11d0d4643df5 100644 --- a/drivers/staging/brcm80211/util/linux_osl.c +++ b/drivers/staging/brcm80211/util/linux_osl.c @@ -418,21 +418,6 @@ uint osl_pci_slot(osl_t *osh) return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn); } -static void -osl_pcmcia_attr(osl_t *osh, uint offset, char *buf, int size, bool write) -{ -} - -void osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size) -{ - osl_pcmcia_attr(osh, offset, (char *)buf, size, FALSE); -} - -void osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, int size) -{ - osl_pcmcia_attr(osh, offset, (char *)buf, size, TRUE); -} - void *osl_malloc(osl_t *osh, uint size) { void *addr; @@ -519,12 +504,6 @@ uint osl_malloced(osl_t *osh) return osh->malloced; } -uint osl_malloc_failed(osl_t *osh) -{ - ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); - return osh->failed; -} - uint osl_dma_consistent_align(void) { return PAGE_SIZE; @@ -635,26 +614,6 @@ void osl_delay(uint usec) } } -/* Clone a packet. - * The pkttag contents are NOT cloned. - */ -void *osl_pktdup(osl_t *osh, void *skb) -{ - void *p; - - p = skb_clone((struct sk_buff *)skb, GFP_ATOMIC); - if (p == NULL) - return NULL; - - /* skb_clone copies skb->cb.. we don't want that */ - if (osh->pub.pkttag) - bzero((void *)((struct sk_buff *)p)->cb, OSL_PKTTAG_SZ); - - /* Increment the packet counter */ - osh->pub.pktalloced++; - return p; -} - #if defined(BCMSDIO) && !defined(BRCM_FULLMAC) u8 osl_readb(osl_t *osh, volatile u8 *r) { -- 2.34.1