From nobody Sun Jun 14 14:31:28 2026 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (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 728CB36CDF3; Wed, 8 Apr 2026 02:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775617079; cv=none; b=Olh4WH3QIGeyB+ZhdhNbAJvfKI6WEdmIXlxewzEOB1hwMgFBg2WeIoVrMhriiyU6EhitwfmqmJlXdIsOMUKici7/P2J+D2Y980y1AvUwFDSXzzgQYoWO7ll01RdxhXGVnJ9ARIS6u8+AGO4UzMx2OKl4yRrwvu8OR8tqCzOJBTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775617079; c=relaxed/simple; bh=p4i2QJPlni67Wht2BfsVNm5Qr0eJy+8CZ3lldvWBXso=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=f9CFeQX9X6qT/SUPW5/VT67ET/BvaoBI7BODwe/EJovG+B2jUsWYng1zcVs2NlcpV0YTgQLOp1JmkP2uuCjBJSccj8ZLpZGCZ0/l54PeMZQdqocRKjMPCK9hB7ce2sfkkZ50uL0oYl5OIo2wKmPnolalJtLDdaJtqwrvAT9wKZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=rrdytvFu; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="rrdytvFu" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=kRTQx1v/zW6yoSKlcxN0BockCXbNYg1F0bgr8EIO/8s=; b=rrdytvFuR5sr5uCusnI2GFI2ds0ekFjQu1NVJwgwhU7M7ryY9K0MYLPoNXCg+V+MCbcqGCO2r VBm7y6f0Er+WP4BJlEA5Liiq0aXmacV3cBQWxSQVEOPBGDqrbzcXgxJZBi9hnH51EpoKK9ALhjz LfQgYuFrTV2tkDAUywbkLcM= Received: from mail.maildlp.com (unknown [172.19.162.223]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4fr6yq3pS2z12LKF; Wed, 8 Apr 2026 10:51:31 +0800 (CST) Received: from dggpemf500002.china.huawei.com (unknown [7.185.36.57]) by mail.maildlp.com (Postfix) with ESMTPS id AEF0F40561; Wed, 8 Apr 2026 10:57:53 +0800 (CST) Received: from huawei.com (10.50.85.128) by dggpemf500002.china.huawei.com (7.185.36.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 8 Apr 2026 10:57:52 +0800 From: Yue Haibing To: , , , , , , CC: , Subject: [PATCH v2 net-next] ipv6: sit: remove redundant ret = 0 assignment Date: Wed, 8 Apr 2026 11:20:51 +0800 Message-ID: <20260408032051.3096449-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To dggpemf500002.china.huawei.com (7.185.36.57) Content-Type: text/plain; charset="utf-8" The variable ret is assigned a value at all places where it is used; There is no need to assign a value when it is initially defined. Signed-off-by: Yue Haibing --- v2: Remove redundant init during definition instead of init before copy_to_= user --- net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index ef2e5111fb3a..201347b4e127 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -309,7 +309,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev,= struct ip_tunnel_prl __u struct ip_tunnel_prl kprl, *kp; struct ip_tunnel_prl_entry *prl; unsigned int cmax, c =3D 0, ca, len; - int ret =3D 0; + int ret; =20 if (dev =3D=3D dev_to_sit_net(dev)->fb_tunnel_dev) return -EINVAL; --=20 2.34.1