From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 094D1C433FE for ; Sun, 13 Nov 2022 20:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233847AbiKMUGB (ORCPT ); Sun, 13 Nov 2022 15:06:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232676AbiKMUGA (ORCPT ); Sun, 13 Nov 2022 15:06:00 -0500 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3298264F2 for ; Sun, 13 Nov 2022 12:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1668369953; s=strato-dkim-0002; d=hartkopp.net; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=7xcS0bR9CYN9VqEwT+UOR6EHUN/ALlQpA/eknT7WwKE=; b=gZ12IzgFGs0dW9kmuiGKdd0LaLL1QrTdWSf3IwJtb7hTdgF0fBHMIcSRC99oG3ZXyv eg/JQZqmA35O9YcW8p43h9YVEpgmsgyDeo9MrDJlr7axsRDAzGx4ZkEh0BXe5tECatJD RAzRf2NDIyjCn2pPIaq9MwvJTBolO4QJU6ofHDgzvUZ+X30v1a2OHX26ZQEfghTlbFfm VU30agsO+ARgO2wYogtDbdepuZ4dS42cM+P6d0MmvCQSHUewGUtPWSkFvTvoH9p6mnIn K9qj9/+DR+uv+Rhd9dw0R+/4AnnQS2CS7tTCbepNEXsYEQOc960z4lwhjZog7CzQqwMK +w7w== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrDxb8mjG14FZxedJy6qgO1qCHSa1GLptZHusx3hdIrpKytISr6hZqJAw==" X-RZG-CLASS-ID: mo00 Received: from [IPV6:2a00:6020:1cfd:d104::923] by smtp.strato.de (RZmta 48.2.1 AUTH) with ESMTPSA id Dde783yADK5rlQX (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 13 Nov 2022 21:05:53 +0100 (CET) Message-ID: Date: Sun, 13 Nov 2022 21:05:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH can-utils-dev 4/5] candump: use linux/net_tstamp.h instead of redefining values ourselves To: Vincent Mailhol , linux-can@vger.kernel.org Cc: Marc Kleine-Budde References: <20221113085321.87910-1-mailhol.vincent@wanadoo.fr> <20221113085321.87910-5-mailhol.vincent@wanadoo.fr> Content-Language: en-US From: Oliver Hartkopp In-Reply-To: <20221113085321.87910-5-mailhol.vincent@wanadoo.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org On 13.11.22 09:53, Vincent Mailhol wrote: > No need to redefine values when available in header. > > linux/net_tstamp.h is available since Linux 2.6.30 while socket CAN > was introduced in v2.6.25. These being old releases not being > maintained any more for many years, dropping support is > acceptable. > > Regardless, candump already relies on some other macros defined in > more recent kernel version (e.g. CAN_RAW_ERR_FILTER) meaning that it > would not build on old linux kernel environments. The patch is right but this text does not fit IMO. We have a copy of net_tstamp.h in this repository to make sure we can always build the latest binaries with the latest kernel APIs even on older development environments/kernels. Best regards, Oliver > > Signed-off-by: Vincent Mailhol > --- > candump.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/candump.c b/candump.c > index 4abd2f6..8f0ca46 100644 > --- a/candump.c > +++ b/candump.c > @@ -63,6 +63,7 @@ > > #include > #include > +#include > > #include "terminal.h" > #include "lib.h" > @@ -72,10 +73,6 @@ > #define SO_TIMESTAMPING 37 > #endif > > -/* from #include - since Linux 2.6.30 */ > -#define SOF_TIMESTAMPING_SOFTWARE (1 << 4) > -#define SOF_TIMESTAMPING_RX_SOFTWARE (1 << 3) > -#define SOF_TIMESTAMPING_RAW_HARDWARE (1 << 6) > #define TIMESTAMPSZ 50 /* string 'absolute with date' requires max 49 bytes */ > > #define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */