All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: jic23@kernel.org, kamel.bouhara@bootlin.com,
	gwendal@chromium.org, a.fatoum@pengutronix.de,
	david@lechnology.com, linux-iio@vger.kernel.org,
	patrick.havelange@essensium.com, alexandre.belloni@bootlin.com,
	mcoquelin.stm32@gmail.com, linux-kernel@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	kernel@pengutronix.de, fabrice.gasnier@st.com,
	syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com
Subject: Re: [PATCH v7 3/5] counter: Add character device interface
Date: Thu, 28 Jan 2021 10:01:13 +0100	[thread overview]
Message-ID: <20210128090113.GA8734@pengutronix.de> (raw)
In-Reply-To: <57bc509273bf288d74835e6ebdaebf27b4991888.1608935587.git.vilhelm.gray@gmail.com>

Hello William,


On Fri, Dec 25, 2020 at 07:15:36PM -0500, William Breathitt Gray wrote:
> This patch introduces a character device interface for the Counter
> subsystem. Device data is exposed through standard character device read
> operations. Device data is gathered when a Counter event is pushed by
> the respective Counter device driver. Configuration is handled via ioctl
> operations on the respective Counter character device node.
> 
> Cc: David Lechner <david@lechnology.com>
> Cc: Gwendal Grignou <gwendal@chromium.org>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
...
> +struct counter_event {
> +	__aligned_u64 timestamp;
> +	__aligned_u64 value;
> +	struct counter_watch watch;
> +	__u8 errno;

This variable clashed in user space, as soon as you include errno.h,
with the libc's "magic" definition of errno. What about "err" instead.
I'm not sure it an __u8 is the proper type, IIRC usually it's an int.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, kamel.bouhara@bootlin.com,
	gwendal@chromium.org, a.fatoum@pengutronix.de,
	david@lechnology.com, linux-iio@vger.kernel.org,
	patrick.havelange@essensium.com,
	linux-stm32@st-md-mailman.stormreply.com,
	alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	mcoquelin.stm32@gmail.com, fabrice.gasnier@st.com,
	syednwaris@gmail.com, kernel@pengutronix.de, jic23@kernel.org,
	alexandre.torgue@st.com
Subject: Re: [PATCH v7 3/5] counter: Add character device interface
Date: Thu, 28 Jan 2021 10:01:13 +0100	[thread overview]
Message-ID: <20210128090113.GA8734@pengutronix.de> (raw)
In-Reply-To: <57bc509273bf288d74835e6ebdaebf27b4991888.1608935587.git.vilhelm.gray@gmail.com>

Hello William,


On Fri, Dec 25, 2020 at 07:15:36PM -0500, William Breathitt Gray wrote:
> This patch introduces a character device interface for the Counter
> subsystem. Device data is exposed through standard character device read
> operations. Device data is gathered when a Counter event is pushed by
> the respective Counter device driver. Configuration is handled via ioctl
> operations on the respective Counter character device node.
> 
> Cc: David Lechner <david@lechnology.com>
> Cc: Gwendal Grignou <gwendal@chromium.org>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
...
> +struct counter_event {
> +	__aligned_u64 timestamp;
> +	__aligned_u64 value;
> +	struct counter_watch watch;
> +	__u8 errno;

This variable clashed in user space, as soon as you include errno.h,
with the libc's "magic" definition of errno. What about "err" instead.
I'm not sure it an __u8 is the proper type, IIRC usually it's an int.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-01-28  9:02 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26  0:15 [PATCH v7 0/5] Introduce the Counter character device interface William Breathitt Gray
2020-12-26  0:15 ` William Breathitt Gray
2020-12-26  0:15 ` [PATCH v7 1/5] counter: Internalize sysfs interface code William Breathitt Gray
2020-12-30 14:37   ` Jonathan Cameron
2021-01-06  5:29     ` William Breathitt Gray
2021-01-06  5:29       ` William Breathitt Gray
2020-12-30 23:24   ` David Lechner
2020-12-30 23:24     ` David Lechner
2021-01-06  5:30     ` William Breathitt Gray
2021-01-06  5:30       ` William Breathitt Gray
2020-12-26  0:15 ` [PATCH v7 2/5] docs: counter: Update to reflect sysfs internalization William Breathitt Gray
2020-12-26  0:15   ` William Breathitt Gray
2020-12-30 14:41   ` Jonathan Cameron
2020-12-30 14:41     ` Jonathan Cameron
2020-12-26  0:15 ` [PATCH v7 3/5] counter: Add character device interface William Breathitt Gray
2020-12-26  0:15   ` William Breathitt Gray
2020-12-30 15:04   ` Jonathan Cameron
2020-12-30 15:04     ` Jonathan Cameron
2021-02-12  6:32     ` William Breathitt Gray
2021-02-12  6:32       ` William Breathitt Gray
2020-12-30 21:36   ` David Lechner
2020-12-30 21:36     ` David Lechner
2021-01-30  4:59     ` William Breathitt Gray
2021-01-30  4:59       ` William Breathitt Gray
2021-01-04 18:15   ` Dan Carpenter
2021-01-04 18:15     ` Dan Carpenter
2021-01-28  9:01   ` Oleksij Rempel [this message]
2021-01-28  9:01     ` Oleksij Rempel
2021-01-30  5:15     ` William Breathitt Gray
2021-01-30  5:15       ` William Breathitt Gray
2020-12-26  0:15 ` [PATCH v7 4/5] docs: counter: Document " William Breathitt Gray
2020-12-26  0:15   ` William Breathitt Gray
2020-12-30 14:47   ` Jonathan Cameron
2020-12-30 14:47     ` Jonathan Cameron
2020-12-30 18:18   ` David Lechner
2020-12-30 18:18     ` David Lechner
2020-12-26  0:15 ` [PATCH v7 5/5] counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8 William Breathitt Gray
2020-12-26  0:15   ` William Breathitt Gray
2020-12-30 15:31   ` Jonathan Cameron
2020-12-30 15:31     ` Jonathan Cameron
2021-02-12  6:04     ` William Breathitt Gray
2021-02-12  6:04       ` William Breathitt Gray
2020-12-30 17:36   ` David Lechner
2020-12-30 17:36     ` David Lechner
2021-02-11 23:56     ` William Breathitt Gray
2021-02-11 23:56       ` William Breathitt Gray
2021-02-12  1:10       ` David Lechner
2021-02-12  1:10         ` David Lechner
2020-12-30 23:34 ` [PATCH v7 0/5] Introduce the Counter character device interface David Lechner
2020-12-30 23:34   ` David Lechner
  -- strict thread matches above, loose matches on Subject: below --
2020-12-26 20:00 [PATCH v7 3/5] counter: Add " kernel test robot

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=20210128090113.GA8734@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@st.com \
    --cc=dan.carpenter@oracle.com \
    --cc=david@lechnology.com \
    --cc=fabrice.gasnier@st.com \
    --cc=gwendal@chromium.org \
    --cc=jic23@kernel.org \
    --cc=kamel.bouhara@bootlin.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrick.havelange@essensium.com \
    --cc=syednwaris@gmail.com \
    --cc=vilhelm.gray@gmail.com \
    /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.