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 <henryp@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h
index 1e4a920..5ef540f 100644
--- a/drivers/staging/brcm80211/include/linux_osl.h
+++ b/drivers/staging/brcm80211/include/linux_osl.h
@@ -52,14 +52,6 @@
#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 @@
#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 @@
#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 4055f7e..11d0d46 100644
--- a/drivers/staging/brcm80211/util/linux_osl.c
+++ b/drivers/staging/brcm80211/util/linux_osl.c
@@ -418,21 +418,6 @@
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 @@
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 @@
}
}
-/* 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)
{