Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED4F9C7618D for ; Thu, 16 Mar 2023 15:37:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231815AbjCPPhn (ORCPT ); Thu, 16 Mar 2023 11:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231580AbjCPPhS (ORCPT ); Thu, 16 Mar 2023 11:37:18 -0400 Received: from mail-qk1-f202.google.com (mail-qk1-f202.google.com [209.85.222.202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0F0BE5D6 for ; Thu, 16 Mar 2023 08:35:11 -0700 (PDT) Received: by mail-qk1-f202.google.com with SMTP id x18-20020a05620a099200b00745c25b2fa3so1116044qkx.16 for ; Thu, 16 Mar 2023 08:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678980737; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=rC1VGMFv7zzu7CU91Nhp8bI0nzDwaHiXVvVPl87M8n0=; b=ayNhyTokX3WN18Gg3kZ4n+m7b7o1cO1N4bRcOn8ncxpwB+UOri4TCjYjcUmLXo/gEt cUcZ0Hzjght0yFxY0FJBQX8trXSQluOYmnjqAz0W/IYt+YZfPIqWd7YJDgN7pa3wTUNg uFoq4hAFsquOWXRIzrXsBWLFaEaO8tpvWkOAPVbBKwEHmcw44yr2yEXnU4et2fSXTY3d fZSqv0a0OKvIaOBtQx+4EQVGPG2HXhRkY2fCmOTUrckkUZ00gfBMbm1PwknW8fMP4J+w JLIypLCWMPj2z5opM42kK8lb8Ie+DARVESHRkCfHXySMzZHODTAy0ey/q+xR3Nfa6xgp LH6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678980737; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rC1VGMFv7zzu7CU91Nhp8bI0nzDwaHiXVvVPl87M8n0=; b=wf3zj8Itpfc+rEOuxIxn27GJKK1fFhjUA863AXuLvcCSDlMxXE/h5Rhlt8cp/27pGD vN9105U0/EZrLupLWKHhXARFb77gJnyKmnYe/Xs7zllzot/8ShYSzSLtW/uoEmuxOiXq zd/I6EPIaG9z5w/4DlaMfXFavyCqKRuegX6GSq7bocQZtH2HMbOctK10sjVxpGWaP2dD jESMU+jyoMSFPea+7DOrmqoGoJ4+B93WeUEh5WyzQYuqSLxZTaxIuhsJA4O0MVg8caGH 01o2OiL7+K9mi5nASK/7PEXqoO2DQXMuNAf5PXiehypd4gb2+w8oDXE51u/sc2fJ4eTo VqBQ== X-Gm-Message-State: AO0yUKV3d8NFtl1cLN3LejiX49ANfEdFgZYlJAAmxWRnqnMs4+oTWI7/ tfcBokpmlWUcEL50sfdBbAQSR7bxfwXKjQ== X-Google-Smtp-Source: AK7set//rHVycL0+uZI7J10zkSywuanHuQLp1zOelBKnySZv9ib7h4ts66w5WLTkEYygSExMEoufkDDZuqSZTw== X-Received: from edumazet1.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:395a]) (user=edumazet job=sendgmr) by 2002:ac8:4044:0:b0:3bf:d798:8ca7 with SMTP id j4-20020ac84044000000b003bfd7988ca7mr1167098qtl.0.1678980737484; Thu, 16 Mar 2023 08:32:17 -0700 (PDT) Date: Thu, 16 Mar 2023 15:32:02 +0000 In-Reply-To: <20230316153202.1354692-1-edumazet@google.com> Mime-Version: 1.0 References: <20230316153202.1354692-1-edumazet@google.com> X-Mailer: git-send-email 2.40.0.rc2.332.ga46443480c-goog Message-ID: <20230316153202.1354692-9-edumazet@google.com> Subject: [PATCH v2 net-next 8/8] inet_diag: constify raw_lookup() socket argument From: Eric Dumazet To: "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, David Ahern , Simon Horman , eric.dumazet@gmail.com, Eric Dumazet Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Now both raw_v4_match() and raw_v6_match() accept a const socket, raw_lookup() can do the same to clarify its role. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman --- net/ipv4/raw_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c index 999321834b94a8f7f2a4996575b7cfaafb6fa2b7..bca49a844f01083cdfdade6f52852d48ddb36d70 100644 --- a/net/ipv4/raw_diag.c +++ b/net/ipv4/raw_diag.c @@ -34,7 +34,7 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r) * use helper to figure it out. */ -static bool raw_lookup(struct net *net, struct sock *sk, +static bool raw_lookup(struct net *net, const struct sock *sk, const struct inet_diag_req_v2 *req) { struct inet_diag_req_raw *r = (void *)req; -- 2.40.0.rc2.332.ga46443480c-goog