Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2161746ima; Mon, 22 Oct 2018 05:28:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV60cDmKPcFctnvrBRYkkMKb24FN0l/r10s6lF03awEBqSJnWDPEkpIB88zKctoq0Hv7cf3Uc X-Received: by 2002:a17:902:7d98:: with SMTP id a24-v6mr44344629plm.271.1540211330219; Mon, 22 Oct 2018 05:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540211330; cv=none; d=google.com; s=arc-20160816; b=nL4Zo1S1YwPonDGgil6Jjsix7mQcwFQMscP2+OMwieYqWxU+NHMKo4FbTkXKp8wUP3 oseWii7eqCFg8JrnfScgXgUeRu735YPe1ag415/mQf5rBsm2s56WxPBqRYHBPTaWljWf iHbCPcZ56wUCgawc4FSJ7Dl4YNAWNrdt0rPxX9SxK3y3QKz0Y8x9NEyQXCiB81BNTykl C37/es6b3oalBZ/8GSoIYtZaXIEWngV8AauwokCmTxfSplkdoLXQSslSc+hAP2zt0W1D omW8PFIevCI9IY/PSwscRZyZYmo4ra9Xq1l4+GSh4Z4zTGfhXrQvPlggMmb+mzTbKQC2 6z8g== 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=qGnQnh9pSjdWkaRcOQSlf8jt8zh/2L9nHuzvcwoIkUM=; b=oHXkCPmsR2AQXiIflaSNCAKwILf0mTIHaWYoxjfqgQcYjr48fhe2CyKW/zbAPPcTvg ZLWHUV1OKHpZQWjl98fulSp+4GRWJ6UKcB3G1g++2JWiP31WrhIj/nIMS9Ue30IBTMeG saMja3hYRUmykRncNTkhje6FENsxXoBzX9i8NFEBvRqn8najuCmeVFkjF/cJoFuCL93i 0AggtZUSCTX9vtm8B6b+gaWbJkpz4C+Cu1wfjT6EH7z+2ilen4NXIQWXn1UShwuJGyO/ xTfgG3XXoBU2AL72Xbvfi/s/G9R2nYdQGO/hf42EPKdb4i5UutyXvitYLEczjZI899+9 gzOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ZjYX/up5"; 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 f1-v6si35906615pln.317.2018.10.22.05.28.35; Mon, 22 Oct 2018 05:28:50 -0700 (PDT) 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="ZjYX/up5"; 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 S1728736AbeJVU0c (ORCPT + 99 others); Mon, 22 Oct 2018 16:26:32 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40740 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727194AbeJVU0b (ORCPT ); Mon, 22 Oct 2018 16:26:31 -0400 Received: by mail-pl1-f196.google.com with SMTP id 1-v6so18985502plv.7; Mon, 22 Oct 2018 05:08:14 -0700 (PDT) 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=qGnQnh9pSjdWkaRcOQSlf8jt8zh/2L9nHuzvcwoIkUM=; b=ZjYX/up5UxOSZXaGEp+lSJ044zru4guyIkuB/ob1BoGSoUJym/wJDjPxjS52C9sMZl M/dnDwVsmjeTHd1ThwQK0ry0EvHFQ6ij/FZEKCUE7sSffeynpnZ72WW3HvX9cH9lLCDY X1tjifWeLPPXTYIjYyaZ69hsa1v3KufR17rR7hm7sZDQBk/Ovy6vJ7O4ndwWEv43fFlY 5MFKGi15syhjzF7SYW6HZJpcm50HAr4NM6hlu4tpZ/zaZHklkZvpSurZryt/KqAn5PRk Eyyo8guMPqDNwPAFnZOFFVTciCpkpf1o4/G57u4ncm3P/F90viD5H6zWFGd0bitWdOjj Oyug== 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=qGnQnh9pSjdWkaRcOQSlf8jt8zh/2L9nHuzvcwoIkUM=; b=XFDrvdprExeHQ9JHsPuSjnKSYgB4FrOuKeM1dwD9OGbJWMBfqHoHhI7q9ISxLsw653 6mfEDfgq1sCgEcgmUi+e5AKigjgbusRlsqju5rvVB7frSTLgADW60PdhH+57NawdIGoZ ebHSb65nLKccDcDVFZmqQ5jXp5vEdLhfE0rFnR2rXQE9qEBXPpT15oj3KqP7TcEoI+A0 fjFFTEvuMaE5+E0QcZHRn9BpX9U6Q/UnGhyuzQlpUGIR5eOjEo/NJeIoBM5jwwCCWg0V v3jDeqzr1/53iNJFUBSmaDakWKrsL8QI8VOX00J7GeElh7Mz1LGB4BUGbWXw4xCIwrJt eGYA== X-Gm-Message-State: ABuFfoi/lccf30qsfbUulctbxScg/so1ITQvTRneWMjQ1tqbwj4B64QX XYmB410TjWfngrBZMJziGiIbjxzJ X-Received: by 2002:a17:902:e201:: with SMTP id ce1-v6mr43114482plb.47.1540210093937; Mon, 22 Oct 2018 05:08:13 -0700 (PDT) Received: from localhost.localdomain ([2001:268:c0a5:1904:c698:f9ce:cdd:454c]) by smtp.gmail.com with ESMTPSA id m19-v6sm10553986pgv.93.2018.10.22.05.08.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 05:08:11 -0700 (PDT) From: William Breathitt Gray To: linus.walleij@linaro.org Cc: linux@rasmusvillemoes.dk, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH 0/6] Mask read inputs for get_multiple callbacks Date: Mon, 22 Oct 2018 21:08:07 +0900 Message-Id: X-Mailer: git-send-email 2.19.1 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 The implementation for several drivers' get_multiple callbacks return additional input states that were not requested by the mask passed in. Although the current caller in the kernel does not care, it would be prudent to ensure the behavior of the get_multiple implementations is to return exactly the requested input states and not more. This patchset ensures such behavior by applying a final mask on the read inputs before setting the bits array. William Breathitt Gray (6): gpio: 104-dio-48e: Mask read inputs for get_multiple gpio: 104-idi-48e: Mask the read inputs for get_multiple gpio: gpio-mm: Mask read inputs for get_multiple gpio: ws16c48: Mask read inputs for get_multiple gpio: pci-idio-16: Mask read inputs for get_multiple gpio: pcie-idio-24: Mask read inputs for get_multiple drivers/gpio/gpio-104-dio-48e.c | 2 +- drivers/gpio/gpio-104-idi-48.c | 2 +- drivers/gpio/gpio-gpio-mm.c | 2 +- drivers/gpio/gpio-pci-idio-16.c | 2 +- drivers/gpio/gpio-pcie-idio-24.c | 2 +- drivers/gpio/gpio-ws16c48.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- 2.19.1