From patchwork Tue Nov 1 13:48:10 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: 13673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2977787wru; Tue, 1 Nov 2022 06:51:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4j2zKfI1wBwaoIiWJ0elUEK0OvP7Al7VYtNdGvMDGJWL5jte3PO4SpvKz0vMWCuxFkStLM X-Received: by 2002:a17:907:3f0c:b0:78e:2090:6924 with SMTP id hq12-20020a1709073f0c00b0078e20906924mr18814008ejc.332.1667310693123; Tue, 01 Nov 2022 06:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667310693; cv=none; d=google.com; s=arc-20160816; b=XqYGKX0ie1kjf/gnoDU/luRzw929ImJ9mzVY3j0k0qY8mj4xub1RMMAJKo5OMYt5Ca JpKrqfJ9e4IpsSkC/KbSAL2NHJdpeZVRtammDq7lMiR+yw+j+HdhR2sDPW0rX5eRiEXf DtiADTu+61w6FMFiRL5JhbY1uOorg51tz4z/IaRVhQI+eYuvtj36s2C4cHzKR/FcEWEU ekR2CqXFoi7ldsyuZG7yMJcVOKYtiDNxe21iyzRFbczUug7Fz1QTMLkDy3QFYxy0jGvD pqc7s3FUwJswqjh8Xvk+rKhTFwRzeoVGUDUp3GfYmDiCyJs5xJ6cyBCXVtcf1Hd51WhT 4Bug== 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=oY3AjGucgSMFZNkasXHZboSxo7WQkXHy3cf12jBk9o0=; b=lGk2pMbn3w4EGjI4Q+j8L4acWeMOVuo75UnYNd8PWhJkZBLpAB/v/czFvXXaAZdTem TEANmQayPXivycDWGUyEDXQ/+xiPH6S8QTe7zkukUXSE5rNiWOla7b9Rv8w+YQ1HZPmS wl2EaFZvVepPRvQ8/73DIGib79qw35LckOZ7r+SDQt7Kc3TvTDtsCFEOv8sBEiq84SmV /hchV6dF/oOYvmABaRv7uVr5t92Hzm7BMx29u/a6CBTdW9G794lxO++X1sH0mTFeGcJK S3OOu6DD3B3n7b8cqpgBaitNlNocDbkUQDeL4uyytJ5fuCLdRcQ5+1UiEJMwY9Yhurh9 fijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=h0ytcWHL; 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 jg36-20020a170907972400b007add8ec38aesi5725709ejc.424.2022.11.01.06.51.08; Tue, 01 Nov 2022 06:51:33 -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=h0ytcWHL; 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 S229991AbiKANsX (ORCPT + 99 others); Tue, 1 Nov 2022 09:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiKANsV (ORCPT ); Tue, 1 Nov 2022 09:48:21 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29107A7 for ; Tue, 1 Nov 2022 06:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1667310493; bh=FNdZHPIXSMqReTu7V7OLhEbcfqLKVeX8EB+0vnG4PBo=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=h0ytcWHLTY4pkEjjk22m33rTbMiwNeT/jOaOedq7rv0tk7di1ZMX9TjE2sfoO1aMw 5AE1DenTbi+E8LDHHMvaXR5qyTGXOKJ8HLGNUpIXK5rWDRuB+WwInyNdjWpf0bSLyU /8pP+mY+4p08j08SMNi5COMGMDrhLsBZ2xA1P5o4= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via [213.182.55.206] Tue, 1 Nov 2022 14:48:13 +0100 (CET) X-EA-Auth: PONAtjAXCOVWqqpb0fs+8wLWjA/64MWw6vvfq5B0q/Z5Rz/CGiHLJLNDNxnbOIx3Zx1nilKCZZAeewY7zlSTvcQIWt5TMSEA Date: Tue, 1 Nov 2022 19:18:10 +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 1/7] staging: wlan-ng: Remove unused struct wlan_ie_ssid references Message-ID: <6e39ef59d01d65a1e179f6aecfbb0d68b81fa257.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?1748301977375897326?= X-GMAIL-MSGID: =?utf-8?q?1748301977375897326?= Pointer reference to struct wlan_ie_ssid is added as a member variable to 5 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 | 12 ------------ 1 file changed, 12 deletions(-) -- 2.34.1 diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index 1ef30d3f3159..dcff56d18498 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; -/*-- Service Set Identity (SSID) -----------------*/ -struct wlan_ie_ssid { - u8 eid; - u8 len; - u8 ssid[1]; /* may be zero, ptrs may overlap */ -} __packed; - /*-- Supported Rates -----------------------------*/ struct wlan_ie_supp_rates { u8 eid; @@ -319,7 +312,6 @@ struct wlan_fr_beacon { u16 *bcn_int; u16 *cap_info; /*-- info elements ----------*/ - struct wlan_ie_ssid *ssid; struct wlan_ie_supp_rates *supp_rates; struct wlan_ie_fh_parms *fh_parms; struct wlan_ie_ds_parms *ds_parms; @@ -372,7 +364,6 @@ struct wlan_fr_assocreq { u16 *cap_info; u16 *listen_int; /*-- info elements ----------*/ - struct wlan_ie_ssid *ssid; struct wlan_ie_supp_rates *supp_rates; }; @@ -407,7 +398,6 @@ struct wlan_fr_reassocreq { u16 *listen_int; u8 *curr_ap; /*-- info elements ----------*/ - struct wlan_ie_ssid *ssid; struct wlan_ie_supp_rates *supp_rates; }; @@ -439,7 +429,6 @@ struct wlan_fr_probereq { void *priv; /*-- fixed fields -----------*/ /*-- info elements ----------*/ - struct wlan_ie_ssid *ssid; struct wlan_ie_supp_rates *supp_rates; }; @@ -457,7 +446,6 @@ struct wlan_fr_proberesp { u16 *bcn_int; u16 *cap_info; /*-- info elements ----------*/ - struct wlan_ie_ssid *ssid; struct wlan_ie_supp_rates *supp_rates; struct wlan_ie_fh_parms *fh_parms; struct wlan_ie_ds_parms *ds_parms;