From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Marc Kleine-Budde" <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH v7 08/10] include: can.h: update comment about introduction of __kernel_sa_family_t
Date: Tue, 21 Jan 2014 15:28:45 +0100 [thread overview]
Message-ID: <52DE841D.5070705@hartkopp.net> (raw)
In-Reply-To: <20140121132055.GB26766@pengutronix.de>
On 21.01.2014 14:20, Uwe Kleine-König wrote:
> Hello Marc,
>
> On Tue, Jan 21, 2014 at 02:00:02PM +0100, Marc Kleine-Budde wrote:
> I'd make this:
>
> -// typedef unsigned short __kernel_sa_family_t;
> -// introduced in Linux 3.2 commit 6602a4baf4d1a73cc4685a39ef859e1c5ddf654c
> +/*
> + * This typedef was introduced in Linux v3.1-rc2
> + * (commit 6602a4baf4d1a73cc4685a39ef859e1c5ddf654c) in <linux/socket.h>.
> + * It must be duplicated here to make the can headers self-contained.
> + */
> + typedef unsigned short __kernel_sa_family_t;
>
> and then drop the following hunk. That should work as intended also on
> systems that have kernel headers newer than v3.1-rc2 because a
> duplicated typedef shouldn't hurt. (Note I didn't test that or tried to
> find a proof in my C book.)
>
Good idea!
I double checked this by simply adding two identical typedefs:
--- a/include/socketcan/can.h
+++ b/include/socketcan/can.h
@@ -126,6 +126,10 @@ struct canfd_frame {
// typedef unsigned short __kernel_sa_family_t;
// introduced in Linux 3.2 commit 6602a4baf4d1a73cc4685a39ef859e1c5ddf654c
+
+typedef unsigned short __kernel_sa_family_t;
+typedef unsigned short __kernel_sa_family_t;
+
/**
* struct sockaddr_can - the sockaddr structure for CAN sockets
* @can_family: address family number AF_CAN.
It compiles without problems (and warnings).
Tnx!
Oliver
next prev parent reply other threads:[~2014-01-21 14:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 12:59 [PATCH v7 00/10] License cleanup Marc Kleine-Budde
2014-01-21 12:59 ` [PATCH v7 01/10] include: Remove two unused header files Marc Kleine-Budde
2014-01-21 12:59 ` [PATCH v7 02/10] ioctl.h: drop unused header Marc Kleine-Budde
2014-01-21 12:59 ` [PATCH v7 03/10] isotp.h: add explicit license information Marc Kleine-Budde
2014-01-21 12:59 ` [PATCH v7 04/10] include/socketcan: prepare headers to be moved to include/linux Marc Kleine-Budde
2014-01-21 12:59 ` [PATCH v7 05/10] include: Move all includes from include/socketcan " Marc Kleine-Budde
2014-01-21 13:00 ` [PATCH v7 06/10] include: fix paths mentioned in files Marc Kleine-Budde
2014-01-21 13:00 ` [PATCH v7 07/10] include: can.h: remove unused include of version.h Marc Kleine-Budde
2014-01-21 13:22 ` Uwe Kleine-König
2014-01-21 14:33 ` Oliver Hartkopp
2014-01-21 13:00 ` [PATCH v7 08/10] include: can.h: update comment about introduction of __kernel_sa_family_t Marc Kleine-Budde
2014-01-21 13:20 ` Uwe Kleine-König
2014-01-21 14:28 ` Oliver Hartkopp [this message]
2014-01-23 13:18 ` Oliver Hartkopp
2014-01-23 13:19 ` Marc Kleine-Budde
2014-01-23 13:24 ` Marc Kleine-Budde
2014-01-23 13:36 ` Oliver Hartkopp
2014-01-23 13:39 ` Marc Kleine-Budde
2014-01-21 13:00 ` [PATCH v7 09/10] include: gw.h: update comment Marc Kleine-Budde
2014-01-21 13:24 ` Uwe Kleine-König
2014-01-21 14:41 ` Oliver Hartkopp
2014-01-21 13:00 ` [PATCH v7 10/10] include: import copyright information from the kernel 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=52DE841D.5070705@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=u.kleine-koenig@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.