Skip to contentSkip to conversation

net: ethernet: slicoss: remove redundant increment of pointer data

PATCH Applied Colin Ian King 4 participants 6 messages Jul 26, 2023 – Jul 28, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: slicoss: remove redundant increment of pointer data

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

---
 drivers/net/ethernet/alacritech/slicoss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/alacritech/slicoss.c +1 -3
index a30d0f172986..78231c85234d 100644
@@ -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,
Signature · 1 line
2.39.2
maintainer Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 14 lines · Colin Ian King

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

---
 drivers/net/ethernet/alacritech/slicoss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/alacritech/slicoss.c +0 -0
index a30d0f172986..78231c85234d 100644
@@ -1520,10 +1520,8 @@ static void slic_get_ethtool_stats(struct net_device *dev,
 

drivers/net/ethernet/alacritech/slicoss.c static void slic_get_ethtool_stats(struct net_device *dev, · line 1527

Quoted 10 lines
drivers/net/ethernet/alacritech/slicoss.c +1 -3
 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

Best Regards,
Lino

#3 lore raw
Quoted 4 lines · Markus Elfring
Quoted 2 lines

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.

Quoted 6 lines

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

#4 lore raw
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

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.

Quoted 2 lines

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

Will the attention grow anyhow for the desired “imperative mood”?

Regards,
Markus

#5 lore raw
In reply to Colin Ian King
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 7 lines · 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.

---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html