Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5032467pxb; Mon, 15 Feb 2021 07:49:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLM+OF7zj5ZTEtjrIrT7JBC2ovxTBsm4dAM8UP7K3KIazwL0m9NfjEdfa3T2rnaVsff49/ X-Received: by 2002:a50:aade:: with SMTP id r30mr15963802edc.15.1613404199008; Mon, 15 Feb 2021 07:49:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404198; cv=none; d=google.com; s=arc-20160816; b=FjvHUmRb5N9M6pSFQL/17/M8DXG/mclW7Y4SriBZ289IA+qU0msXB5oEWouDrga0Iy /xpO8xrefNY9YYEWHz0pTL9amxHE9RcbayVR9Lwd/4YGLZWjo2mT0Avr8JUDqUtck8Tw zZjnMgzIbmBWJGp6j+wPH7iHp/kwvTL5hYMczWmx/6VYCkvL0+nYfezHyDG4JzOHQIjS wnUiENHumC5FlqRMkplcuG3/M7ojoByOGMxhOpqXCGsCoB/hP6k/qq2MCN4IB3fTdiA+ nVnkuCyMT30A+CXSQotg6qJs7bjO80vVFxt0bN7B1PXmlcX9GZQtU+ZLxBgFgiJ0NacN 9Hjg== 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=Nsgu7gyV1xEpi/gFbNYrEL4/XbVjh1KQ+a2UxiFQP04=; b=jcTQYo7yL8pV4KG97VSOMGyeSCo9wX2cNYfTPtyGNsf9Cv/oFH+hs0ftEXyuH4+jdF smQAAQyXKwXGjxN2RILM+zcSXB59GygQuG/bgcSi5BsiVasUpUffkP1ap9j5XwFjvuPW ixjk170rrvlHVQIs8oiZj2WUTfB5pMys5oUcTrQSbAWcV8lm9eFEoemDz7dkpGkyhNF6 E9ARsOI3fbVqaJ+ymy1YBVYV4uUv7xf1KiW0c9121K1RIgDtmK5fjBd7BTf9fbbzt8eG X5HBRmpXWFmc/xMiAl01zhBeznvXOgHpnL6+vg3lkShn8VFF91XQLLc6CiBH/PYB+fYH TM/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wom64j2n; 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 x8si1513433edl.5.2021.02.15.07.49.35; Mon, 15 Feb 2021 07:49:58 -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=wom64j2n; 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 S231285AbhBOPqu (ORCPT + 99 others); Mon, 15 Feb 2021 10:46:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:45570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbhBOPbL (ORCPT ); Mon, 15 Feb 2021 10:31:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B60C164E91; Mon, 15 Feb 2021 15:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613402959; bh=GpQVdLLn9DHMVjFpGoVkpWFbjXvU0sucLjBRLmL0nu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wom64j2nCzCmvmlZHYo3t/0dX//3ky/NtNTeX6E/+txqHa0cNn42sCDZG3fAnjmBU qD1btaoHaadnDV8g0ZG+kSOu75VJMfatuHLWRLBJjF5COzsTEQQirY9vhNuRNpDb/E UuX87hxFVcpy68qtFkeEZXVbRs8ekYUuQ6QrFNO4= 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.4 34/60] selftests: txtimestamp: fix compilation issue Date: Mon, 15 Feb 2021 16:27:22 +0100 Message-Id: <20210215152716.450762755@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@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 --- .../testing/selftests/networking/timestamping/txtimestamp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/networking/timestamping/txtimestamp.c b/tools/testing/selftests/networking/timestamping/txtimestamp.c index 7e386be471201..2fce2e8f47f55 100644 --- a/tools/testing/selftests/networking/timestamping/txtimestamp.c +++ b/tools/testing/selftests/networking/timestamping/txtimestamp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -396,12 +396,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