Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5608471rwr; Tue, 9 May 2023 04:04:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GPAnOMdW8wRPh1N4HQj318YmVs40oIt3qoxV9mhZAjlYskUDCMjjVezcOUKhlM1QsBeiu X-Received: by 2002:a17:902:bd85:b0:1a6:9ec2:a48f with SMTP id q5-20020a170902bd8500b001a69ec2a48fmr13328765pls.34.1683630289514; Tue, 09 May 2023 04:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683630289; cv=none; d=google.com; s=arc-20160816; b=QJd50z57mgn6kzPQkkqN7DRhlN3A1rYqQoPc+v/gwIxueR06pHdc9Hw/XMKB73BBK9 ZZPcDrchKUfS6NkueaR8VBZXBUPz2ZclqD8EkQaGa+hPkN08183eBrT55rC/7M+k6w5G Ps/Jc6vTeVhauYIG76vKu/5i/YIvBLlZwpoK6B8FZh5WhVbF18G/mNkBW9vpCsDvMgk+ jcdLrUyuBjz8nbVr5cvr4SR+aEL/DqbeKjVbyOdV0KW7jqNbPtfWoFa0pSavHNJ8Vv3T 6g3y27roEV62/CifnfvXiqhMYlRpSGd6wqmmLgqaAqpOuK2xvjIgsW+AJDbAK6u/7XMF RQEw== 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:cc:to:from:date:dkim-signature; bh=9Xjz1l0BL1PLaeYH7Is3BYIB2oIOcvlMta2GGXSYQr4=; b=T+cSWcGLu4Xz/4XYJentLszs00qqXV3XH59lFXkJDCpLyVZGrhQuu826pjtOGtPuaW NCjRlCzniQueURYV37rQ5lHZCtn85YqUEdmUsxucox/q6HAvN0Byejftun+37tUL2Ve/ 1unuVxoMKrjyD87fwOYfJVdMA7k3S2oy0UfvytxrxJ8zitiVRbNgOQxvQs4rwlJCh5Ph 0+nMf9KI6Nl4OLN1xpYiaD7716uxY6iMXpJVy9YjO9XudmBJubSgTnBmMp5OePndZ3Z+ xhqo3qUVRm0/njrIujWs+oy5mLYHUkmzp+kTFCaCcmd/U/dc0v0QZStuizDw/6dClt6K 0cBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=KQN7zJHd; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a17090301c400b001a2104d7075si1368157plh.72.2023.05.09.04.04.33; Tue, 09 May 2023 04:04:49 -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=pass header.i=@microchip.com header.s=mchp header.b=KQN7zJHd; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235202AbjEIK72 (ORCPT + 99 others); Tue, 9 May 2023 06:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234861AbjEIK7Y (ORCPT ); Tue, 9 May 2023 06:59:24 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8647A106D5; Tue, 9 May 2023 03:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1683629934; x=1715165934; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oepJVOVH68CBYtXIJCDRmO6N5dpmZ6x7a1EFLw/yItU=; b=KQN7zJHdh1Z0wPzGdpwLS4IvwBhnBhfvEDunkbN01dOGbVWmFaR/doQA KkaBwgUtlELbD36pQsT0SVNNjab/CBrgtpN0LZqTIVyOqkrgmVQ88Z+EQ wgpe8yRrF0kFfcNrQXHFv3ubKaqotfQXapDFd0S19ViA6a+tzZnE8sgY2 XbuaVRUxII475Uaeu0CYdPO9vCczV9dHSt6F/MbAUBOk6oeaOcyHMeLaW 3+86adcZk7autCOJ+btfHwXPanxhrgc8pzl2vKufumCpsg7GKJMi4T7Wc RcCVYEd33T+tKS8s6cG4AliLUtqEPtjaHN6iymR8ut863P1nJOQzr2LRb Q==; X-IronPort-AV: E=Sophos;i="5.99,261,1677567600"; d="scan'208";a="213074737" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 May 2023 03:58:49 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 9 May 2023 03:58:48 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 9 May 2023 03:58:47 -0700 Date: Tue, 9 May 2023 12:58:47 +0200 From: Horatiu Vultur To: wuych CC: , , , , , , , , , Subject: Re: [PATCH net-next] freescale:Remove unnecessary (void*) conversions Message-ID: <20230509105847.qow6jmmfub3ynfzs@soft-dev3-1> References: <20230509102501.41685-1-yunchuan@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20230509102501.41685-1-yunchuan@nfschina.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 The 05/09/2023 18:25, wuych wrote: Hi wuych, > > Pointer variables of void * type do not require type cast. > > Signed-off-by: wuych > --- > drivers/net/ethernet/freescale/xgmac_mdio.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c > index a13b4ba4d6e1..167a7fe04853 100644 > --- a/drivers/net/ethernet/freescale/xgmac_mdio.c > +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c > @@ -131,7 +131,7 @@ static int xgmac_wait_until_done(struct device *dev, > static int xgmac_mdio_write_c22(struct mii_bus *bus, int phy_id, int regnum, > u16 value) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; Don't forget to use the reverse x-mas notation. The longer lines should be at top. The same applies to the other changes that you have done in this patch. > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > bool endian = priv->is_little_endian; > u16 dev_addr = regnum & 0x1f; > @@ -163,7 +163,7 @@ static int xgmac_mdio_write_c22(struct mii_bus *bus, int phy_id, int regnum, > static int xgmac_mdio_write_c45(struct mii_bus *bus, int phy_id, int dev_addr, > int regnum, u16 value) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > bool endian = priv->is_little_endian; > u32 mdio_ctl, mdio_stat; > @@ -205,7 +205,7 @@ static int xgmac_mdio_write_c45(struct mii_bus *bus, int phy_id, int dev_addr, > */ > static int xgmac_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > bool endian = priv->is_little_endian; > u16 dev_addr = regnum & 0x1f; > @@ -265,7 +265,7 @@ static int xgmac_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum) > static int xgmac_mdio_read_c45(struct mii_bus *bus, int phy_id, int dev_addr, > int regnum) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > bool endian = priv->is_little_endian; > u32 mdio_stat, mdio_ctl; > @@ -326,7 +326,7 @@ static int xgmac_mdio_read_c45(struct mii_bus *bus, int phy_id, int dev_addr, > > static int xgmac_mdio_set_mdc_freq(struct mii_bus *bus) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > struct device *dev = bus->parent; > u32 mdio_stat, div; > @@ -355,7 +355,7 @@ static int xgmac_mdio_set_mdc_freq(struct mii_bus *bus) > > static void xgmac_mdio_set_suppress_preamble(struct mii_bus *bus) > { > - struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; > + struct mdio_fsl_priv *priv = bus->priv; > struct tgec_mdio_controller __iomem *regs = priv->mdio_base; > struct device *dev = bus->parent; > u32 mdio_stat; > -- > 2.30.2 > > -- /Horatiu