Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2571466ybv; Mon, 24 Feb 2020 07:38:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzc6dmFrLZBsq8r/uW9eQtNRysl4nAxX4kyzoWsiJ1JTY1NcKV2gBxsnmCFLgMEjKHgV+Wd X-Received: by 2002:aca:c792:: with SMTP id x140mr12801557oif.53.1582558693901; Mon, 24 Feb 2020 07:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582558693; cv=none; d=google.com; s=arc-20160816; b=z2jjmvFeKNIW4IFC6yDcv1cJWO8FbKWr2Z34DcJah0fEqCeYsDKJ5IGTAsQuKU/8Cz eVYnnZ7fhu65kHZRqoCZpEdjgK9naodiN7fGnZoHxD8qS1wt0Dau9QUO6L5CJ0XZuL2M 56hHglFqVN7gBDT0WdxE79USiDXQ/f0sEVWBbTaLJye39zkCMuBVEgFVK2uqSzLlq8VQ jDh1jZaDZBAtp1t07NgdLf7FTeCFsUefciOHY3WJBAqXf5pWvg8DKgtJhlWFmMHgSc4Q 6rMI/jOF7b+TfFIHWYAA5bQ6eM8cjBF4ByrxlKP8gApGa6pwmbTaIsF3su9h9BQAbLxR iDTg== 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=HuiS5VpQdVWKyWZNdAImJ0IGya/kRsZICZjyMlw0prs=; b=g3dyAAKy95LSB7OffWacAVaQNZDgw5/trBU7JLnLGeLny2k6W5kwNqUAkPAqkTBFvd smrqDAFHttUuOdAR7TgoRgbJtcj++bmKSF9+ASD6OzyKFDNRIZI4OTZUT3MQaSozo12r xpTx53qXHRv2U8Fn3H3tnHFw4Lw2m3ZtDLEaT1Q5x6QuK9UZi29Il8i4co4b/E+W0NMU e2lWEcwAz38zA5TWtJJAGI54XtE8KYBIqIHyI2TjxU/YhvS0NB9vmzJ6QrgIHYdWA1q+ xpSwGz+wFGkopqGSzER1N6a5tiQQ319+RKQDywc8G81RBsqGe8VPvuzaW+Goc0mMrXEn weWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=LrPlZIuf; 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 w26si5951246otl.213.2020.02.24.07.38.01; Mon, 24 Feb 2020 07:38:13 -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=LrPlZIuf; 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 S1727859AbgBXPhx (ORCPT + 99 others); Mon, 24 Feb 2020 10:37:53 -0500 Received: from mail-qv1-f68.google.com ([209.85.219.68]:34698 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727830AbgBXPhx (ORCPT ); Mon, 24 Feb 2020 10:37:53 -0500 Received: by mail-qv1-f68.google.com with SMTP id o18so4314597qvf.1 for ; Mon, 24 Feb 2020 07:37:52 -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=HuiS5VpQdVWKyWZNdAImJ0IGya/kRsZICZjyMlw0prs=; b=LrPlZIufqg9LL07eHs2XATTTm09m/+vYZkHtS86qicAyjqgw2IlPXNVlrUaxGi5K29 WCy1OQVM5qF5wrJuAqO7iQUpoEtAtHKZMto9qbmF56dM6UCRad722srOymjNJkNd3mWS q7E0ZSwo0aaei3WxTgDlrDDcJ+QE5REimB2KO5vGKr/Cwl8TpIAsd7wQ1PruxzjwDLgc cS+d8FNYeFbyrPwA/rLtClKyVqlcDv0L3v5zwNHGCJqxp35ZH9cC4k9VCRnLjBXuEc/Z fu0Z3UezLh7zIb1AH6GNya1c3xlGOPtgPdRtca9+p8XBHqLwYUg1/cdyhbwdCpS1gjRt t1jQ== 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=HuiS5VpQdVWKyWZNdAImJ0IGya/kRsZICZjyMlw0prs=; b=kJVhl/gjtBh+08oe+sFtNrsH4hdgJxAH4SYZuJrERKJGKj12AtVUJYAxBO3e+Tmepr zpypRd3HckXrE+U03iH2KpkUOjXmvQt2IexOuSq09uodxYjY8vKFoE5jm/cISvJlEz9d obZdIV/QYyCb/C61g6Gs2t585GTHMvWyFk12YQkO1UB7vhducixGGk/IikVRl4NMEamK 8m2YendVagJ0HUUKw5ejBdje+A+I0KDBDbgZnWFaAie5Ra/dFdrsm+aY317t9FosRv3l A1RxiVbzqOYCFWBZyR1w0MPYylSCQ2BD5JyNVVZoFS7GFMDBlKcob7xpjAjMrpnHKquZ sbVQ== X-Gm-Message-State: APjAAAVS/BBX+GFB3v0zx6Brp607IyPoaJEEDKWQjoo/nXJuCyyM4c7K h0VKgp9QhGZc5w0IHa7I8X4vwOfG+11Nx32680c1AQ== X-Received: by 2002:a0c:f28f:: with SMTP id k15mr44011080qvl.76.1582558671694; Mon, 24 Feb 2020 07:37:51 -0800 (PST) MIME-Version: 1.0 References: <20200224144953.1845-1-warthog618@gmail.com> In-Reply-To: <20200224144953.1845-1-warthog618@gmail.com> From: Bartosz Golaszewski Date: Mon, 24 Feb 2020 16:37:40 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: fix unwatch ioctl() To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij 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 pon., 24 lut 2020 o 15:50 Kent Gibson napisa=C5=82(a= ): > > Fix the field having a bit cleared by the unwatch ioctl(). > > Fixes: 51c1064e82e7 ("gpiolib: add new ioctl() for monitoring changes in = line info") > Signed-off-by: Kent Gibson > > --- > > I had written some tests for v1 of the new ioctl patch series, and just > updated them to run against the v6, which is now in gpio/for-next. > > I found the Unwatch ioctl suffered a regression - it simply didn't work > anymore, though it wasn't returning any error. > > This patch fixes that regression. > > drivers/gpio/gpiolib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index 73a1e0831eeb..2411562a9bac 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -1276,7 +1276,7 @@ static long gpio_ioctl(struct file *filp, unsigned = int cmd, unsigned long arg) > if (IS_ERR(desc)) > return PTR_ERR(desc); > > - clear_bit(desc_to_gpio(desc), &desc->flags); > + clear_bit(desc_to_gpio(desc), priv->watched_lines); > return 0; > } > return -EINVAL; > -- > 2.25.0 > Thanks for catching this. Applied! Bart