public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] drivers: bcm: Remove unused function in nvm.c
@ 2013-12-21 10:33 Rashika Kheria
  2013-12-21 10:58 ` Josh Triplett
  0 siblings, 1 reply; 2+ messages in thread
From: Rashika Kheria @ 2013-12-21 10:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Kevin McKinney, Lisa Nguyen, Rashika Kheria,
	Mihnea Dobrescu-Balaur, devel, josh

Remove unused function PropagateCalParamsFromEEPROMToMemory() in nvm.c.

This eliminates the following warning in nvm.c:
drivers/staging/bcm/nvm.c:1369:5: warning: no previous prototype for ‘PropagateCalParamsFromEEPROMToMemory’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/bcm/nvm.c |   61 ---------------------------------------------
 1 file changed, 61 deletions(-)

diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 9e5f955..6f40f17 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -1355,67 +1355,6 @@ BeceemFlashBulkWriteStatus_EXIT:
 }
 
 /*
- * Procedure:	PropagateCalParamsFromEEPROMToMemory
- *
- * Description: Dumps the calibration section of EEPROM to DDR.
- *
- * Arguments:
- *		Adapter    - ptr to Adapter object instance
- * Returns:
- *		OSAL_STATUS_CODE
- *
- */
-
-int PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
-{
-	PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL);
-	unsigned int uiEepromSize = 0;
-	unsigned int uiIndex = 0;
-	unsigned int uiBytesToCopy = 0;
-	unsigned int uiCalStartAddr = EEPROM_CALPARAM_START;
-	unsigned int uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC;
-	unsigned int value;
-	int Status = 0;
-
-	if (!pBuff)
-		return -ENOMEM;
-
-	if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, EEPROM_SIZE_OFFSET, 4)) {
-		kfree(pBuff);
-		return -1;
-	}
-
-	uiEepromSize >>= 16;
-	if (uiEepromSize > 1024 * 1024) {
-		kfree(pBuff);
-		return -1;
-	}
-
-	uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
-
-	while (uiBytesToCopy) {
-		if (0 != BeceemEEPROMBulkRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiBytesToCopy)) {
-			Status = -1;
-			break;
-		}
-		wrm(Adapter, uiMemoryLoc, (PCHAR)(((PULONG)pBuff) + uiIndex), uiBytesToCopy);
-		uiMemoryLoc += uiBytesToCopy;
-		uiEepromSize -= uiBytesToCopy;
-		uiCalStartAddr += uiBytesToCopy;
-		uiIndex += uiBytesToCopy / 4;
-		uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
-
-	}
-	value = 0xbeadbead;
-	wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, sizeof(value));
-	value = 0xbeadbead;
-	wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, sizeof(value));
-	kfree(pBuff);
-
-	return Status;
-}
-
-/*
  * Procedure:	PropagateCalParamsFromFlashToMemory
  *
  * Description: Dumps the calibration section of EEPROM to DDR.
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] drivers: bcm: Remove unused function in nvm.c
  2013-12-21 10:33 [PATCH 2/2] drivers: bcm: Remove unused function in nvm.c Rashika Kheria
@ 2013-12-21 10:58 ` Josh Triplett
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2013-12-21 10:58 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Greg Kroah-Hartman, Kevin McKinney, Lisa Nguyen,
	Mihnea Dobrescu-Balaur, devel

On Sat, Dec 21, 2013 at 04:03:22PM +0530, Rashika Kheria wrote:
> Remove unused function PropagateCalParamsFromEEPROMToMemory() in nvm.c.
> 
> This eliminates the following warning in nvm.c:
> drivers/staging/bcm/nvm.c:1369:5: warning: no previous prototype for ‘PropagateCalParamsFromEEPROMToMemory’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/staging/bcm/nvm.c |   61 ---------------------------------------------
>  1 file changed, 61 deletions(-)
> 
> diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
> index 9e5f955..6f40f17 100644
> --- a/drivers/staging/bcm/nvm.c
> +++ b/drivers/staging/bcm/nvm.c
> @@ -1355,67 +1355,6 @@ BeceemFlashBulkWriteStatus_EXIT:
>  }
>  
>  /*
> - * Procedure:	PropagateCalParamsFromEEPROMToMemory
> - *
> - * Description: Dumps the calibration section of EEPROM to DDR.
> - *
> - * Arguments:
> - *		Adapter    - ptr to Adapter object instance
> - * Returns:
> - *		OSAL_STATUS_CODE
> - *
> - */
> -
> -int PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
> -{
> -	PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL);
> -	unsigned int uiEepromSize = 0;
> -	unsigned int uiIndex = 0;
> -	unsigned int uiBytesToCopy = 0;
> -	unsigned int uiCalStartAddr = EEPROM_CALPARAM_START;
> -	unsigned int uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC;
> -	unsigned int value;
> -	int Status = 0;
> -
> -	if (!pBuff)
> -		return -ENOMEM;
> -
> -	if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, EEPROM_SIZE_OFFSET, 4)) {
> -		kfree(pBuff);
> -		return -1;
> -	}
> -
> -	uiEepromSize >>= 16;
> -	if (uiEepromSize > 1024 * 1024) {
> -		kfree(pBuff);
> -		return -1;
> -	}
> -
> -	uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
> -
> -	while (uiBytesToCopy) {
> -		if (0 != BeceemEEPROMBulkRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiBytesToCopy)) {
> -			Status = -1;
> -			break;
> -		}
> -		wrm(Adapter, uiMemoryLoc, (PCHAR)(((PULONG)pBuff) + uiIndex), uiBytesToCopy);
> -		uiMemoryLoc += uiBytesToCopy;
> -		uiEepromSize -= uiBytesToCopy;
> -		uiCalStartAddr += uiBytesToCopy;
> -		uiIndex += uiBytesToCopy / 4;
> -		uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
> -
> -	}
> -	value = 0xbeadbead;
> -	wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, sizeof(value));
> -	value = 0xbeadbead;
> -	wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, sizeof(value));
> -	kfree(pBuff);
> -
> -	return Status;
> -}
> -
> -/*
>   * Procedure:	PropagateCalParamsFromFlashToMemory
>   *
>   * Description: Dumps the calibration section of EEPROM to DDR.
> -- 
> 1.7.9.5
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-21 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-21 10:33 [PATCH 2/2] drivers: bcm: Remove unused function in nvm.c Rashika Kheria
2013-12-21 10:58 ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox