Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2527153ybv; Mon, 24 Feb 2020 06:52:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwBXKodyfIT4VXlpg5SPM08YNpmWwkXInWdIs8Ysl5Wv7IpRAIwYM59AIJdk8byz9GuMycQ X-Received: by 2002:aca:b608:: with SMTP id g8mr13372510oif.142.1582555927322; Mon, 24 Feb 2020 06:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582555927; cv=none; d=google.com; s=arc-20160816; b=fpydNuUhCaLNdSxet1EEbFtWLh4UMULdoRoYyTQ4CYxJInCHSmwvcceLNx9RZ5fnsU dsJMhn5KYFzCLVPe6v+AAo50oBn8qyqkhZ9at+2Vnf2Qp5ZxM8w8ebkjBWErDe6M2xXg 0HYHOMPhbCwkFdSzBdKHC+WPNqp1ad8bv2gqfSxSEmyBmY5y648diPEH95YZ0stFOFcq tiWBrWx7pwoLqkpOi1rAm5KVE0fIQrdEEGiNDeTt44/WVj5UBNHoaeDqUqBwFVPR8QN9 gY3mNQWQHfZelCM5lRYHTJmtWk/U9u32s6T9Ym1hUBVdYLs1VWSBf3BE6syacrCGDScs LX6A== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LjdCnI1FDhpyq/TpzAqb/yMhriBw2389lOX4pglgwrQ=; b=aQg1q/IzGfLfOJLq4PTDqUs153k8yqG6ZTLk8jQewrwsYtV0c2AneHSUZ6/hD4YesK rjADO7whBloIwJ0q6kV0B2mAZPx81KLtGzuEnrchUiLyC0srbuXVrjyXQZKa/FN0AG4g XnwXcf18hAg+PMogL+0ioPfiIIFMcpMmbssQ+wpt1hc+EkciqqGfbCCGMfumgBTw2Ocl H8zDDDLt5Bs30dXt1kFqcACTzBC92j91bdg1bxOx0wuAG08xCCG6ZbO9M9sOvfV/OyrO eIHO2ptMC8sabFmTtQZ1290/8Z/OKs83raCltog8uJIsdFzN5X0DDjulB2wlz9SvcHFX D/NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gt8bTv0a; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si4833188oic.190.2020.02.24.06.51.54; Mon, 24 Feb 2020 06:52:07 -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=@gmail.com header.s=20161025 header.b=Gt8bTv0a; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbgBXOu2 (ORCPT + 99 others); Mon, 24 Feb 2020 09:50:28 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37560 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727181AbgBXOu1 (ORCPT ); Mon, 24 Feb 2020 09:50:27 -0500 Received: by mail-pf1-f196.google.com with SMTP id p14so5479574pfn.4; Mon, 24 Feb 2020 06:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LjdCnI1FDhpyq/TpzAqb/yMhriBw2389lOX4pglgwrQ=; b=Gt8bTv0adK23rBe6BXKj4Fqv6D5zlw2L9BIMxeXEiBCFzuRAiW+4nAcnJn80MwYkMJ ppWWo/X4X/uvS7JK+92wZups/N9PiygjXlIg1eIzofmxzwT83qVMY8dCmB2xR8BXsgYU ueX1gT8JoGtk5DczgbbpA8s9en6k+/4AjviHZ1aqLdoy7B9RNH2tmRT5PzlpQdcNmITc eSEH3nkopKh3uS0PGT/8bgNfc2RE4gOVSnav2hirm2Zm/SosOuS/6phi5m8RYemIIX3K IupNJxAZwsIQv1pCvAlAQQ96mthazlo7ouuzTTSgoFL4B0GAhSaLn+3yol49JJBCFRg4 YbOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LjdCnI1FDhpyq/TpzAqb/yMhriBw2389lOX4pglgwrQ=; b=FMaU877hyStqfRAsJwWozcJXnieCWhfHZMBjfRS3MKlKMiZF+m5FFuhK4/tgN2GQsn 1BX/FDRGNLSXq4w9QKH/nFPWvgK4OIvTDYcOxgKG3uV0RizDFGKGzHXFNc3lY7tMrXnS yfhQcdYshSGp3slKcHy1AKGWFx23pjIS+iut7mRQJVNh+Hk1+w+EeMy8ZD5o+RrSoPf8 zMi1zDuF6Uis/5JCG4DGzZMor4QK40cnuFL2u36Z/fTHZmROpqRjK8tt/eLxepuYqqe1 V5Fi7tSDoiakCcWn4vi5mL39g5LXhlHHq/4SsBZ+hIWCiZPmUwtnsk2uLkKZpppjzAWB t05w== X-Gm-Message-State: APjAAAWcrwl1VDDsLLXZGMF52cYqIt/+WQoP72mT5iofciDgJIAGW5wj gY5kukRwd4gybIF8zcp6Kv1tAoQs/peAxA== X-Received: by 2002:a63:3754:: with SMTP id g20mr50969368pgn.384.1582555826839; Mon, 24 Feb 2020 06:50:26 -0800 (PST) Received: from firefly.lan (220-235-100-192.dyn.iinet.net.au. [220.235.100.192]) by smtp.gmail.com with ESMTPSA id y10sm13354189pfq.110.2020.02.24.06.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 06:50:26 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com, linus.walleij@linaro.org Cc: Kent Gibson Subject: [PATCH] gpiolib: fix unwatch ioctl() Date: Mon, 24 Feb 2020 14:49:53 +0000 Message-Id: <20200224144953.1845-1-warthog618@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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