Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5067452pxb; Mon, 15 Feb 2021 08:39:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMP1c9+KwOvvk7aB6J+6KJ0P8n7qh7h6Blmr9IV8NZItTIv/50j9CmcYTAeSm01u/Jci0H X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr16794738edb.103.1613407145837; Mon, 15 Feb 2021 08:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613407145; cv=none; d=google.com; s=arc-20160816; b=KZO9FgtMbNep8W3z2qciiGKY0COAuPIfBkZrnK9FaM4uHJlSXjwCtB1ev6Fu4H7GG8 eGf3oWBUjNNMpNaQJbE+kMeAe3+r2RYsCR19GJyiaY8ZstEoce+5f40EEWtFDnMoHNwb 7RbN35JEY0e6FejtfXL+Y8JId1w5gyx1IgiiqRCFxXB1Y2SqDUctuog2YMCV6Qdn4VEI 7G2s+jJMN+V52MzAY4rFdBvkT6OEpoc5qeOwSrc97pmO/xEQmYw7dtfGrAu6LijXJdh/ yFYuoiLUbWpCkrGn+yrl1N5rcQwowuAVvsE9tfr+DRG5lDfiiaSAS43HN5tmY1gWhf0U aZeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TzC8+ANLaQVPT18ozMwTlipqFuxP7prlQZEVe0z61Ds=; b=nk4CbXzN/lLjhM2a3gx6pBVcQP9/0UBzGhl6//Nczta4y0JWGadwkxXQgev3kTTUKP iDXEknCixQFz3KJ5DQM2E/5VtN5ikHTDB542xDxejB+pzHRIXrVxQDAbW19JNsHprGlD 5xX1zEx+v7GIRd/eWDoiFhTxc+noFXwdtHedW/IcUBsqnLYSRMo1rCYbpkwNtczviSLz VL5UBPHuUt11H/l/8QWJr7GECX2inuy+IYHa9wtNE/QHO0OGtk/ibL7MRrPAz4UXZHyv +lLCrqREtfzUNd3gwYHWCh116JmsPn1vHK5DLBVDqstKxFg1JLBTRCoiFf/DvjhS36jN O5Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PHtZui+m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si4863956edh.345.2021.02.15.08.38.42; Mon, 15 Feb 2021 08:39:05 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=PHtZui+m; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbhBOQhl (ORCPT + 99 others); Mon, 15 Feb 2021 11:37:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:49648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhBOPhx (ORCPT ); Mon, 15 Feb 2021 10:37:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 906D264EAC; Mon, 15 Feb 2021 15:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403205; bh=DsiKUk3GygY9jko2vQZXxEPF1RWrFbhLv7k8z45r9ZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PHtZui+m/8AKz/f8kFzT1uAVhjpVsVNsO79/Nnq1udAsO2zPvzT/qLMDdyvjXDg+t ECbSqcXzVRrio7K/cuoNUAS9ye05gmrVSN0XqJ9mW1N0tmpcsBt+LpunDxVMegswP6 vnRwNcYXoIX2bM5nC6r/1IKGsPCpULPbcoM6GbfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Willem de Bruijn , Vadim Fedorenko , Willem de Bruijn , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 066/104] selftests: txtimestamp: fix compilation issue Date: Mon, 15 Feb 2021 16:27:19 +0100 Message-Id: <20210215152721.599910786@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Fedorenko [ Upstream commit 647b8dd5184665432cc8a2b5bca46a201f690c37 ] PACKET_TX_TIMESTAMP is defined in if_packet.h but it is not included in test. Include it instead of otherwise the error of redefinition arrives. Also fix the compiler warning about ambiguous control flow by adding explicit braces. Fixes: 8fe2f761cae9 ("net-timestamp: expand documentation") Suggested-by: Willem de Bruijn Signed-off-by: Vadim Fedorenko Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/1612461034-24524-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- tools/testing/selftests/net/txtimestamp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/txtimestamp.c b/tools/testing/selftests/net/txtimestamp.c index 490a8cca708a8..fabb1d555ee5c 100644 --- a/tools/testing/selftests/net/txtimestamp.c +++ b/tools/testing/selftests/net/txtimestamp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -495,12 +495,12 @@ static void do_test(int family, unsigned int report_opt) total_len = cfg_payload_len; if (cfg_use_pf_packet || cfg_proto == SOCK_RAW) { total_len += sizeof(struct udphdr); - if (cfg_use_pf_packet || cfg_ipproto == IPPROTO_RAW) + if (cfg_use_pf_packet || cfg_ipproto == IPPROTO_RAW) { if (family == PF_INET) total_len += sizeof(struct iphdr); else total_len += sizeof(struct ipv6hdr); - + } /* special case, only rawv6_sendmsg: * pass proto in sin6_port if not connected * also see ANK comment in net/ipv4/raw.c -- 2.27.0