From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Vincent Mailhol <mailhol.vincent@wanadoo.fr>, linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: [PATCH can-utils-dev 4/5] candump: use linux/net_tstamp.h instead of redefining values ourselves
Date: Sun, 13 Nov 2022 21:05:47 +0100 [thread overview]
Message-ID: <ff95c43d-d620-0301-06c4-2824f4c686f6@hartkopp.net> (raw)
In-Reply-To: <20221113085321.87910-5-mailhol.vincent@wanadoo.fr>
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 <mailhol.vincent@wanadoo.fr>
> ---
> 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 <linux/can.h>
> #include <linux/can/raw.h>
> +#include <linux/net_tstamp.h>
>
> #include "terminal.h"
> #include "lib.h"
> @@ -72,10 +73,6 @@
> #define SO_TIMESTAMPING 37
> #endif
>
> -/* from #include <linux/net_tstamp.h> - 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 */
next prev parent reply other threads:[~2022-11-13 20:06 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 8:53 [PATCH can-utils-dev 0/5] can-utils-dev: a set of cleanup patches Vincent Mailhol
2022-11-13 8:53 ` [PATCH can-utils-dev 1/5] slcanpty: remove redundant asc2nibble() Vincent Mailhol
2022-11-13 8:53 ` [PATCH can-utils-dev 2/5] lib: add pr_debug() macro Vincent Mailhol
2022-11-13 12:04 ` Marc Kleine-Budde
2022-11-13 13:36 ` Vincent MAILHOL
2022-11-13 13:03 ` Marc Kleine-Budde
2022-11-13 13:19 ` Vincent MAILHOL
2022-11-13 13:34 ` Marc Kleine-Budde
2022-11-13 13:47 ` Vincent MAILHOL
2022-11-13 13:56 ` Marc Kleine-Budde
2022-11-13 14:17 ` Vincent MAILHOL
2022-11-13 8:53 ` [PATCH can-utils-dev 3/5] candump: add global variable progname Vincent Mailhol
2022-11-13 8:53 ` [PATCH can-utils-dev 4/5] candump: use linux/net_tstamp.h instead of redefining values ourselves Vincent Mailhol
2022-11-13 20:05 ` Oliver Hartkopp [this message]
2022-11-14 5:25 ` Vincent MAILHOL
2022-11-14 8:25 ` Oliver Hartkopp
2022-11-13 8:53 ` [PATCH can-utils-dev 5/5] lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set Vincent Mailhol
2022-11-13 12:05 ` [PATCH can-utils-dev 0/5] can-utils-dev: a set of cleanup patches Marc Kleine-Budde
2022-11-13 16:18 ` [PATCH can-utils-dev v2 " Vincent Mailhol
2022-11-13 16:18 ` [PATCH can-utils-dev v2 1/5] slcanpty: remove redundant asc2nibble() Vincent Mailhol
2022-11-13 16:18 ` [PATCH can-utils-dev v2 2/5] lib: add pr_debug() macro Vincent Mailhol
2022-11-13 16:18 ` [PATCH can-utils-dev v2 3/5] lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set Vincent Mailhol
2022-11-13 16:18 ` [PATCH can-utils-dev v2 4/5] candump: add global variable progname Vincent Mailhol
2022-11-13 16:18 ` [PATCH can-utils-dev v2 5/5] candump: use linux/net_tstamp.h instead of redefining values ourselves Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 0/6] can-utils-dev: a set of update and cleanup patches Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 1/6] slcanpty: remove redundant asc2nibble() Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 2/6] include: update linux/can/error.h Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 3/6] lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 4/6] lib: add pr_debug() macro Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 5/6] candump: add global variable progname Vincent Mailhol
2022-11-14 16:38 ` [PATCH can-utils-dev v3 6/6] candump: use linux/net_tstamp.h instead of redefining values ourselves Vincent Mailhol
2022-11-14 18:15 ` [PATCH can-utils-dev v3 0/6] can-utils-dev: a set of update and cleanup patches Oliver Hartkopp
2022-11-15 8:15 ` Marc Kleine-Budde
2022-11-15 8:57 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff95c43d-d620-0301-06c4-2824f4c686f6@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).