Received: by 10.223.176.5 with SMTP id f5csp4406632wra; Tue, 30 Jan 2018 06:54:58 -0800 (PST) X-Google-Smtp-Source: AH8x227MOZueQiHocO9C67fx8TDfal2sb6cOLr5DRGDJrGQLSvwNzERudAx1Y0DpLxLYDLVh0AtP X-Received: by 10.101.96.132 with SMTP id t4mr23661761pgu.58.1517324097900; Tue, 30 Jan 2018 06:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517324097; cv=none; d=google.com; s=arc-20160816; b=qtgzaUcEDwtwhm+WT+1tUCfEJtYGFsgghjWMWqE4+aL7QtRvOp80yCxYkGYrng5qFH iJLHTPNkS9pTK9wy2/vbGmTe0MdvOE9AEQn31xioe6xRB2YIShiDXInmiMsxkmJLiwOl EBv+VnDG/Y3AEVBpp9v5R+w53jq8RfHqrgBd23UQMXduAcD/ihX8vB9RBnRZdIXWBJx4 rKwG2gX7df6gksDUQKC61PvEZ8soA4J1KeX3mxrAAmBIp9OuwysSTerXSQ9zzotFb3ul vRqIDq7V/dQ+eJsxCQWN+5nyYFeZqYEe3K1+UwRYoLV+4IyOgU4sGoHoQUwTKgi0t6dz kxJg== 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=03jMZ1EJRNF8nSTGcDgDxn8sPV9wLGMeyFym/OQcmFg=; b=qdfFeDxk+3SC+0qwG+dmllIxMnl3QQHh0PFP7uK5gLnw4o4HFoIR16Z7FYHnPc5GPT yj6k1NDYjh5pI75VykC3iFepb4wFpRPssPJqNz4R7CWXJZXufd9gE58JBvAXWsc9r9TO JfC86u0m1swWhZ83fbJiP3UyQ5zo1JTryTbQGkeiSmOZhdHRv5o+pz8u7V9EM77sdP4U hgCrbakBVdU0g6rgdmdM8KcpGFa2sm/BkL9YZuv47SKcc3YgPISkJlMcaO7Rw2mba2c1 1/TrRAO33hElOVAW9MGqCPxa42OEJ7WsqjxMnoLG8yWzmlKs3or7f+w6LPX+hd0Skl1t IO7g== 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 a3-v6si39988plc.552.2018.01.30.06.54.42; Tue, 30 Jan 2018 06:54:57 -0800 (PST) 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 S1751988AbeA3OyB (ORCPT + 99 others); Tue, 30 Jan 2018 09:54:01 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:49123 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbeA3Ox7 (ORCPT ); Tue, 30 Jan 2018 09:53:59 -0500 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 1egXIC-0006BZ-K2; Tue, 30 Jan 2018 14:53:48 +0000 From: Colin King To: Steffen Klassert , Herbert Xu , "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] esp4: remove redundant initialization of pointer esph Date: Tue, 30 Jan 2018 14:53:48 +0000 Message-Id: <20180130145348.32202-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.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 esph is being assigned a value that is never read, esph is re-assigned and only read inside an if statement, hence the initialization is redundant and can be removed. Cleans up clang warning: net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during its initialization is never read Signed-off-by: Colin Ian King --- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 296d0b956bfe..97689012b357 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -654,7 +654,7 @@ static void esp_input_restore_header(struct sk_buff *skb) static void esp_input_set_header(struct sk_buff *skb, __be32 *seqhi) { struct xfrm_state *x = xfrm_input_state(skb); - struct ip_esp_hdr *esph = (struct ip_esp_hdr *)skb->data; + struct ip_esp_hdr *esph; /* For ESN we move the header forward by 4 bytes to * accomodate the high bits. We will move it back after -- 2.15.1