From nobody Sun Feb 8 12:42:58 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65CEBC77B7A for ; Tue, 6 Jun 2023 12:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236514AbjFFMXb (ORCPT ); Tue, 6 Jun 2023 08:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236080AbjFFMX3 (ORCPT ); Tue, 6 Jun 2023 08:23:29 -0400 Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A56B710CB for ; Tue, 6 Jun 2023 05:23:24 -0700 (PDT) Date: Tue, 06 Jun 2023 12:23:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atinb.me; s=protonmail; t=1686054202; x=1686313402; bh=cTfL7RXcA72zUyZdRLiJvjPG4O4S6ehTBzTONfxjw+s=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=GCuIgh0FEePKs4mNLQCOrXoJZNf6PveiPo8qbFgv+LFmlE0wmm8kM1nLIWNzvDirR WBK740p1SjuGBC9fBii3Po92m8mGqnyLu7bYIs3UcrTdQ8kmVcx9YzBvys8561l1Zz nuBFyN3PN2IpSM7+21VPfsfX7wtV0wAQw1BO0qDvYCCBIRf9EW1xfzg/XQluBiFwuf Hau9bE/HhcYHBOYrt45ijH6EHshVT8y6CnaOP07KHLTQwD8/49CfqJJJ1IsuVSt+If EcHjim0kiJMyjdlaz4HLxh756g7xZtQ70faIFf3zjaMKVTuDRIAvnp+kW4G7aeQsul qy/zPdXMkv2zg== To: andrew@lunn.ch From: Atin Bainada Cc: f.fainelli@gmail.com, olteanv@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Atin Bainada Subject: [PATCH] net: dsa: qca8k: remove unnecessary (void*) conversions Message-ID: <20230606122129.141815-1-hi@atinb.me> Feedback-ID: 64551405:user:proton MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Pointer variables of (void*) type do not require type cast. Signed-off-by: Atin Bainada --- drivers/net/dsa/qca/ar9331.c | 16 ++++++++-------- drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- drivers/net/dsa/qca/qca8k-common.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index e7b98b864fa1..b2bf78ac485e 100644 --- a/drivers/net/dsa/qca/ar9331.c +++ b/drivers/net/dsa/qca/ar9331.c @@ -391,7 +391,7 @@ static int ar9331_sw_mbus_init(struct ar9331_sw_priv *p= riv) =20 static int ar9331_sw_setup_port(struct dsa_switch *ds, int port) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct regmap *regmap =3D priv->regmap; u32 port_mask, port_ctrl, val; int ret; @@ -439,7 +439,7 @@ static int ar9331_sw_setup_port(struct dsa_switch *ds, = int port) =20 static int ar9331_sw_setup(struct dsa_switch *ds) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct regmap *regmap =3D priv->regmap; int ret, i; =20 @@ -484,7 +484,7 @@ static int ar9331_sw_setup(struct dsa_switch *ds) =20 static void ar9331_sw_port_disable(struct dsa_switch *ds, int port) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct regmap *regmap =3D priv->regmap; int ret; =20 @@ -527,7 +527,7 @@ static void ar9331_sw_phylink_mac_config(struct dsa_swi= tch *ds, int port, unsigned int mode, const struct phylink_link_state *state) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct regmap *regmap =3D priv->regmap; int ret; =20 @@ -542,7 +542,7 @@ static void ar9331_sw_phylink_mac_link_down(struct dsa_= switch *ds, int port, unsigned int mode, phy_interface_t interface) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct ar9331_sw_port *p =3D &priv->port[port]; struct regmap *regmap =3D priv->regmap; int ret; @@ -562,7 +562,7 @@ static void ar9331_sw_phylink_mac_link_up(struct dsa_sw= itch *ds, int port, int speed, int duplex, bool tx_pause, bool rx_pause) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct ar9331_sw_port *p =3D &priv->port[port]; struct regmap *regmap =3D priv->regmap; u32 val; @@ -665,7 +665,7 @@ static void ar9331_do_stats_poll(struct work_struct *wo= rk) static void ar9331_get_stats64(struct dsa_switch *ds, int port, struct rtnl_link_stats64 *s) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct ar9331_sw_port *p =3D &priv->port[port]; =20 spin_lock(&p->stats_lock); @@ -676,7 +676,7 @@ static void ar9331_get_stats64(struct dsa_switch *ds, i= nt port, static void ar9331_get_pause_stats(struct dsa_switch *ds, int port, struct ethtool_pause_stats *pause_stats) { - struct ar9331_sw_priv *priv =3D (struct ar9331_sw_priv *)ds->priv; + struct ar9331_sw_priv *priv =3D ds->priv; struct ar9331_sw_port *p =3D &priv->port[port]; =20 spin_lock(&p->stats_lock); diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8= xxx.c index 6d5ac7588a69..dee7b6579916 100644 --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c @@ -1756,7 +1756,7 @@ static int qca8k_connect_tag_protocol(struct dsa_swit= ch *ds, static int qca8k_setup(struct dsa_switch *ds) { - struct qca8k_priv *priv =3D (struct qca8k_priv *)ds->priv; + struct qca8k_priv *priv =3D ds->priv; int cpu_port, ret, i; u32 mask; =20 diff --git a/drivers/net/dsa/qca/qca8k-common.c b/drivers/net/dsa/qca/qca8k= -common.c index 96773e432558..8c2dc0e48ff4 100644 --- a/drivers/net/dsa/qca/qca8k-common.c +++ b/drivers/net/dsa/qca/qca8k-common.c @@ -760,7 +760,7 @@ int qca8k_port_fdb_add(struct dsa_switch *ds, int port, const unsigned char *addr, u16 vid, struct dsa_db db) { - struct qca8k_priv *priv =3D (struct qca8k_priv *)ds->priv; + struct qca8k_priv *priv =3D ds->priv; u16 port_mask =3D BIT(port); =20 return qca8k_port_fdb_insert(priv, addr, port_mask, vid); @@ -770,7 +770,7 @@ int qca8k_port_fdb_del(struct dsa_switch *ds, int port, const unsigned char *addr, u16 vid, struct dsa_db db) { - struct qca8k_priv *priv =3D (struct qca8k_priv *)ds->priv; + struct qca8k_priv *priv =3D ds->priv; u16 port_mask =3D BIT(port); =20 if (!vid) @@ -782,7 +782,7 @@ int qca8k_port_fdb_del(struct dsa_switch *ds, int port, int qca8k_port_fdb_dump(struct dsa_switch *ds, int port, dsa_fdb_dump_cb_t *cb, void *data) { - struct qca8k_priv *priv =3D (struct qca8k_priv *)ds->priv; + struct qca8k_priv *priv =3D ds->priv; struct qca8k_fdb _fdb =3D { 0 }; int cnt =3D QCA8K_NUM_FDB_RECORDS; bool is_static; --=20 2.40.0