Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3453457ybl; Fri, 20 Dec 2019 09:31:30 -0800 (PST) X-Google-Smtp-Source: APXvYqyn3eVyaEuKs6GxhYqYDPPq9VVJYDmFq2ozEJn+mta8gl8YCTKwph+8W8AmGXYGCiqFkFL+ X-Received: by 2002:a9d:3677:: with SMTP id w110mr16545263otb.139.1576863090435; Fri, 20 Dec 2019 09:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576863090; cv=none; d=google.com; s=arc-20160816; b=WRkus4XHSW+6a1xZTQWoFFnSeVOr2H1NsGlsHQSijKCFMFef59s2tdepNEEg+AwFul 0CM0sDlvCwF+9gEwpuhtsxnCVsw0NtDoYIqCRX/T9i7dAVQfymDOLpOtZzrJWPjch2an +ahbfMgdCJi/CrcHn8PzUip8AkJTqnLgy6xmtI55iYU9YwBUimi5OwnwwdlcgqIPNGMV mRcm8wsg3nfi/ek5Okkq1tgP4KSurEkMW/x2L4Upw88NvpFba9DVtwxJEUnVysPFJM5u RVeQEZNwZdFAdFTCgSYQCBCdsTgvTOIFyKDCELYxcvm8ZLEtYdgsidylZIhNaRILnuXz 2arA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NvaP12stWHwbnnpA0grDoLpklRVhy2RqwgLcEKcFbXU=; b=yeouER+MtbkVZI3ypC8AGeCr/S7TSDxtxhLfOmfbNU3Hg961I9ZQJsECplX5q7Sz5U sxiq9esje/JRGLvL5dJbcZNjpwdEhxzud1fStQ9IZH+4SjO9b1cv9hieFjYjpFW5SyW5 wlHmMmrpvYg38zg0NjTVsZKRCBvKXei0X4aWXEAsjwfTBbMoarckYs2+IqAuRscClNex SQLTs5U5+Nxvia4kLqJ2qpeXCftLgshHOQgwBA7t8lm6h+ppixZXTRs9u4IRb4xnuvkO JB6zYjSjvNlH5PmXBd89U/6J3Y/r9GNkFB5JYc6yOLv2DmBQDOt+dPxFdW5SVJjAKvld bEnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="U/B1Za8E"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15si521173oib.61.2019.12.20.09.31.17; Fri, 20 Dec 2019 09:31:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="U/B1Za8E"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727435AbfLTR3R (ORCPT + 99 others); Fri, 20 Dec 2019 12:29:17 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:46146 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbfLTR3R (ORCPT ); Fri, 20 Dec 2019 12:29:17 -0500 Received: by mail-qt1-f196.google.com with SMTP id g1so1934440qtr.13 for ; Fri, 20 Dec 2019 09:29:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NvaP12stWHwbnnpA0grDoLpklRVhy2RqwgLcEKcFbXU=; b=U/B1Za8EZ5MDW/sPPEaa7S5ULPHLaQoiFAeVPwfRrbvwq7HI3v8by7uDez1XEbcVPe s62kal4+gzaM1MaB3NWiLeAP3vjc5q+bkb3gl2+XIplVMXxRX2AbQBBQiokjY4ovR5N+ 3ELAP0QnVlBPpVRqVbg92dNNND9bZCche77UbL7OM4yxeRz3hTSLd8nxz4VvWeeOjiPd Mfn8vSGKzXnMG5urxkIZlABZNGdJwbwi7rvHmnlkjdtmZBzGc8wRh3ymnXyn32wHxk0i whGVHynNSWJB3mnqMsDkDZiZAe3U9gh+etslnO2FK/Y8n4FuJRx/jrVRK31K6zf4JDhT Uh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=NvaP12stWHwbnnpA0grDoLpklRVhy2RqwgLcEKcFbXU=; b=h7+nj2+4S968/LY9SVUCBISAdusiqqKSGbIZdKlY3HHKOPhTkeGf9cvixjmdWnkbdm 0Oe+dfuzCiwug1Gi9PIwsBF4SGbEw2Pm2EkWQ/wtYAaHnHRCG66T2a9m4kHTc1QdCktr 6m3xOF4BbCODtt9e/JTrEXr9n0u17iALDcexR50iLTm/sXVuadkaWOHpyBJi1YbP2CO7 +J5aHUHD3X8EjN4b0rGdPCJ9JHx4UuUwVy2YRRSluiGECeGdhc1lUQ/fWcYdGGaNs9HH CY2FlzjgdONfAUl1+dMqLbi2rkBmfT508urWV8dfmg/YmZ7SAvjM5ZrzWNOQEIFBfeY7 d2EQ== X-Gm-Message-State: APjAAAU0wuskrtBzV++/UppBHO9KBXV/8e+S4Vp4wOQIY9/m78FR6X/C 4AA9cb9HFCsE8n00VkwP5qhJGlng6K9ZHSBwXKXsxQ== X-Received: by 2002:ac8:3703:: with SMTP id o3mr12503169qtb.208.1576862956229; Fri, 20 Dec 2019 09:29:16 -0800 (PST) MIME-Version: 1.0 References: <20191219171528.6348-1-brgl@bgdev.pl> <20191219171528.6348-13-brgl@bgdev.pl> <20191220121543.GY32742@smile.fi.intel.com> In-Reply-To: <20191220121543.GY32742@smile.fi.intel.com> From: Bartosz Golaszewski Date: Fri, 20 Dec 2019 18:29:05 +0100 Message-ID: Subject: Re: [PATCH v3 12/13] gpiolib: add new ioctl() for monitoring changes in line info To: Andy Shevchenko Cc: Bartosz Golaszewski , Kent Gibson , Linus Walleij , Greg Kroah-Hartman , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 20 gru 2019 o 13:15 Andy Shevchenko napisa= =C5=82(a): > > On Fri, Dec 20, 2019 at 12:25:59PM +0100, Bartosz Golaszewski wrote: > > czw., 19 gru 2019 o 19:17 Andy Shevchenko > > napisa=C5=82(a): > > > On Thu, Dec 19, 2019 at 7:17 PM Bartosz Golaszewski w= rote: > > ... > > > > > +/** > > > > + * struct gpioline_info_changed - Information about a change in st= atus > > > > + * of a GPIO line > > > > + * @info: updated line information > > > > + * @timestamp: estimate of time of status change occurrence, in na= noseconds > > > > + * and GPIOLINE_CHANGED_CONFIG > > > > + * @event_type: one of GPIOLINE_CHANGED_REQUESTED, GPIOLINE_CHANGE= D_RELEASED > > > > + */ > > > > +struct gpioline_info_changed { > > > > > > > + struct gpioline_info info; > > > > > > Is this guaranteed to be always 8 byte aligned? > > > I'm expecting to see some comments there and / or here about it. > > > > > > > struct gpioline_info alone is 32-bit aligned but its size is 72 bytes > > which works for 64-bit alignment. This new structure's biggest element > > in 64-bit, so it's 64-bit aligned on 64-bit arch. We have 72 bytes of > > gpioline_info, 8 bytes of timestamp, 32 bytes of event type and 5 * 32 > > bytes of padding. Should be fine, but I'll add comments to the header. > > Yes, what I meant is to add comment at least to struct gpioline_info defi= nition > that if somebody would like to change it there (which also might be a > problematic here, if there is no versioning scheme / length member). > > > > > + __u64 timestamp; > > > > + __u32 event_type; > > > > + __u32 padding[5]; /* for future use */ > > > > +}; > > Offtopic a bit, had you had a chance to look at Buildroot and our scripts > I shared? > Not yet, I'll do that over the weekend. Bart