Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp2291325imc; Fri, 22 Feb 2019 23:44:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IaExUYRkIHddNDVEvzgcj+m8KREIcU/zMUYPWrvPTHg5JmRs7IljLmnQ/K0DCfVJzws1kxW X-Received: by 2002:a17:902:8d94:: with SMTP id v20mr8223054plo.194.1550907844067; Fri, 22 Feb 2019 23:44:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550907844; cv=none; d=google.com; s=arc-20160816; b=SLRAdp3Did3onCBHXOhU7efatTF9mLnP5SvLHXow1HSYzG0u1Lh2TMiowsGXfgOk3j DH6A2oI6VqOlKPIBZQVVz5cAcf+cViTsOPxUqGoYGEFYdnlln+SM649i7qJZz2lVSMAS lpvyk2d34k6QNC5RAn/j6xn3IBEnn+8YA1wm5TQ/r0HCAViyENcVK392UJA/NkSsf/mJ PnlJ1D4WUJs3FDEuysiQtD31fuCu6BbGLVUr/u42/YMI6dB8zwLJwS5/w6p9RcqEEQeo wSNgdetjH6YW+We2JjiiX0aNZBzzH9dAKsKX4woXs2WdAUqgTyOFwSK7Y06kN5QHEfn1 Uoug== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GkjqnbMLL8POAeXagQwnDcNMsXIbGa2QjMf6VvjFRec=; b=R1Qf5t4pPtOL2cX1eY4qDOvWAxy1/DjqBd+kOHZBQ+uWY22mv7Macb2CvSJsXIfRxQ L3Z2Ndlrc1+EGIW1kEUyDGNhGI18SAxkYSFBVKdh8XyRdvrDdbfgP4oOTmxuuD5Wbq+7 /PuqYAsAEzClaV2fy/vVj9yn/6GAIOAqls3KhSNlU1dGC6Is3d4cjUjAqHlUEXheJvx2 11hw6zyWiASQTlg9huRQJVW5vHfCX2i7jBYhRlcpPSAXEfAvLq6VfMA5GX/XUwc2Xcmo UddkmZxzLbo6WyvyiJ83v/Ut4/zYeEdCJSMCg+D3ITaOea+PVKUhpuWqm1XkH3tTnLMt HM+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wSGBOOH4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si3189554pgc.354.2019.02.22.23.43.45; Fri, 22 Feb 2019 23:44:04 -0800 (PST) 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=@kernel.org header.s=default header.b=wSGBOOH4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725918AbfBWHnY (ORCPT + 99 others); Sat, 23 Feb 2019 02:43:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:49352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbfBWHnX (ORCPT ); Sat, 23 Feb 2019 02:43:23 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91995206A3; Sat, 23 Feb 2019 07:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550907803; bh=aGvlpN37P3p8qZGTKmwvgAEiyJzVsBTEheGR1UySqpw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wSGBOOH4WiMHZjrBqAIuYFAqHOL52IE41cY6x557PLI5AEiyyFK0esaA1+k75Bru/ dJnLmsRkseBdAej8xaz1kGjgLR27NEQNKjzewc/ozjXGh4QBd20NLI+gaZKuUpJyvP b088+2l2WdeUgS5QFb4OPhYRw+coB5rTjPMvRWCY= Date: Sat, 23 Feb 2019 08:43:20 +0100 From: Greg KH To: Bo YU Cc: sergio.paracuellos@gmail.com, quytelda@tamalin.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, yuzibode@126.com Subject: Re: [PATCH] staging/ks7070: Removed unused varibale Message-ID: <20190223074320.GA921@kroah.com> References: <20190223063939.18261-1-tsu.yubo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190223063939.18261-1-tsu.yubo@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 23, 2019 at 01:39:39AM -0500, Bo YU wrote: > From: Bo Yu > > Compiling the kernel with W=1 results in the following warning: > > drivers/staging/ks7010/ks_hostif.c:465:6: warning: variable ‘mib_val_type’ > set but not used [-Wunused-but-set-variable] > u16 mib_val_type; > > drivers/staging/ks7010/ks_hostif.c:464:6: warning: variable ‘mib_val_size’ > set but not used [-Wunused-but-set-variable] > u16 mib_val_size; > > drivers/staging/ks7010/ks_hostif.c:786:6: warning: variable ‘result_code’ > set but not used [-Wunused-but-set-variable] > u16 result_code; > > Remove these variables. > > Rebase on next-20190222 > > Cc: Greg Kroah-Hartman > Cc: Sergio Paracuellos > Cc: Quytelda Kahja > > Signed-off-by: Bo Yu > --- > drivers/staging/ks7010/ks_hostif.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c > index d938b0997a53..913d8996437a 100644 > --- a/drivers/staging/ks7010/ks_hostif.c > +++ b/drivers/staging/ks7010/ks_hostif.c > @@ -461,13 +461,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv) > struct net_device *dev = priv->net_dev; > u32 mib_status; > u32 mib_attribute; > - u16 mib_val_size; > - u16 mib_val_type; > > mib_status = get_dword(priv); > mib_attribute = get_dword(priv); > - mib_val_size = get_word(priv); > - mib_val_type = get_word(priv); The function get_word() actually does something to the priv structure, so you just broke the driver :( > > if (mib_status) { > netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n", > @@ -783,9 +779,7 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv) > static > void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv) > { > - u16 result_code; > > - result_code = get_word(priv); > priv->infra_status = 1; /* infrastructure mode set */ > hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM); Same here, odds are you just broke things :( Please be more careful. greg k-h