Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp852867pxb; Thu, 28 Jan 2021 01:40:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzW5IUeEYOckydI3fGj+MpHc8LcPn78Gby5iyQuOywzoCSHErvPWLN/2oxnFIDV4XRenAnS X-Received: by 2002:a17:906:b759:: with SMTP id fx25mr10010109ejb.161.1611826826105; Thu, 28 Jan 2021 01:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611826826; cv=none; d=google.com; s=arc-20160816; b=ou0l/3bTDa3qdiq9fOz9+yAML2esOq3UnI/MEgw5Ukma9Uf3dAH0RtfxuYODpfTU8O FYgEmnXfvlMxCSHkruXXyXyvL4FzP8Kt6/m+jOpnOxF+HdbhWjPkSy/KhQDL7B/uAytQ 8diErvhrvPdkhbCvMtDUfr/FKfrQFI4SzhmaUP2b/s2uEnUKGp8KhIX+wa0c1n3wDG5I rpmwBHvoPFXMFPiM1DQ/WUfO8mU0erw+0tvMqRP4j6h3DIR15zkcDJlQXhtVf9YOrXNk LSLUeDh8pnnoNuEVzq/oCNxtm8Roknf4Xm4tYUFiva15UauFAz9j1dB3KPZiyM+vUWXL ft8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=m9QVwYg+Ohbt4kpkFCnRGxFsxG4JZc2AY7BdTlnVh5E=; b=RZWUe6z9Bxo/h6oi/C8soOaHerr8mjm69ODXJXgglai5yl1KuvXARV9LHdfU+/b8tw xcMb1KCjXQWRi2YPuAuboUd0/WXY0NL2LP+0KVjEJpMPzt6yHoRkZ+Fa2qdBRGMicy1e G6odH5edEb0jGBeJh3w9WXAC+m2fTtiC41yh2u9i4iZ0reVLyfZOcNB0BioTxHpVEWXf 9kybwWdV6JnVXybKLsPNeOLuJf+e3vhxtnV1COqPvF2LTwNv3Y25ltDN/tcLjrR646Rr V2GMVMm39z8Oo+yKssowZg9YkBGO1V97dFTeRqaWtmUvueedxeaSWQTvaS7tgviXMNMC KVJg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op5si2110909ejb.378.2021.01.28.01.39.59; Thu, 28 Jan 2021 01:40:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbhA1J3b (ORCPT + 99 others); Thu, 28 Jan 2021 04:29:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232543AbhA1JZL (ORCPT ); Thu, 28 Jan 2021 04:25:11 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 804D2C061786 for ; Thu, 28 Jan 2021 01:24:30 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l53Az-0005JR-0y; Thu, 28 Jan 2021 10:01:17 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1l53Av-0003Jb-3S; Thu, 28 Jan 2021 10:01:13 +0100 Date: Thu, 28 Jan 2021 10:01:13 +0100 From: Oleksij Rempel To: William Breathitt Gray 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 , 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 Message-ID: <20210128090113.GA8734@pengutronix.de> References: <57bc509273bf288d74835e6ebdaebf27b4991888.1608935587.git.vilhelm.gray@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <57bc509273bf288d74835e6ebdaebf27b4991888.1608935587.git.vilhelm.gray@gmail.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:50:15 up 44 days, 16:58, 76 users, load average: 0.25, 19.96, 32.07 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Gwendal Grignou > Cc: Dan Carpenter > Signed-off-by: William Breathitt Gray > --- ... > +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 |