public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vt6655: mac.c:  Remove unused function
@ 2014-12-07 22:02 Rickard Strandqvist
  2014-12-08  5:38 ` Sudip Mukherjee
  2015-01-13  3:34 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Rickard Strandqvist @ 2014-12-07 22:02 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman
  Cc: Rickard Strandqvist, Guido Martínez, Malcolm Priestley,
	Guillaume Clement, Joe Perches, devel, linux-kernel

Remove the function MACbCompareContext() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/staging/vt6655/mac.c |   42 ------------------------------------------
 drivers/staging/vt6655/mac.h |    1 -
 2 files changed, 43 deletions(-)

diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index e3b0b7f..8254879 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -49,7 +49,6 @@
  *      MACvSetPacketFilter - Set MAC Address Filter
  *      MACvSaveContext - Save Context of MAC Registers
  *      MACvRestoreContext - Restore Context of MAC Registers
- *      MACbCompareContext - Compare if values of MAC Registers same as Context
  *      MACbSoftwareReset - Software Reset MAC
  *      MACbSafeRxOff - Turn Off MAC Rx
  *      MACbSafeTxOff - Turn Off MAC Tx
@@ -702,47 +701,6 @@ void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf)
 
 /*
  * Description:
- *      Compare if MAC registers same as context buffer
- *
- * Parameters:
- *  In:
- *      dwIoBase    - Base Address for MAC
- *      pbyCxtBuf   - Context buffer
- *  Out:
- *      none
- *
- * Return Value: true if all values are the same; otherwise false
- *
- */
-bool MACbCompareContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf)
-{
-	unsigned long dwData;
-
-	// compare MAC context to determine if this is a power lost init,
-	// return true for power remaining init, return false for power lost init
-
-	// compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
-	VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
-	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0))
-		return false;
-
-	VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, &dwData);
-	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR))
-		return false;
-
-	VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, &dwData);
-	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0))
-		return false;
-
-	VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, &dwData);
-	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1))
-		return false;
-
-	return true;
-}
-
-/*
- * Description:
  *      Software Reset MAC
  *
  * Parameters:
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 0bf9375..811c459 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -1006,7 +1006,6 @@ void MACvSetPacketFilter(void __iomem *dwIoBase, unsigned short wFilterType);
 
 void MACvSaveContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
 void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
-bool MACbCompareContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
 
 bool MACbSoftwareReset(void __iomem *dwIoBase);
 bool MACbSafeSoftwareReset(void __iomem *dwIoBase);
-- 
1.7.10.4


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

* Re: [PATCH] staging: vt6655: mac.c:  Remove unused function
  2014-12-07 22:02 [PATCH] staging: vt6655: mac.c: Remove unused function Rickard Strandqvist
@ 2014-12-08  5:38 ` Sudip Mukherjee
  2015-01-13  3:34 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2014-12-08  5:38 UTC (permalink / raw)
  To: Rickard Strandqvist
  Cc: Forest Bond, Greg Kroah-Hartman, Guido Martínez,
	Malcolm Priestley, Guillaume Clement, Joe Perches, devel,
	linux-kernel

On Sun, Dec 07, 2014 at 11:02:44PM +0100, Rickard Strandqvist wrote:
> Remove the function MACbCompareContext() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---

not applying to next-20141205

sudip

>  drivers/staging/vt6655/mac.c |   42 ------------------------------------------
>  drivers/staging/vt6655/mac.h |    1 -
>  2 files changed, 43 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
> index e3b0b7f..8254879 100644
> --- a/drivers/staging/vt6655/mac.c
> +++ b/drivers/staging/vt6655/mac.c
> @@ -49,7 +49,6 @@
>   *      MACvSetPacketFilter - Set MAC Address Filter
>   *      MACvSaveContext - Save Context of MAC Registers
>   *      MACvRestoreContext - Restore Context of MAC Registers
> - *      MACbCompareContext - Compare if values of MAC Registers same as Context
>   *      MACbSoftwareReset - Software Reset MAC
>   *      MACbSafeRxOff - Turn Off MAC Rx
>   *      MACbSafeTxOff - Turn Off MAC Tx
> @@ -702,47 +701,6 @@ void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf)
>  
>  /*
>   * Description:
> - *      Compare if MAC registers same as context buffer
> - *
> - * Parameters:
> - *  In:
> - *      dwIoBase    - Base Address for MAC
> - *      pbyCxtBuf   - Context buffer
> - *  Out:
> - *      none
> - *
> - * Return Value: true if all values are the same; otherwise false
> - *
> - */
> -bool MACbCompareContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf)
> -{
> -	unsigned long dwData;
> -
> -	// compare MAC context to determine if this is a power lost init,
> -	// return true for power remaining init, return false for power lost init
> -
> -	// compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
> -	VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
> -	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0))
> -		return false;
> -
> -	VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, &dwData);
> -	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR))
> -		return false;
> -
> -	VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, &dwData);
> -	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0))
> -		return false;
> -
> -	VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, &dwData);
> -	if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1))
> -		return false;
> -
> -	return true;
> -}
> -
> -/*
> - * Description:
>   *      Software Reset MAC
>   *
>   * Parameters:
> diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
> index 0bf9375..811c459 100644
> --- a/drivers/staging/vt6655/mac.h
> +++ b/drivers/staging/vt6655/mac.h
> @@ -1006,7 +1006,6 @@ void MACvSetPacketFilter(void __iomem *dwIoBase, unsigned short wFilterType);
>  
>  void MACvSaveContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
>  void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
> -bool MACbCompareContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
>  
>  bool MACbSoftwareReset(void __iomem *dwIoBase);
>  bool MACbSafeSoftwareReset(void __iomem *dwIoBase);
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] staging: vt6655: mac.c:  Remove unused function
  2014-12-07 22:02 [PATCH] staging: vt6655: mac.c: Remove unused function Rickard Strandqvist
  2014-12-08  5:38 ` Sudip Mukherjee
@ 2015-01-13  3:34 ` Greg Kroah-Hartman
  2015-01-17 15:51   ` Rickard Strandqvist
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2015-01-13  3:34 UTC (permalink / raw)
  To: Rickard Strandqvist
  Cc: Forest Bond, devel, Guillaume Clement, Malcolm Priestley,
	linux-kernel, Joe Perches

On Sun, Dec 07, 2014 at 11:02:44PM +0100, Rickard Strandqvist wrote:
> Remove the function MACbCompareContext() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  drivers/staging/vt6655/mac.c |   42 ------------------------------------------
>  drivers/staging/vt6655/mac.h |    1 -
>  2 files changed, 43 deletions(-)

This doesn't apply to any tree that I can determine :(

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

* Re: [PATCH] staging: vt6655: mac.c: Remove unused function
  2015-01-13  3:34 ` Greg Kroah-Hartman
@ 2015-01-17 15:51   ` Rickard Strandqvist
  0 siblings, 0 replies; 4+ messages in thread
From: Rickard Strandqvist @ 2015-01-17 15:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Forest Bond, devel@driverdev.osuosl.org, Guillaume Clement,
	Malcolm Priestley, Linux Kernel Mailing List, Joe Perches

2015-01-13 4:34 GMT+01:00 Greg Kroah-Hartman <gregkh@linuxfoundation.org>:
> On Sun, Dec 07, 2014 at 11:02:44PM +0100, Rickard Strandqvist wrote:
>> Remove the function MACbCompareContext() that is not used anywhere.
>>
>> This was partially found by using a static code analysis program called cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>> ---
>>  drivers/staging/vt6655/mac.c |   42 ------------------------------------------
>>  drivers/staging/vt6655/mac.h |    1 -
>>  2 files changed, 43 deletions(-)
>
> This doesn't apply to any tree that I can determine :(

Hi


Sorry, I have now investigated this and these function is now removed.

Kind regards
Rickard Strandqvist

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

end of thread, other threads:[~2015-01-17 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-07 22:02 [PATCH] staging: vt6655: mac.c: Remove unused function Rickard Strandqvist
2014-12-08  5:38 ` Sudip Mukherjee
2015-01-13  3:34 ` Greg Kroah-Hartman
2015-01-17 15:51   ` Rickard Strandqvist

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