Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp680974pxa; Wed, 12 Aug 2020 10:53:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwubRdiJExMmcQx6cEnW3RLJdpJsOOHO14FdRNYj1yF/fyJ2eYK5XhM/S0b1M+s8uVPEGfQ X-Received: by 2002:a17:906:4acd:: with SMTP id u13mr993814ejt.4.1597254785973; Wed, 12 Aug 2020 10:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597254785; cv=none; d=google.com; s=arc-20160816; b=vksESSZidQYgpwuLnknk3wr2J8QzMqOdoNv0VCKnfyLa/YjX0oS3l/b3NdCvKthDxf jMtxkDjyC6RolOzsgv/KXNswJk7cJDk/jOu5/qnnmSiIZgGT6zC3tCIzxwL6YNC2jJHO rfD93P+FBo5AhZJz8Xia3tRu6bqYONVCoBcGO+Ra2/t9V7ZbqbyfZCPzP0ef+Xonxh9z gakHdrkBeUBGhixpuE1RyZp44vRfK0wEfwfW2HSQJbUXQyWcp34Rx790hCuOJnLaU/qG dzYM+DOtJv7SF8JsipVfWMxZWra6eGOTAwQVVsvS1Jvjut3wDCyme1nWXRvvgHMOOzvC ED+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=D31gvXwueiTQW0zOx6WQYb+FpRC9rVXNJ4C7VuyhJ1o=; b=p0WYlqu08dvgx2Wh//JHRVCfCJJhYuwE5wf9MQku+Rxj1569rkiE0EVtTAKl4jJTNK PFBRGS5P4IQnLvNwlrnT6zwnfI09PPJjrI72/aB2beVZXsAU38aoHh2RtisgwWvyf1wO PzYLL9Qyjv06t7HJJPG/e7KDqZCOBsbywxQn3Ntvulf6BaYFOTJcv/CcwftPYiOwBFzO b58iErU6OVPTtAvPZyOVOg8sdzbtN6/TNcdz1ASAiawTNOjq3hKd7/661jNuUIzfI79F LTKrkrKR1OlS7lRsM7MQ+geHXBzcZSHPtJ59L1ryrwOYlSzOUmkDjgcbiQazrZmNar0V DyGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1tEVefoD; 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 v15si1707004edy.90.2020.08.12.10.52.41; Wed, 12 Aug 2020 10:53:05 -0700 (PDT) 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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1tEVefoD; 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 S1726573AbgHLRtG (ORCPT + 99 others); Wed, 12 Aug 2020 13:49:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbgHLRtF (ORCPT ); Wed, 12 Aug 2020 13:49:05 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B088C061383 for ; Wed, 12 Aug 2020 10:49:05 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id l13so1408100qvt.10 for ; Wed, 12 Aug 2020 10:49:05 -0700 (PDT) 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; bh=D31gvXwueiTQW0zOx6WQYb+FpRC9rVXNJ4C7VuyhJ1o=; b=1tEVefoD7l/vL0aoMx+sEWhWifIrF4HpNaz+cqo0t8WUEXAQKbrMjqwNPZJ6hZisLN igNElCrRIdGAPDhDjTpzCyjqWf8sxs7sqzgeNCLIFFjaVUkNn4LoaNyAsb22wB3lWCkB Ka9Zp39azUXQA1li48UvI8rKs4kcMLEv4nj/D5HyIrQPDfm11N25yo9BeKtJU0IwlqOf WiL8fBg58jhiEMM/oMGphDuPqlWKHBmBDctAadd/3zcEaoq98zs9tV1Cpojn5CGy5M3q 5c9b4+HctAqnE9BreK7flKjW+zN5GaH/usZi+aL1X5Cp5aM1ca/T6EQLayxwaVZp1zil mzsQ== 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; bh=D31gvXwueiTQW0zOx6WQYb+FpRC9rVXNJ4C7VuyhJ1o=; b=ntXxxWFfMa4A59EinbfpiwA/sN8GqK0fzZTlikFmFCgXOiUvsUJDkZxv1wbO68jnw5 wWQViV9pNvV23oO2lEapq8L2emSUcClfUzdxw9d5pkaf2V7AVaiIN1u4usg/nE1hCMR8 kgeKJwCWHq7l/ZdMHvp6hIRxzZSjArQZyg/lbm3d1NAv/RgD7Oc4uEQ4XZ9cKykzjVMe iHe1Vaad06HgYDBpNVoBSHsMUwtUafSJKgPDwmj6bNyBClpROw+0Xc1cZ7sXT+pypv3G 1d9bG7Z6kuyl5RjvFjwyTkslqm6JqmmkOh8C+j2uU2B6pYw7jOos4BrM4ant22Hf0LRb G/RA== X-Gm-Message-State: AOAM531LuIk4aPVHbKnwtEe6ob2vvaqI7rLNTzdfEyz+hci/660ye0nW NvVsrbeKBKqeosSxFnAMssU833b5/97R3tcRZrQR+Nrh X-Received: by 2002:ad4:5502:: with SMTP id az2mr763112qvb.148.1597254544478; Wed, 12 Aug 2020 10:49:04 -0700 (PDT) MIME-Version: 1.0 References: <20200809132529.264312-1-warthog618@gmail.com> <20200809132529.264312-3-warthog618@gmail.com> <20200812015458.GA8760@sol> In-Reply-To: <20200812015458.GA8760@sol> From: Bartosz Golaszewski Date: Wed, 12 Aug 2020 19:48:53 +0200 Message-ID: Subject: Re: [PATCH v3 02/18] gpio: uapi: define uAPI v2 To: Kent Gibson Cc: Andy Shevchenko , LKML , linux-gpio , Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2020 at 3:55 AM Kent Gibson wrote: > > On Tue, Aug 11, 2020 at 09:11:41PM +0200, Bartosz Golaszewski wrote: > > On Sun, Aug 9, 2020 at 3:26 PM Kent Gibson wrote: > > > > [snip] > > > > > > +/* > > > + * Maximum number of requested lines. > > > + * > > > + * Must be no greater than 64 as bitmaps are limited to 64-bits, and a > > > + * multiple of 2 to ensure 32/64-bit alignment of structs. > > > + */ > > > +#define GPIO_V2_LINES_MAX 64 > > > + > > > > If we refer to bitmaps for which helpers are defined in > > include/linux/bitmap.h then they're not limited to 64-bits. I'd just > > say here that we want to fit into 64-bit integers for simplicity. > > > > Strictly speaking, userspace doesn't know about include/linux/bitmap.h, > but I'm happy to remove any ambiguity. > > Does this work for you?: > > * Must be no greater than 64, as bitmaps are restricted here to 64-bits > * for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of > * structs. > > Cheers, > Kent. Yes, perfect. Bart