diff mbox series

[-next] net: mvneta: Remove unused variables 'i'

Message ID 20221010032506.2886099-1-chenzhongjin@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [-next] net: mvneta: Remove unused variables 'i' | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 4 maintainers not CCed: ndesaulniers@google.com trix@redhat.com llvm@lists.linux.dev nathan@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Chen Zhongjin Oct. 10, 2022, 3:25 a.m. UTC
Reported by Clang [-Wunused-but-set-variable]

'commit cad5d847a093 ("net: mvneta: Fix the CPU choice in mvneta_percpu_elect")'
This commit had changed the logic to elect CPU in mvneta_percpu_elect().
Now the variable 'i' is not used in this function, so remove it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 drivers/net/ethernet/marvell/mvneta.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jakub Kicinski Sept. 30, 2022, 3:51 p.m. UTC | #1
On Mon, 10 Oct 2022 11:25:06 +0800 Chen Zhongjin wrote:
> Reported by Clang [-Wunused-but-set-variable]
> 
> 'commit cad5d847a093 ("net: mvneta: Fix the CPU choice in mvneta_percpu_elect")'
> This commit had changed the logic to elect CPU in mvneta_percpu_elect().
> Now the variable 'i' is not used in this function, so remove it.

Please fix the date on your system. Your patches are sent with the date
over a week in the future.

Please note that we have a 24h wait period so you need to wait at least
a day before you resend anything.
Chen Zhongjin Oct. 8, 2022, 1:59 a.m. UTC | #2
On 2022/9/30 23:51, Jakub Kicinski wrote:
> On Mon, 10 Oct 2022 11:25:06 +0800 Chen Zhongjin wrote:
>> Reported by Clang [-Wunused-but-set-variable]
>>
>> 'commit cad5d847a093 ("net: mvneta: Fix the CPU choice in mvneta_percpu_elect")'
>> This commit had changed the logic to elect CPU in mvneta_percpu_elect().
>> Now the variable 'i' is not used in this function, so remove it.
> Please fix the date on your system. Your patches are sent with the date
> over a week in the future.
>
> Please note that we have a 24h wait period so you need to wait at least
> a day before you resend anything.

Sorry for late reply cuz I'm just back for work today.

Thanks for the tips. I'll fix the date problem and post it after 6.1-rc1.

Best,
Chen
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 0caa2df87c04..11bec920177b 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4266,7 +4266,7 @@  static void mvneta_mdio_remove(struct mvneta_port *pp)
  */
 static void mvneta_percpu_elect(struct mvneta_port *pp)
 {
-	int elected_cpu = 0, max_cpu, cpu, i = 0;
+	int elected_cpu = 0, max_cpu, cpu;
 
 	/* Use the cpu associated to the rxq when it is online, in all
 	 * the other cases, use the cpu 0 which can't be offline.
@@ -4306,8 +4306,6 @@  static void mvneta_percpu_elect(struct mvneta_port *pp)
 		 */
 		smp_call_function_single(cpu, mvneta_percpu_unmask_interrupt,
 					 pp, true);
-		i++;
-
 	}
 };