From nobody Fri Nov 29 17:41:17 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 446DF18A947 for ; Wed, 18 Sep 2024 11:10:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726657840; cv=none; b=imI5Au7p+NEOCFMlDm3xyC8FvmFZXEXQjC/WC10fehYxI937/vIFqmU/oO0IWIGiyhgg9MQAm250euo8JoruGTNtwXkJDAbJFBKP0pG9yODd4OD8YhXOtTHefbpWI92kEGDqONMzbKiaZLuZy94eVtGcsCo4cvuSz8YW+NBtE/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726657840; c=relaxed/simple; bh=JveW4UQoKxbbP5QkK8IlkF8VflK/7i/hbEyhgJXRFnw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WRzf69uyNOFOnPo6muPaXnb2KnalnMNV/Fs11Oo7ty4a2g94/gFjyA23hDW4HHOxoVlNbyQt2pOiVQ/ndoDeUhh5OMPxqrrqswTRiR5JIDs7XBghTSZjlvjYxXS02t9c/Jry46dqaPWCJ9Kk28ZSyxuCD+Wk/dP0vRUA3D3Ifyo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqsZs-0007wd-Pi; Wed, 18 Sep 2024 13:10:32 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqsZr-008nTA-F8; Wed, 18 Sep 2024 13:10:31 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1sqsZr-0086AC-19; Wed, 18 Sep 2024 13:10:31 +0200 From: Sascha Hauer Date: Wed, 18 Sep 2024 13:10:30 +0200 Subject: [PATCH v2 05/12] wifi: mwifiex: drop unnecessary initialization Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240918-mwifiex-cleanup-1-v2-5-2d0597187d3c@pengutronix.de> References: <20240918-mwifiex-cleanup-1-v2-0-2d0597187d3c@pengutronix.de> In-Reply-To: <20240918-mwifiex-cleanup-1-v2-0-2d0597187d3c@pengutronix.de> To: Brian Norris , Francesco Dolcini , Kalle Valo Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, David Lin , kernel@pengutronix.de, Sascha Hauer , Francesco Dolcini X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726657831; l=2020; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=JveW4UQoKxbbP5QkK8IlkF8VflK/7i/hbEyhgJXRFnw=; b=O/ZCLzfZ+uSyGXzrRpcXAEat32qPNId8OIwnhxBNvo2XQPolB+n2EpVAIoQkrMncC2mcykWHs cVNB5qT+4SeDnFl7xHLhwdlcSS4VPATLuCxp0SPwJpyLS0uofUEDiCf X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Several functions initialize the priv * without actually using the initialized value. Drop the initialization. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer --- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 6 ++---- drivers/net/wireless/marvell/mwifiex/txrx.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wi= reless/marvell/mwifiex/cmdevt.c index 0c175c6a1b201..8a2ad0038d36f 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c @@ -472,8 +472,7 @@ void mwifiex_free_cmd_buffer(struct mwifiex_adapter *ad= apter) int mwifiex_process_event(struct mwifiex_adapter *adapter) { int ret, i; - struct mwifiex_private *priv =3D - mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); + struct mwifiex_private *priv; struct sk_buff *skb =3D adapter->event_skb; u32 eventcause; struct mwifiex_rxinfo *rx_info; @@ -808,8 +807,7 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapt= er) int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter) { struct host_cmd_ds_command *resp; - struct mwifiex_private *priv =3D - mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); + struct mwifiex_private *priv; int ret =3D 0; uint16_t orig_cmdresp_no; uint16_t cmdresp_no; diff --git a/drivers/net/wireless/marvell/mwifiex/txrx.c b/drivers/net/wire= less/marvell/mwifiex/txrx.c index bd91678d26b49..f44e22f245110 100644 --- a/drivers/net/wireless/marvell/mwifiex/txrx.c +++ b/drivers/net/wireless/marvell/mwifiex/txrx.c @@ -24,8 +24,7 @@ int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb) { - struct mwifiex_private *priv =3D - mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); + struct mwifiex_private *priv; struct rxpd *local_rx_pd; struct mwifiex_rxinfo *rx_info =3D MWIFIEX_SKB_RXCB(skb); int ret; --=20 2.39.5