Re: [PATCH] staging: slicoss: remove unused variables

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

 



On Fri, Sep 04, 2015 at 06:53:18PM +0530, Sudip Mukherjee wrote:
> These variables were only assigned some values but they were never used.
> 
> Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
> ---
>  drivers/staging/slicoss/slicoss.c | 27 ++++++---------------------
>  1 file changed, 6 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> index 8585970..1536ca0 100644
> --- a/drivers/staging/slicoss/slicoss.c
> +++ b/drivers/staging/slicoss/slicoss.c
> @@ -199,10 +199,8 @@ static void slic_mcast_set_mask(struct adapter *adapter)
>  static void slic_timer_ping(ulong dev)
>  {
>  	struct adapter *adapter;
> -	struct sliccard *card;
>  
>  	adapter = netdev_priv((struct net_device *)dev);
> -	card = adapter->card;
>  
>  	adapter->pingtimer.expires = jiffies + (PING_TIMER_INTERVAL * HZ);
>  	add_timer(&adapter->pingtimer);
> @@ -1719,7 +1717,6 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb)
>   */
>  static void slic_link_event_handler(struct adapter *adapter)
>  {
> -	int status;
>  	struct slic_shmem *pshmem;
>  
>  	if (adapter->state != ADAPT_UP) {
> @@ -1730,15 +1727,13 @@ static void slic_link_event_handler(struct adapter *adapter)
>  	pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem;
>  
>  #if BITS_PER_LONG == 64
> -	status = slic_upr_request(adapter,
> -				  SLIC_UPR_RLSR,
> -				  SLIC_GET_ADDR_LOW(&pshmem->linkstatus),
> -				  SLIC_GET_ADDR_HIGH(&pshmem->linkstatus),
> -				  0, 0);
> +	slic_upr_request(adapter, SLIC_UPR_RLSR,
> +			 SLIC_GET_ADDR_LOW(&pshmem->linkstatus),
> +			 SLIC_GET_ADDR_HIGH(&pshmem->linkstatus), 0, 0);
>  #else
> -	status = slic_upr_request(adapter, SLIC_UPR_RLSR,
> -		(u32) &pshmem->linkstatus,	/* no 4GB wrap guaranteed */
> -				  0, 0, 0);
> +	slic_upr_request(adapter, SLIC_UPR_RLSR,
> +			 (u32)&pshmem->linkstatus, /* no 4GB wrap guaranteed */
> +			 0, 0, 0);

Shouldn't we do something with status instead of just ignoring it?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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