Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5633675ybe; Tue, 17 Sep 2019 11:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqybZGrepwe2C7SvG5iJFTENcHQl5bq7wbwdeLtSSX370ACNYCqViGX8Sw73YiuDEzF1G6/B X-Received: by 2002:a50:b6c8:: with SMTP id f8mr6107747ede.33.1568743329565; Tue, 17 Sep 2019 11:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568743329; cv=none; d=google.com; s=arc-20160816; b=JjovT530dLf57In2NhdkN7wl1zXN0FzzVj1Idp4fqvO1Bmv39FS4fqyXJrQk7fH9uq 5lAXK+k2IEeKgh7tOYEebgiuDdZU0Blw2yXrYaxFKLQiekkmNP1pKjFS81FexfBU2wcM TDHZKOzcLumk+TTAg85pXZLHmxtgtXJ3hoWC3u/HZMzeLqSpYLICdP9w3hidJjbiCa+p mZLY03ttrDQMxBjeBEh8jTg6g4+mrmt/GGzY4tzrx4xSms67l5nT9BzhajpxA/LYSeku MQvmyzBkFw9Uo4A2HJBisSaD1b4aVPUdZPzmgaPdRoAK+SnccYyX1XyJmcaUm9igARau zZSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N93vwwFf4mjqp6x9a/jB9GbKtKYBlCK0sv1YN8wfkSE=; b=HCwNPf97mgc9doxLKeaKaqiZm/H6svp5JUn9ua8CC0XuAyIaCTbCe1GuZvvAVcKR17 PRDO7BcgLgL88H3UMLwSYEPr4uHwor2FcL2imvpOomH2+eKwLaxDJjXqpuCKx3wTNaCR gC86WSb5ePUBUCjEkbrTD+aYwWS2gOplCqafPeU1ZsTbxT1bIz+fiod0PdRI5hQVg2wQ TsmzzoamW3tVjGQjXChqDXsQKB/EykPn9AivtdxwE0koLhAlBLN7DX/nI8N/y8JmucIh KhdgFkUUKenJEybxvmd8hokpXtoNkG76pwM7H3eJ5qcATlvCSSANO56LTlR2vP6QrO0w SlcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=PFR4+Jtl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y43si1840562edd.42.2019.09.17.11.01.45; Tue, 17 Sep 2019 11:02:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=PFR4+Jtl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728617AbfIQOpW (ORCPT + 99 others); Tue, 17 Sep 2019 10:45:22 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:41304 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbfIQOpV (ORCPT ); Tue, 17 Sep 2019 10:45:21 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8HESj17060137; Tue, 17 Sep 2019 14:45:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=N93vwwFf4mjqp6x9a/jB9GbKtKYBlCK0sv1YN8wfkSE=; b=PFR4+JtltiYrPINI2VrSo4yFWbJASdGro4l8C5neQKbTXWHJkA71ilpRw/PByAWMPKEW jraMAgGCBoq1y51jNsFVZqVutbVHlYVdD9CBeBULIHd//sCOyeR0LcH++rYTwfrMQIWO RiElPJuTaYPj184N5Peqgv8klTq7OWuA53luM9xuDZu4F8n4+NeDDUf+KBSpXFkzaq/v rfXY/ruklx1uJiPQNTj6qOZDpQY84mtKF8VWnLy31GIYiythyebqUEgDMozlIaM/69Ru YzCrP7czoW8HjlB/GXOimksh7MoFKN9M0qLpZIyGQrdr71exEg8ifPRcuDWcx7ztHsXS pQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2v0r5peyud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Sep 2019 14:45:17 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8HEjB7Q162032; Tue, 17 Sep 2019 14:45:17 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2v2tmsugec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Sep 2019 14:45:15 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x8HEipr6014678; Tue, 17 Sep 2019 14:44:52 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Sep 2019 07:44:50 -0700 Date: Tue, 17 Sep 2019 17:44:32 +0300 From: Dan Carpenter To: Aliasgar Surti Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables Message-ID: <20190917144432.GB2959@kadam> References: <1568730691-954-1-git-send-email-aliasgar.surti500@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1568730691-954-1-git-send-email-aliasgar.surti500@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9382 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=954 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909170144 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9382 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909170140 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 08:01:31PM +0530, Aliasgar Surti wrote: > From: Aliasgar Surti > > coccicheck reported warning for unneeded variable used. > > This patch removes the unneeded variables. > > Signed-off-by: Aliasgar Surti > --- > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > index d1b199e..fa3ffc3 100644 > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > @@ -2428,8 +2428,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info, > static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info, > union iwreq_data *wrqu, char *extra) > { > - int ret = 0; > - return ret; > + return 0; > } Just get rid of the whole function. Replace the pointer in the function array with a NULL. regards, dan carpenter