Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3264416imm; Tue, 17 Jul 2018 01:39:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgperAWCU78dZIXXNTw95Om2Vg86Ie7bM1yASGSE3WnIuWc5SyAjq14FZwoYN3JCEmkJCMVdM X-Received: by 2002:a65:5b08:: with SMTP id y8-v6mr666933pgq.297.1531816797999; Tue, 17 Jul 2018 01:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531816797; cv=none; d=google.com; s=arc-20160816; b=VQznCr1GLKZObV7j7mpEak7qf7K+3AlWhp5srkGxDvZ3oUDZ6ym21UMv2/pHok4sV+ NepzDstsidf8WC3UNUhhUCOS/D+THhD0Yhsl7L6rvSN67kPChq0gFmn4N3eFaM7lFoZY crrdmAcMhstKez/F7QXs1h4uUFX73Faj9WdGFBoePex7BkOZAgYA1hPirBi0HUB1727S 8DoGeo1NzU0GEhlQd9LTJtG0AdsSw6qU9V2G3g83mFDxkqDP+RXlIqkqU44bkeFCRx6l 8ePMNgba1oMEGEU4c4iBDrmcsUhSGij/bEIr4G/OxGZy9f/trSbpNo4F0sr+dCOV4xKb CgOA== 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 :message-id:date:subject:cc:to:from:arc-authentication-results; bh=NBjPukZ9IDOgABxxvY3rH/ItbSBNG3cigwN8Ym9QKG4=; b=l4PjkuMSo/uxohIgKlavNiCCZaUNX5xBya1OoOhiMG3cRA4FuiPOpi/NuMA/dyPgEO xKsjeDBXglOHUQGGPktxhOphccy77YWNk8KL5yWmYE3o25heDMAGDBJfonzb8SBdpzVg oxkaVVnY3QHUF7O4He8HQTxbcwFSS1L0CclnkEQcdqPWKMdigdgzEXtU38HNtb3h/OWC 8H08Yb/4wgJVY8APYE8kEeb0Cne3W7GqNBnXza3mKVhrK25pCNfC3NhDGz/5e9PxrAip HEUYFEjY3z/kq9TlKNDDOsvahKXEEnMS1Kmg4FB6KS2zASeqLo5i00OxhC7gzX4ZcgNQ iqMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10-v6si345045pgs.655.2018.07.17.01.39.42; Tue, 17 Jul 2018 01:39:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729648AbeGQJKd (ORCPT + 99 others); Tue, 17 Jul 2018 05:10:33 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39903 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728089AbeGQJKd (ORCPT ); Tue, 17 Jul 2018 05:10:33 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ffLVc-0000CB-B0; Tue, 17 Jul 2018 08:39:00 +0000 From: Colin King To: Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: sockmap: remove redundant pointer sg Date: Tue, 17 Jul 2018 09:38:59 +0100 Message-Id: <20180717083859.17525-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.1 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: Colin Ian King Pointer sg is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'sg' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- kernel/bpf/sockmap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index 98fb7938beea..0b38be5a955c 100644 --- a/kernel/bpf/sockmap.c +++ b/kernel/bpf/sockmap.c @@ -725,11 +725,8 @@ static int bpf_tcp_sendmsg_do_redirect(struct sock *sk, int send, { bool ingress = !!(md->flags & BPF_F_INGRESS); struct smap_psock *psock; - struct scatterlist *sg; int err = 0; - sg = md->sg_data; - rcu_read_lock(); psock = smap_psock_sk(sk); if (unlikely(!psock)) -- 2.17.1