diff mbox series

[next] net: ethernet: slicoss: remove redundant increment of pointer data

Message ID 20230726164522.369206-1-colin.i.king@gmail.com (mailing list archive)
State Accepted
Commit 3bdd85e2e3508a5f10949cae66c1d9e21a82d16f
Delegated to: Netdev Maintainers
Headers show
Series [next] net: ethernet: slicoss: remove redundant increment of pointer data | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1343 this patch: 1343
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 1365 this patch: 1365
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1366 this patch: 1366
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Colin Ian King July 26, 2023, 4:45 p.m. UTC
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(-)

Comments

Lino Sanfilippo July 26, 2023, 7:16 p.m. UTC | #1
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
Markus Elfring July 26, 2023, 8:05 p.m. UTC | #2
> 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?

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
Colin Ian King July 27, 2023, 5:15 p.m. UTC | #3
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
Markus Elfring July 27, 2023, 6:16 p.m. UTC | #4
>>> 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

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

Regards,
Markus
patchwork-bot+netdevbpf@kernel.org July 28, 2023, 11:30 p.m. UTC | #5
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!
diff mbox series

Patch

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,