From patchwork Tue Nov 1 13:48:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 13677 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2978477wru; Tue, 1 Nov 2022 06:52:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ZgPAFnuPIdwzhp5paX067Fae15/MlyOCDlundfhi16V95W66i5hiHcktf43orXwkg8dMc X-Received: by 2002:a05:6402:11c7:b0:462:549d:fbbe with SMTP id j7-20020a05640211c700b00462549dfbbemr19065818edw.199.1667310773537; Tue, 01 Nov 2022 06:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667310773; cv=none; d=google.com; s=arc-20160816; b=XEq8L9TP7jUsb5ry4LvlkNR7p2VhzrFsOmkcGfU5IiB5i20JxzInD/EoOiwR3R/yW1 JZsgnhC7GP8wlbzHNq+wW6QFBqzvSXhDaymydHg/JN8eWyOM5ek1d4ZiH1B8FdTEml/H yXmKViClEiLkuGwk1LdlbUgsbmuSbGx7A7CHvACaBA9MGRYeexpiIEJb0KMMReCsoDKT P/aXEk2wTlTMCu+ofb1G8pRDp9BtigOyqaOpdDixXF0q5w1R5jfwzbN3I4RgvjYduuiJ 3NrEyovLQNt3FHshEw8DXfNkH70zaaZqAt2rpYNMLHKQJE+WArA8cyKuw3/6mw9yuyf3 C4Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=xfGlS7cEqANK7fPw1kzGECSFzTYGDPgu22Q8i39orjE=; b=RVBbjobceyg/NXdSQ9LgBgkl/PHD6qHvDkQID0/MYDC7rm6izvaZXVI02y11DqL4lL IiiHJ2pssPFIv+rIC2srIDTV4vBwoSIjDaUqgS437wBQdThDWdI897zY+1V9qjmj+RCT iCTURNCHmTzei4bRt0QjIaC1CUkbOAhvNPExUHxwf3HWkx922E5ssooAqu4s2pyQdLnN fkxw41uCql0ZoeewA3USkUnwgIymY2ATQgK7LL0X7CtVuoNiyab9nTjGphxd49eaG6zQ IO77zEN+jUd+IW9tI+2aJMjKKuoHbQWbnRP3pJmLDU2bNbaQBjEjkCFLMoJzdXXKPdNh PGwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="fVcb+/nu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a056402354d00b0045cca8f9a0asi13007679edd.580.2022.11.01.06.52.29; Tue, 01 Nov 2022 06:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="fVcb+/nu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230100AbiKANtL (ORCPT + 99 others); Tue, 1 Nov 2022 09:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbiKANsy (ORCPT ); Tue, 1 Nov 2022 09:48:54 -0400 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5844A64DC for ; Tue, 1 Nov 2022 06:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1667310519; bh=vD5xPP6rhDMyEPUB2EJfYmq4IJWWiXIGuVb0HXRZWT4=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=fVcb+/nupJ7AhmJnZetNK34/9sZngg5xfUJsvcaYThBAwhncmsYLqdFmE5XItZ1yp h+O9SuSPXpN+fOD4lSZF0bo30/fA36OtRLLHISFPXtk/uBqN423wJLLC4QCfPRD5R2 WeoXRd9xg13Tt/G2PPHucnD4a4EaTNf9355JLqpw= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.206] Tue, 1 Nov 2022 14:48:39 +0100 (CET) X-EA-Auth: X4pN+7UwV7tuIgo8s4NSyRI91QHFNeZwe3Lbq6lEeocWM1koDQGJMOfbBYzQ20847gAz1Jl7Tuk5oWFzZrXgTyHCm0VQ1Fqw Date: Tue, 1 Nov 2022 19:18:35 +0530 From: Deepak R Varma To: outreachy@lists.linux.dev, Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] staging: wlan-ng: Remove unused struct wlan_ie_supp_rates references Message-ID: <370feb1f300896af66fa1c443d3ad19dc8934be3.1667308828.git.drv@mailo.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748302061533668919?= X-GMAIL-MSGID: =?utf-8?q?1748302061533668919?= Pointer reference to struct wlan_ie_supp_rates is added as a member variable to 7 different structures. However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma --- Changes in v2: 1. Include additional code clean-up opportunities and combine changes in a patch set based on impact areas. 2. The patch changes are compile tested only on X86 arch. drivers/staging/wlan-ng/p80211mgmt.h | 14 -------------- 1 file changed, 14 deletions(-) -- 2.34.1 diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index dcff56d18498..536794bdd1f0 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -225,13 +225,6 @@ struct wlan_ie { u8 len; } __packed; -/*-- Supported Rates -----------------------------*/ -struct wlan_ie_supp_rates { - u8 eid; - u8 len; - u8 rates[1]; /* had better be at LEAST one! */ -} __packed; - /*-- FH Parameter Set ----------------------------*/ struct wlan_ie_fh_parms { u8 eid; @@ -312,7 +305,6 @@ struct wlan_fr_beacon { u16 *bcn_int; u16 *cap_info; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; struct wlan_ie_fh_parms *fh_parms; struct wlan_ie_ds_parms *ds_parms; struct wlan_ie_cf_parms *cf_parms; @@ -364,7 +356,6 @@ struct wlan_fr_assocreq { u16 *cap_info; u16 *listen_int; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; }; @@ -381,7 +372,6 @@ struct wlan_fr_assocresp { u16 *status; u16 *aid; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; }; @@ -398,7 +388,6 @@ struct wlan_fr_reassocreq { u16 *listen_int; u8 *curr_ap; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; }; @@ -415,7 +404,6 @@ struct wlan_fr_reassocresp { u16 *status; u16 *aid; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; }; @@ -429,7 +417,6 @@ struct wlan_fr_probereq { void *priv; /*-- fixed fields -----------*/ /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; }; @@ -446,7 +433,6 @@ struct wlan_fr_proberesp { u16 *bcn_int; u16 *cap_info; /*-- info elements ----------*/ - struct wlan_ie_supp_rates *supp_rates; struct wlan_ie_fh_parms *fh_parms; struct wlan_ie_ds_parms *ds_parms; struct wlan_ie_cf_parms *cf_parms;