public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data
@ 2023-07-26 16:45 Colin Ian King
  2023-07-26 19:16 ` Lino Sanfilippo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Colin Ian King @ 2023-07-26 16:45 UTC (permalink / raw)
  To: Lino Sanfilippo, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev
  Cc: kernel-janitors, linux-kernel

The pointer data is being incremented but this change to the pointer
is not used afterwards. The increment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/ethernet/alacritech/slicoss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
index a30d0f172986..78231c85234d 100644
--- a/drivers/net/ethernet/alacritech/slicoss.c
+++ b/drivers/net/ethernet/alacritech/slicoss.c
@@ -1520,10 +1520,8 @@ static void slic_get_ethtool_stats(struct net_device *dev,
 
 static void slic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
 {
-	if (stringset == ETH_SS_STATS) {
+	if (stringset == ETH_SS_STATS)
 		memcpy(data, slic_stats_strings, sizeof(slic_stats_strings));
-		data += sizeof(slic_stats_strings);
-	}
 }
 
 static void slic_get_drvinfo(struct net_device *dev,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data
  2023-07-26 16:45 [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data Colin Ian King
@ 2023-07-26 19:16 ` Lino Sanfilippo
       [not found] ` <662ebbd2-b780-167d-ce57-cde1af636399@web.de>
  2023-07-28 23:30 ` [PATCH][next] " patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Lino Sanfilippo @ 2023-07-26 19:16 UTC (permalink / raw)
  To: Colin Ian King, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev
  Cc: kernel-janitors, linux-kernel

Hi,

On 26.07.23 18:45, Colin Ian King wrote:
> The pointer data is being incremented but this change to the pointer
> is not used afterwards. The increment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/net/ethernet/alacritech/slicoss.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
> index a30d0f172986..78231c85234d 100644
> --- a/drivers/net/ethernet/alacritech/slicoss.c
> +++ b/drivers/net/ethernet/alacritech/slicoss.c
> @@ -1520,10 +1520,8 @@ static void slic_get_ethtool_stats(struct net_device *dev,
>
>  static void slic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
>  {
> -	if (stringset == ETH_SS_STATS) {
> +	if (stringset == ETH_SS_STATS)
>  		memcpy(data, slic_stats_strings, sizeof(slic_stats_strings));
> -		data += sizeof(slic_stats_strings);
> -	}
>  }
>
>  static void slic_get_drvinfo(struct net_device *dev,

FWIW
Acked-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>

Best Regards,
Lino

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH next] net: ethernet: slicoss: remove redundant increment of pointer data
       [not found] ` <662ebbd2-b780-167d-ce57-cde1af636399@web.de>
@ 2023-07-27 17:15   ` Colin King (gmail)
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King (gmail) @ 2023-07-27 17:15 UTC (permalink / raw)
  To: Markus Elfring, netdev, kernel-janitors, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Lino Sanfilippo, Paolo Abeni
  Cc: LKML

On 26/07/2023 21:05, Markus Elfring wrote:
>> The pointer data is being incremented but this change to the pointer
>> is not used afterwards. The increment is redundant and can be removed.
> 
> Are imperative change descriptions still preferred?

Hrm, I've used this style of commit message for a few thousand commits, 
I hope it's still fine.

> 
> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc3#n94
> 
> Regards,
> Markus


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data
  2023-07-26 16:45 [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data Colin Ian King
  2023-07-26 19:16 ` Lino Sanfilippo
       [not found] ` <662ebbd2-b780-167d-ce57-cde1af636399@web.de>
@ 2023-07-28 23:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-28 23:30 UTC (permalink / raw)
  To: Colin Ian King
  Cc: LinoSanfilippo, davem, edumazet, kuba, pabeni, netdev,
	kernel-janitors, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 26 Jul 2023 17:45:22 +0100 you wrote:
> The pointer data is being incremented but this change to the pointer
> is not used afterwards. The increment is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/net/ethernet/alacritech/slicoss.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
  - [next] net: ethernet: slicoss: remove redundant increment of pointer data
    https://git.kernel.org/netdev/net-next/c/3bdd85e2e350

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-28 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 16:45 [PATCH][next] net: ethernet: slicoss: remove redundant increment of pointer data Colin Ian King
2023-07-26 19:16 ` Lino Sanfilippo
     [not found] ` <662ebbd2-b780-167d-ce57-cde1af636399@web.de>
2023-07-27 17:15   ` [PATCH next] " Colin King (gmail)
2023-07-28 23:30 ` [PATCH][next] " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox