Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp132193ybm; Tue, 26 May 2020 12:34:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVEQgGK1iwwDjd9p/NOxd/1moebYx0iZtF/ciJDvLQ7UtMkZPYoWCk0BBtVa2YvTDBWMKh X-Received: by 2002:a05:6402:22a6:: with SMTP id cx6mr21481695edb.76.1590521669707; Tue, 26 May 2020 12:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590521669; cv=none; d=google.com; s=arc-20160816; b=aArV75iOnz+RLyeXJoGijOkb6FBQyuAN9Xicq8vs2ZLtofPc4R2fYeQeB8I1Ydkdxs rNelNtuLPnQNhzwdp47HMGTrt1CTOgS9+yPqN5fHtJI4tcFsiJPZKvInnHXzu/+4gEdX PriiH+0rKXDQYbe2vNgb+Zv1p+c234rCIdl0LGvr34ed6B7Ijy/RG5CsibDLSFzWGdnJ QPZohWjnsqXD68boY2wUgAYmvPj5YappWAFJpRJGpJRWrAevV3EKQ4BmIBquufqocsxD G9wHisBRfBPGfTjObEO8aOP0sUpQKBmnE8A+IOx7DGjyRQwbT0Ql84SLHFn39jgg9VXg EhHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LXldM08PW8F93vTW1I+ndf/PCZtyvV/pH7iKDUaR1S0=; b=MG7WXZxMX/nHBm4LREQRNiZVsQCGDDz6UDJnP1i6z8EAGwUXPujMi6DzwbLJZ4wKrU lzrv4S/GkArWQ7VNUm9/k0lGgGWn8PuC0w/rjlmTFg71vi90iUbHy6hoqQDZC7ZUlnZg gcLCHkXxX/u0IVQ/XxJQY3VTxpD7TN1zmC+F9KK1KzgrtrxuIrDhlJ5C1fURXxqNGuym BHcKVAEHMpi0s4/6E5XUHJgKah/1Ixk++mXs+WsWOj2verA+E7qF1j5fbIGIDNSEYbWy O57RwWn741Dbzdkw7k706Z4tXz7MVvdAUmIJrhFXmayu2tElJH5IoPq/Ju5Eh5oXIZVl Y1nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LmZeWj3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si417253ejz.736.2020.05.26.12.34.06; Tue, 26 May 2020 12:34:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LmZeWj3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391240AbgEZTbY (ORCPT + 99 others); Tue, 26 May 2020 15:31:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:52590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390440AbgEZS66 (ORCPT ); Tue, 26 May 2020 14:58:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E51A20849; Tue, 26 May 2020 18:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590519538; bh=YkRYF/lYhP7PLe2SRTE/+v5VkAapIqFEXwP9AUm2BzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmZeWj3EQNQOc/w3IfOD8d7qUTdFRKVzLee/Rn+4xK8Ryv/dHckQcXikqG+upE2XW bKeUg4JWEEec303GtzAKrcLLTw6V+oxQHcT3RX2e5JIcrj5wNgrCvfzMfTUl8NGOqV jF2VnMRR2wxD2hxjAeIDooyNgg5d1905k2baBSTk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, greg@kroah.com Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guillaume Nault , "David S. Miller" , Giuliano Procida Subject: [PATCH 4.9 35/64] l2tp: define parameters of l2tp_tunnel_find*() as "const" Date: Tue, 26 May 2020 20:53:04 +0200 Message-Id: <20200526183924.471805384@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183913.064413230@linuxfoundation.org> References: <20200526183913.064413230@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guillaume Nault commit 2f858b928bf5a8174911aaec76b8b72a9ca0533d upstream. l2tp_tunnel_find() and l2tp_tunnel_find_nth() don't modify "net". Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller Signed-off-by: Giuliano Procida Signed-off-by: Greg Kroah-Hartman --- net/l2tp/l2tp_core.c | 4 ++-- net/l2tp/l2tp_core.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -378,7 +378,7 @@ exist: /* Lookup a tunnel by id */ -struct l2tp_tunnel *l2tp_tunnel_find(struct net *net, u32 tunnel_id) +struct l2tp_tunnel *l2tp_tunnel_find(const struct net *net, u32 tunnel_id) { struct l2tp_tunnel *tunnel; struct l2tp_net *pn = l2tp_pernet(net); @@ -396,7 +396,7 @@ struct l2tp_tunnel *l2tp_tunnel_find(str } EXPORT_SYMBOL_GPL(l2tp_tunnel_find); -struct l2tp_tunnel *l2tp_tunnel_find_nth(struct net *net, int nth) +struct l2tp_tunnel *l2tp_tunnel_find_nth(const struct net *net, int nth) { struct l2tp_net *pn = l2tp_pernet(net); struct l2tp_tunnel *tunnel; --- a/net/l2tp/l2tp_core.h +++ b/net/l2tp/l2tp_core.h @@ -239,8 +239,8 @@ struct l2tp_session *l2tp_session_get_nt struct l2tp_session *l2tp_session_get_by_ifname(const struct net *net, const char *ifname, bool do_ref); -struct l2tp_tunnel *l2tp_tunnel_find(struct net *net, u32 tunnel_id); -struct l2tp_tunnel *l2tp_tunnel_find_nth(struct net *net, int nth); +struct l2tp_tunnel *l2tp_tunnel_find(const struct net *net, u32 tunnel_id); +struct l2tp_tunnel *l2tp_tunnel_find_nth(const struct net *net, int nth); int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 peer_tunnel_id, struct l2tp_tunnel_cfg *cfg,