From patchwork Mon Sep 18 20:48:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 112948 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4115095qgf; Mon, 18 Sep 2017 13:49:18 -0700 (PDT) X-Google-Smtp-Source: ADKCNb41qMLCjBuu1YwA6DRx+yZCf/6D2qjzzi10g6RPPkuhsbhkI253WE1ClkIYMXjjQUpXWNFM X-Received: by 10.84.232.72 with SMTP id f8mr37238147pln.269.1505767758579; Mon, 18 Sep 2017 13:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505767758; cv=none; d=google.com; s=arc-20160816; b=uaoS6P5LqYHbKcyRADFZtuyx5vd/LITe+TdK1D79czJ+Fw7dYtfM8WSCkKcJQiq1j6 TS1ST+LCEe2RHCQdHiztdU3Yz+2zDY6N73C4QWXAPuSaubvs5HFWcUDXMB0m6gtUDz1p dxmIMiYsZEQNXAhzNx8ylA1uj6nF4YnfOmUjpxJKCu1Ouc8on5+LIlMUV9fQXuvC4wBU xlmmMMalrS8GKP4YDq4kX88bFJsbbf5J0v39AJuQOkzqPZzvWWOqPhg9M2K4njANwX/M qGaoYhihZba9lHIA4/+PQJv+7CpFgCEPc5bkJ6yEv738gy2MJnVNt+kafXpvQVNL+dv7 wEKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=vRjvRKJbApLJX6w8ekRyBFetTLuii1z+ZsYEWeaSXgg=; b=Upr7a+Hn78w5DpSZMAGgXKwlrWzbPlRfDuVYazpudgEmSReDBF3bURur2hfsDhep3A xasd+gc6zfvFFTbgGaWJ66/SYrQKimHN0PEbifenSLBkMMWxM9pjlkCosRkbEymicsSd F5hmjqHh5wGN9lQcrGad5iV39xz4YhrHb1qjv5acVXAHCtS/NQXu8Y9QDmb7aktf6OyU Xoq40N2IIaHn/gbneiQG0T760IECo9QxnHTroEKvTJW++vkVbawu/FNFFtUjBjZc36KM ZwQkhAcm9gb3POkdNLJZMbH9tHGDrZNr3sHQoZKI3GZ15IPcAgcRDQQFuBDKwT2dm1ur VsfQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si4672798plb.414.2017.09.18.13.49.18; Mon, 18 Sep 2017 13:49:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbdIRUtQ (ORCPT + 26 others); Mon, 18 Sep 2017 16:49:16 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:59905 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbdIRUtO (ORCPT ); Mon, 18 Sep 2017 16:49:14 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MPt6U-1dyyv004ri-0053Fh; Mon, 18 Sep 2017 22:49:00 +0200 From: Arnd Bergmann To: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: Arnd Bergmann , Eric Dumazet , Neal Cardwell , Yuchung Cheng , Soheil Hassas Yeganeh , Florian Westphal , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] tcp: avoid bogus warning in tcp_clean_rtx_queue Date: Mon, 18 Sep 2017 22:48:47 +0200 Message-Id: <20170918204855.170920-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:UWFTm4/zKe9MspGOn5Me3kr6P9mtS+zFVmcP2bM2qXCwXn7pIlI PJGaejtCap956RU2Gyyx9B6kA3MCO1MQH1aFiyTbBoJ7lIZFc2d2imVweBEgU76TJXpERwY 5bJ9ORYn9iiZHNCHBkpfMvuleRMO2DBfGrzbaCCSIf4TTENRupDrUXHk6LlrDccatNpCeAh sQ6nrrYt20mHjvwxyZwsA== X-UI-Out-Filterresults: notjunk:1; V01:K0:khMucBV2E2o=:z959zD5ySmg/GxBG1f6t1r 4Ja6Ky3EjIN+rA2xfVmlV0W0ictQ6dLiNQz1dVwvqnfUJtFwGqVUR13x8t8d0uuSVeluwmbbc vrmhVxe8VZqbeZjMPLQw1OhD6NICtzjfn5TXRsHYM7VFXolMqzr8Vv/AXA29Et2PPLhSNQGbZ LpFRUKGCokpqAkX4oyCRIJuSVXscdJ9w2kVgtLSV5I3rTGSAKSqgR3GHKpGey7MKpm6bvykO/ A4vMSsr8r+vQeBbxrjQvMVGvCUpGoTjrWFJ+VOkgvr7Jm0Q2XGz8b1ykPBlDqWRagtVHftXew KmqjkQCR5al7NVvGHYsrbREseyoUY1SMxDFpLQCrIbPwcsNZsbmss5UW3P3KpDh1dcFnvBnA6 er6yqUs9f8JbHcD2+IBTfvcInrQcB1gWBteMAll5X66xcugbYRRAdf8Kfz9ogkBkhsxvodE/4 N1bq7MgVLOT0OhEXQL2Z3pPJgorRRKfxfWqDIpKgiI0AeBhoxmn2LeH9YgvhcAXl98JbqCU5I 3rJ0VFbJUc2liU91jQDuP2e4TW1VzUvqGDV581NHuetmdkL7UMher0htLtRNUQcWxyrYA7tIy T3LwpyqTsDhAlhcUZGyMSOnTjPb9GPkI59jDNKyh2/rlIONhGM+G6qHb9Lg2wwID23fnZdbvk FyRkbFLka8kMkAGpO6J4KaBRulnSi8/mVZOBPYw0yTT4AqjyXzGtg7Kg2Wsl1yYsNWX4+oO7x 0gz/ShMNoSZ3Lrtb7phjdCVLsTIZI6CyNndGgA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-4.9 warns that it cannot trace the state of the 'last_ackt' variable since the change to the TCP timestamping code, when CONFIG_PROFILE_ANNOTATED_BRANCHES is set: net/ipv4/tcp_input.c: In function 'tcp_clean_rtx_queue': include/net/tcp.h:757:23: error: 'last_ackt' may be used uninitialized in this function [-Werror=maybe-uninitialized] Other gcc versions, both older and newer do now show this warning. Removing the 'likely' annotation makes it go away, and has no effect on the object code without CONFIG_PROFILE_ANNOTATED_BRANCHES, as tested with gcc-4.9 and gcc-7.1.1, so this seems to be a safe workaround. Fixes: 9a568de4818d ("tcp: switch TCP TS option (RFC 7323) to 1ms clock") Signed-off-by: Arnd Bergmann --- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c5d7656beeee..c52bc8e35d4d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3173,7 +3173,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, if (skb && (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) flag |= FLAG_SACK_RENEGING; - if (likely(first_ackt) && !(flag & FLAG_RETRANS_DATA_ACKED)) { + if (first_ackt && !(flag & FLAG_RETRANS_DATA_ACKED)) { seq_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, first_ackt); ca_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, last_ackt); }