From patchwork Sun Nov 19 22:15:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 166902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1858869vqn; Sun, 19 Nov 2023 14:16:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTOcsgRQjOp0tVKlqObqtvrUv443dtTbfOSov9wUzYJCAcWUk1R7x03oO8noDo0q1e4A3p X-Received: by 2002:a05:6830:1b72:b0:6b9:924e:b43b with SMTP id d18-20020a0568301b7200b006b9924eb43bmr6184566ote.6.1700432208251; Sun, 19 Nov 2023 14:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700432208; cv=none; d=google.com; s=arc-20160816; b=ghX22YlHYXojArxl7A8VXJBbrXfvVz10yirJ1awX0T2RAY3btlHwJlhNfksRkkQ1YM Q7nvvg/Y86JlPLZMY8Q8Qf6WgWPCO4FqB3yNFcjZJhn41m6D3bsEzOohNlFykJXmW/CT JnXqS+jo7haQ72OqiiY0zTM4N/oagPlqLifPXusyOREzYFkhj2yIA9DFXSSiisQZvqce 1FSKg+FHIbP1SjtVdwCfV2vvQgDi9/7HPKXEnsNvpvQxWJMTCG0gHuo8VG3qw4wc/GJs 9v0dBk1shc5q05mhamfqB75TEaWtXgNn2xsprG/d70BO0ZXQBBAEhC+C45XC4EEVp+UJ Jaxw== 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=aoxqGEFk9urPUCn7RYMpHrc4r9kPUjHKVpLcLoj2K+I=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=aggX3nwjtOPvtUoKzYkq53it+ubgSV01xHy5Z3iylRIWzjc3hnNF3HcxXda4twG89W 8ceUhtYF+2AVpuMAM5J4OSLUBcsX1xJwFtTW1Jf9mDz/KqtW1dAi3Gj6HzAnd68uexAK 7fJ+05fe929SK0v6yhGXbcupXgtOzfjEBQdVUoPHP/2lKsXHfJjAMc+EpTPMDsMVKdLV Ca+fYIPkUORK1YUbg4q0/obQTVdedS85UlRVn8V8TJFeQfwQncdsEnpm2c6XEzXi4nfx FYbvXJfNtnbsuPkKutnijVm4gieNbNUPEWJzUmOoL4QGm3N/4IOvQZ31zbb6UY2Nlzwg in+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=B35Yp2Oh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id b19-20020a63d313000000b005ac8d44bad4si6852342pgg.592.2023.11.19.14.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 14:16:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=B35Yp2Oh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 31A178083E7B; Sun, 19 Nov 2023 14:16:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231628AbjKSWQ2 (ORCPT + 28 others); Sun, 19 Nov 2023 17:16:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231974AbjKSWQH (ORCPT ); Sun, 19 Nov 2023 17:16:07 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097F31728 for ; Sun, 19 Nov 2023 14:15:51 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9fd57d009fcso19857466b.1 for ; Sun, 19 Nov 2023 14:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700432149; x=1701036949; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aoxqGEFk9urPUCn7RYMpHrc4r9kPUjHKVpLcLoj2K+I=; b=B35Yp2OhfbkJlUvHwYDBt4Tsa6zxNU/Z8jnp00Ib22r7dJsM0Md0ttoJNtsP5cFKsi pxWnmGy8LPcNDhK54s7K/Kw1o1K4RDU1KnQ44vaSK6EgVjrBKiiNEWEaELFYrHrVVCAI zadN8yvCKVqSeIgr1215UvX5YxgeYb9redVu+oO36IBNOF8vfTYLkl/kyIx7uARFVLSj Nx5iddeAZET+ih4o67GFIK12O1AGwCZp5seD3rfagtUxO60Izoukf48E1lTu/jU5Zn1y l01LzW9s1PJN8MqC1yxYDjmw+XJI0D1eE92v6IytRUkwriti6phqScVYeg/CTtnvB2Jt AhsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700432149; x=1701036949; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aoxqGEFk9urPUCn7RYMpHrc4r9kPUjHKVpLcLoj2K+I=; b=UNu5uGxWmvwTB/r/t1jlrEKuIHBbw1v8XgpyW6AkqwzpTolEcpomUtnuSizk0zxSey PYUz2BPLinK//EXKqsxepFfB2INidDwRZozO7bW7Ddh3ZpFElHxiaf34IY6bCM/AxEor VmMPwpZTK/JS83dkKiZ0jCLmftm1J22nu4YTl+B9hShnycHuHbZqh+mIguERMUtFApF9 QJxcFWrt5lBXQsxEXYsZD1pj0H2nhDp8vZLV5W/I+HATfuFJD4wKgXKJxfcCQRLH37bI LJbvCF2s+nSPyKhfOl+EVrxAGAY+y17i9/U63tdrnl5VzbCdBnSNlDH6EeoSAgvr8/DP QQEQ== X-Gm-Message-State: AOJu0Yygu5z4FWjzeC5k5NMLx2UJ+5/awPjCoJGhPTLYD8asc13KuyK6 VpBHevSB6wVYsg6NaqMBnwo/mguUtuQ= X-Received: by 2002:a17:906:1da:b0:9be:4cf4:d62e with SMTP id 26-20020a17090601da00b009be4cf4d62emr4303045ejj.5.1700432149497; Sun, 19 Nov 2023 14:15:49 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07fa0.dip0.t-ipconnect.de. [84.160.127.160]) by smtp.gmail.com with ESMTPSA id e2-20020a170906c00200b009fb1c3ce877sm1755880ejz.76.2023.11.19.14.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 14:15:49 -0800 (PST) Date: Sun, 19 Nov 2023 23:15:47 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 12/14] staging: rtl8192e: Remove unused function dot11d_init() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 19 Nov 2023 14:16:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783032403205309636 X-GMAIL-MSGID: 1783032403205309636 The variable dot11d_info->channel_map is initialized in dot11d_init() and in dot11d_channel_map(). dot11d_init() is called only once just before dot11d_channel_map(). Therefore dot11d_init() can be removed. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/dot11d.c | 8 -------- drivers/staging/rtl8192e/dot11d.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c index fd488e2fa815..9ec112e00e38 100644 --- a/drivers/staging/rtl8192e/dot11d.c +++ b/drivers/staging/rtl8192e/dot11d.c @@ -14,14 +14,6 @@ struct channel_list { static struct channel_list channel_array = {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}; -void dot11d_init(struct rtllib_device *ieee) -{ - struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee); - - memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1); -} -EXPORT_SYMBOL(dot11d_init); - void dot11d_channel_map(struct rtllib_device *ieee) { int i; diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index 82748b12bd82..767bbbc8b01d 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -31,7 +31,6 @@ struct rt_dot11d_info { #define GET_DOT11D_INFO(__ieee_dev) \ ((struct rt_dot11d_info *)((__ieee_dev)->dot11d_info)) -void dot11d_init(struct rtllib_device *dev); void dot11d_channel_map(struct rtllib_device *ieee); #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 4b842a1789c2..c3466291e221 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -795,7 +795,6 @@ static short _rtl92e_get_channel_map(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); - dot11d_init(priv->rtllib); dot11d_channel_map(priv->rtllib); for (i = 1; i <= 11; i++) (priv->rtllib->active_channel_map)[i] = 1;