[PATCH 6/8] staging: brcm80211: Remove dead code from linux_osl.c.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/include/linux_osl.h |   12 -------
 drivers/staging/brcm80211/util/linux_osl.c    |   41 -------------------------
 2 files changed, 0 insertions(+), 53 deletions(-)

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 @@ 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 4055f7e..11d0d46 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)
 {
-- 
1.6.3.3


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux