All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: wuych <yunchuan@nfschina.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, irusskikh@marvell.com, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] atlantic: Remove unnecessary (void*) conversions
Date: Thu, 4 May 2023 17:34:31 +0200	[thread overview]
Message-ID: <ZFPQh28YFfA9t3qu@corigine.com> (raw)
In-Reply-To: <20230504100253.74932-1-yunchuan@nfschina.com>

On Thu, May 04, 2023 at 06:02:53PM +0800, wuych wrote:
> Pointer variables of void * type do not require type cast.
> 
> Signed-off-by: wuych <yunchuan@nfschina.com>

...

> @@ -378,7 +378,7 @@ static int hw_atl2_hw_init_tx_path(struct aq_hw_s *self)
>  
>  static void hw_atl2_hw_init_new_rx_filters(struct aq_hw_s *self)
>  {
> -	struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv;
> +	struct hw_atl2_priv *priv = self->priv;
>  	u8 *prio_tc_map = self->aq_nic_cfg->prio_tc_map;
>  	u16 action;
>  	u8 index;

While you are here, and seeing as you need to repost this for net-next
anyway: could you adjust the order of the lines above to observe reverse
xmas tree - longest line to shortest - for local variable declarations
in networking code?

...

> @@ -539,7 +539,7 @@ static int hw_atl2_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
>  		[AQ_HW_IRQ_MSIX]    = { 0x20000022U, 0x20000026U },
>  	};
>  
> -	struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv;
> +	struct hw_atl2_priv *priv = self->priv;
>  	struct aq_nic_cfg_s *aq_nic_cfg = self->aq_nic_cfg;
>  	u8 base_index, count;
>  	int err;

Ditto.

...

      parent reply	other threads:[~2023-05-04 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 10:02 [PATCH] atlantic: Remove unnecessary (void*) conversions wuych
2023-05-04 11:03 ` Leon Romanovsky
2023-05-04 11:39   ` Paolo Abeni
2023-05-04 15:34 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFPQh28YFfA9t3qu@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=irusskikh@marvell.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yunchuan@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.