Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1723597pxj; Wed, 19 May 2021 12:21:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeF9Hsiz+kdEiuhYGe0WSRRVAbqwdEcCAD4eZRcyHXoS2ukZ2dNx0ONqL1X5scxEl8CSW1 X-Received: by 2002:a05:6402:2064:: with SMTP id bd4mr649346edb.96.1621452109328; Wed, 19 May 2021 12:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452109; cv=none; d=google.com; s=arc-20160816; b=LopE6BZMftNa5Txxf6k/vf6rwFJSH1H0zRGQoT8e0rS7CC9N6RRwoe5Zj3eVVFzf06 SHgSqd1k/Oh0haymv3222YdeFUcEDq4zRQ++Rd57kgqczM5xwhwj0lEBXrFNBU/Fy7+o AE4az38DPrYhp/YyHj1XAoFsmbo8X5k8eg5CegSKwjmT3+y6soTrUXeKHOqsgPvqiE/4 WCdm6FXkGbOEnvXOC2TGQmXsBZquUKXxRHVL0WP1AhvGIHiGUl/VjPcxqmNmEOXXqyiW Ii1ri1VMgROIAl72IubIsB1NvgVn4C6lKLjMYtgdZtQLNofEjmvqVYrup9JE4yWcUNyo Jtjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1a/3BQnqnwQwhdVRgfo9exWw4oG0eTb7Km72R5HPSzs=; b=LQM4OTR3zSEZRCE9oio9cEEzZT17mvZTxNpIrRQa1n66VvetAwE0avk8xS43+E9lYR hDFitw02Ac9aEMX2TbvoqY9yk8rejmVAN1rgY4MW9NYgVeXxRp0n6yb6L28zB1P9VAWf gwGbh1pdxVGrCiobQvHCsb8yc5eGinCuCwN8USo/54ym6GjRmKFli/FFNFNDFJejk+Yb kyZZDfckkW+B3K9qL8AXT33QgsqusVUIk7HXrWzV2noYOsSA4+zdIAYA8b/NtrYH06nM xpVnkU1myuOYjhX+/CS/nSK47ca+U7B6c3apXFqLhLHTPlzIA8ooAunBBwCEtDU9dAr8 J33Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=La+rgrvu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si465222eja.417.2021.05.19.12.21.24; Wed, 19 May 2021 12:21:49 -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=@gmail.com header.s=20161025 header.b=La+rgrvu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232897AbhESIGE (ORCPT + 99 others); Wed, 19 May 2021 04:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbhESIGC (ORCPT ); Wed, 19 May 2021 04:06:02 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7BE0C06175F; Wed, 19 May 2021 01:04:40 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id h7so6581541plt.1; Wed, 19 May 2021 01:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1a/3BQnqnwQwhdVRgfo9exWw4oG0eTb7Km72R5HPSzs=; b=La+rgrvuHBKodAiDpmronThGYpO38NvKFMmguymd+qFiys5iCJXNJsczIzqj8mQ1PA tOrCkhkPB1BgZDVipdM732+EIhk4/9rpJXdMsaXjCFKUVthBw/p2x8iOB8j7uT9gWpBd +vxRXDjrxHl+i6fl6YJc/5gAzKvo9diAUGfipw0lwm2XlnQhJy9IhoSU3nyTetj6ZZn1 QGUu1ANl9AJ92rqRJq9sEK1BB5mOO/4IKXuvqvYsufMzob1pqqRueYqZcRBbZNSl3l2P dz71KuYc2xnz7HS/rnYG+IStaqqSXnfkq5b+137GvYTVUnotWQsob9p7FVbENkuZU7XN SLIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1a/3BQnqnwQwhdVRgfo9exWw4oG0eTb7Km72R5HPSzs=; b=nT10ZzaWHSDok88SbA+j/3yoc17SUiJdbJrxSTl5iOAIAd2t6spDRFyQaGNEC83ifu Uj2ppHVCtoDGRHQMok16EQRfRIhewqUhNTyoV1fI1Jgt5XNXYxYWQid7bXPxCG4X+xGt PcD4MQuZxshIGqQht4fmUeC5kna6Z7BwrkC87u4W6vUQxf25OpBdCkAmFC/MpTZeFQrH iIq1Yu/dQ2xxOmG3RhwEZnYO5UwzD3Du5W678Kuio5+XVdyKcs9EXxbR0eYLKgVZZGL6 2bPmThSsArtN+tBL681BNILJZsU2qB+JbFgEOOxqsWjNyRUgLwd2WfyuraO7jdZ1z9re uBkg== X-Gm-Message-State: AOAM530y5OtKa2oRPnIGNlY5Y6bKsF31mBQe8FJvQlMMIJxaUw1BhayC EdjcS0TsOPLz9FReVcwJPrc= X-Received: by 2002:a17:90b:f0e:: with SMTP id br14mr10052633pjb.121.1621411480208; Wed, 19 May 2021 01:04:40 -0700 (PDT) Received: from sol (106-69-175-91.dyn.iinet.net.au. [106.69.175.91]) by smtp.gmail.com with ESMTPSA id u6sm13266463pfi.44.2021.05.19.01.04.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 01:04:39 -0700 (PDT) Date: Wed, 19 May 2021 16:04:34 +0800 From: Kent Gibson To: Andy Shevchenko Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Suresh Balakrishnan Subject: Re: [PATCH v1 1/2] gpiolib: Never return internal error codes to user space Message-ID: <20210519080434.GA22854@sol> References: <20210518155013.45622-1-andriy.shevchenko@linux.intel.com> <20210518232451.GA7362@sol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 10:45:16AM +0300, Andy Shevchenko wrote: > On Wed, May 19, 2021 at 07:24:51AM +0800, Kent Gibson wrote: > > On Tue, May 18, 2021 at 06:50:12PM +0300, Andy Shevchenko wrote: > > > Currently it's possible that character device interface may return > > > the error codes which are not supposed to be seen by user space. > > > In this case it's EPROBE_DEFER. > > > > > > Wrap it to return -ENODEV instead as sysfs does. > > > > Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") > > > Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") > > > Fixes: 3c0d9c635ae2 ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL") > > ... > > > You immediately revert this patch in patch 2. > > My understanding is that is not allowed within a patch set. > > > Why split the patches instead of going direct to the new helper? > > It's for backporting to make it easier. (I deliberately left the context above) > > I can fold them if maintainers think it's okay to do. > Not sure what the constraints are on backporting, but wouldn't it be simpler and cleaner to backport the new helper? But, as you say, it is the maintainers' call. Cheers, Kent.