From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750999AbbFLFWk (ORCPT ); Fri, 12 Jun 2015 01:22:40 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33609 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbbFLFWh (ORCPT ); Fri, 12 Jun 2015 01:22:37 -0400 Date: Fri, 12 Jun 2015 10:52:30 +0530 From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging: rtl8188eu: remove unused variables Message-ID: <20150612052230.GB15912@sudip-PC> References: <1434028149-4135-1-git-send-email-sudipm.mukherjee@gmail.com> <1434028149-4135-2-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434028149-4135-2-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2015 at 06:39:09PM +0530, Sudip Mukherjee wrote: > These variables were being set but not used afterwards. > > --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c > +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c > @@ -147,18 +147,14 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int > static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) > { > struct list_head *plist, *phead; > - struct sta_info *psta = NULL; > - > > spin_lock_bh(&pstapriv->sta_hash_lock); > > phead = get_list_head(&pstapriv->free_sta_queue); > plist = phead->next; > > - while (phead != plist) { > - psta = container_of(plist, struct sta_info, list); > + while (phead != plist) > plist = plist->next; > - } > > spin_unlock_bh(&pstapriv->sta_hash_lock); I am checking my own patch ... :) looks like this function is not doing anything. its just getting the lock, traversing the list, unlocking and returning. I am guessing by the function name that the function was supposed to free something. Greg - please drop this series. I will try to find if something can be freed else I will remove this function. regards sudip