Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp668421rbb; Sat, 24 Feb 2024 20:08:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4E28QC0oJEE4utOlf53pIzKDUgv73VReOSETjAivp11b87YZxnjc2AuUQ4ofvbBX86pPC6vEoRwgKmjQLEfieve+Fjg0BpmeLQg93MA== X-Google-Smtp-Source: AGHT+IEnYe80KEeyiYiWuCuqaLOHof+JEWjmtWiSCQaFs4lLNBLFvH1FkBfAActarUU9hw6mdeps X-Received: by 2002:a05:6a00:3c8b:b0:6e3:fe0b:527 with SMTP id lm11-20020a056a003c8b00b006e3fe0b0527mr5826113pfb.30.1708834110676; Sat, 24 Feb 2024 20:08:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708834110; cv=pass; d=google.com; s=arc-20160816; b=WMJRytMgvWUrJ3chB0dzPv45B2544SFzTOO1Cftb+u9LrC1sqKBukzy9ViVSVZxiAd 7OUHUrUBDq+ClxkWxyB9j0XfWJwOamGw6QXxzHQ74ETx8XU7I8X2140d3eZmRc2oiXRk 7waPUHM/ro+70ruko2e9UPSmkH2t9drnsZk7m3ZpfKHlUJWr3fJ2anVZDK7eSk3Cry54 D/bOVGo6CGTgmkEYYSDOhlbyQnvNqJhIjzrKvXIKhvm4YbmLjsfWPW1sv42epC9SiER2 wZjj2vWRHxp9aDXvJP/aXDMJIFi0Kdz3jNMWLm2cmthtC+VJyBWTna9wOX514/DKIclH 0hsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=VLgh3i1HLl4qsZsnPo2rlFAeoCtuGCX5i0c6X8Lsfio=; fh=gRLC4gLca4bkLA88sgL24ADNdiHmN1pE9ZWkE4mfeIg=; b=DRk9Y1K/U2FF+aWfc4Pwq+tJ/1B0fDyrUxm3QI8MkXFoSdZIowqb6hmbroToSdLTEP XpbzZZ9u7LTnzS9Vmq3NmyJemrmT1TMTd13+Q9PLZwSwxowWcJT8Ti5BigCDXuWhOZhJ yJvplLxb0lPBb+IznfngEYS2V+OIZqdaJCm5iTtzo01ge3/WPaWz7rZELRACvK2WrOsl nazpnAcSRJn8xY73sezsj3ulFEdznOsB2kBlV7l7E4gKn7MA+GKvkMiMD6+J75m1q/rK 5xkSHTn0o5Gv/K7dy1tLys9H7Uy7qLb0I9At5CPxr8xKKkbGXyKCpSwCPNMk9TIWVq62 /12w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b="gx/nL4oI"; arc=pass (i=1 spf=pass spfdomain=foxmail.com dkim=pass dkdomain=foxmail.com dmarc=pass fromdomain=foxmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79973-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ka39-20020a056a0093a700b006e50a24baf8si483059pfb.319.2024.02.24.20.08.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 20:08:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79973-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b="gx/nL4oI"; arc=pass (i=1 spf=pass spfdomain=foxmail.com dkim=pass dkdomain=foxmail.com dmarc=pass fromdomain=foxmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79973-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F50E282051 for ; Sun, 25 Feb 2024 04:08:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF0918F55; Sun, 25 Feb 2024 04:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=foxmail.com header.i=@foxmail.com header.b="gx/nL4oI" Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 396AD7476 for ; Sun, 25 Feb 2024 04:08:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.62.57.210 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708834104; cv=none; b=dlSDOKh0u0NeYjqZK760/U68IQo3Z52ZVW3N2focZRrSGxjt4v5KB/2ks4PlWGp5KZTMJnWuJCyfGvdlasvezCbo/bOsG5vbWdYZhk7IWzHB5E9DXm3ex/DmLtZZsS16HzihEnSmtGrBrKoh6dUsiUtrxXfCfPOhMkfdPkdJtJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708834104; c=relaxed/simple; bh=q4dKeuWe6W4Noz1+d/7Yfs/ZMDZdDCxYAicIx07p0Fw=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=FnVcC6xtrQDxUWPB8KuNd/JToF5yOOau3bFFi54Ku1aCR/UD0Zr+1JpsUg4CY5uCAEZeRn8gSvHL0ZyaUvqcHbjg1bGhc+SbFMaIZItyWqCm41nq0dwsRYN1SSEy7wmBCipEdNayvOxgt5JzNgNMOjLHtC//hrg/Byeakf+bbRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com; spf=pass smtp.mailfrom=foxmail.com; dkim=pass (1024-bit key) header.d=foxmail.com header.i=@foxmail.com header.b=gx/nL4oI; arc=none smtp.client-ip=162.62.57.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foxmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1708834092; bh=VLgh3i1HLl4qsZsnPo2rlFAeoCtuGCX5i0c6X8Lsfio=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gx/nL4oITRUCY3wlbj7biUDuf2rPh1l+GoqFgparHYAHxgESkRawhxhjSGlg3gDnU 3FV91cdnBwFr5xTVB9CIOhsgbgWYj127m+YgZdo1FOeXQJphM3k6XyIUnuvwWxSEy5 32FwJZeq991ZEcca2I3kbsD3DP9M3ZI10jwdIlWM= Received: from localhost.localdomain ([2409:8a60:2a61:ef40:480f:5c56:cca3:1b20]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id 18993038; Sun, 25 Feb 2024 12:06:09 +0800 X-QQ-mid: xmsmtpt1708834004tx0ivesbr Message-ID: X-QQ-XMAILINFO: MyIXMys/8kCt9c0H52Jz366tiakHJ3gYHewk0A//04bB4zWcvxj0dGp5YbLv6C FGtFQ8Y/PXdjyK2qk/u4xSOuFL7zwAGNaOmhXXpV3IwXHJsAbiY/Di5b/G6kK4eUzrgyPrknbUWS UBr/IC4wtS6nAwFGBsnBEiDkexwhWmWKLoRnXj3ekg1cX7EYxleemBTi4dPIjOtf4zyX+i+4ot5W 7MQuhTDBfpQVSUkwADIIQv7SZVtyUg8cPu7P1ZMblMIaWjVHDKBRc/jD6mEplPM9bb7YaDIosqeq 1Q2JW2XUcWEifiy04qzBbUEadc11O6dhPbJ6TdHEG3/vLLTFSMtdlsExY214kPZtXvcErUTRf5Pk F5q7XC00fw4fSlKdGEhGXtNdhvnMPsa1CDI/QrkD68O6lx4Vv1pdEtclvH3ygKBrW6G6Gc/VITPR 4xwfIDSbwp0D/0PiZD2kK8bQjFbYBUFmEWDKrZFsB2hk/36MPOJ1EJhgztQiP2ePikJjZ1YkK6WF JSMh3RrN/+l2eeD0YxtlzhoCr5EG9Viky8379KlPNVMuagUeEgb80A07M5K6VgtXieqyypQXfYwN 0pbYB9pVyxD/8ITWyX5jf/EICKD+mE6LZvebLO/CHUNF1qD8+ryXRzMhCLCfCZdFFbcqkOXkk1hm i1MeMdO3UAzGxwcI5K6vyREUATt5AXgGP86Q4LCvBdM/cRmYiVrNcHuaM5WLIW6kVuxd7Wxr5NUJ vwdpn/AQOm+1mTowMxjvQOZS5nlGEGC6WnGfEKjy/yQEan87waQspiyH9HRVqxX/KbYyQ83IsZTw H5qmRLIA9UgBi4JLi9TJxrENsIEp2FPwcgMs5GkePXXBcJqzVQFpGvTJ2ITFlYxyrOJj1ilmRuzZ JpGdRXTmSfJkzpHbK1uoo6dgrfsgpagPeP2mPxQ1scqLYPR5xIrlv7Ik6kQ390WpsrYDKbB4Wu7U N8/+18UZl+IQNvC+6Iv+k8nmoxNdS981uZl/by0DZzdeVpRTdG4Hp8j56rZMfX9FcxBOszZvdYFn hLw6UdnTK7Ad/J2XEXXeQiOx4LC3s84hgZ3q5atCF6ZwzcdC+NRtHzMa0eSpkf8783YPkcHvmPlr tutj8l X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk= From: wenyang.linux@foxmail.com To: Luis Chamberlain , Kees Cook , Joel Granados , Christian Brauner , davem@davemloft.net, David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Wen Yang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] svcrdma: delete the duplicate static variables zero Date: Sun, 25 Feb 2024 12:05:34 +0800 X-OQ-MSGID: <20240225040538.845899-5-wenyang.linux@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240225040538.845899-1-wenyang.linux@foxmail.com> References: <20240225040538.845899-1-wenyang.linux@foxmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Wen Yang Since these static variable zero is only used for boundary checks and will not be changed, remove it and use the ones in our shared const array. Signed-off-by: Wen Yang Cc: Luis Chamberlain Cc: Kees Cook Cc: Joel Granados Cc: Christian Brauner Cc: "David S. Miller" Cc: David Ahern Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- net/sunrpc/xprtrdma/svc_rdma.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index f86970733eb0..5e4cd17eeb5a 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c @@ -63,7 +63,6 @@ unsigned int svcrdma_max_req_size = RPCRDMA_DEF_INLINE_THRESH; static unsigned int min_max_inline = RPCRDMA_DEF_INLINE_THRESH; static unsigned int max_max_inline = RPCRDMA_MAX_INLINE_THRESH; static unsigned int svcrdma_stat_unused; -static unsigned int zero; struct percpu_counter svcrdma_stat_read; struct percpu_counter svcrdma_stat_recv; @@ -170,8 +169,8 @@ static struct ctl_table svcrdma_parm_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &zero, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ZERO, }, { .procname = "rdma_stat_rq_poll", @@ -179,8 +178,8 @@ static struct ctl_table svcrdma_parm_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &zero, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ZERO, }, { .procname = "rdma_stat_rq_prod", @@ -188,8 +187,8 @@ static struct ctl_table svcrdma_parm_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &zero, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ZERO, }, { .procname = "rdma_stat_sq_poll", @@ -197,8 +196,8 @@ static struct ctl_table svcrdma_parm_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &zero, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ZERO, }, { .procname = "rdma_stat_sq_prod", @@ -206,8 +205,8 @@ static struct ctl_table svcrdma_parm_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &zero, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ZERO, }, { }, }; -- 2.25.1