Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3991339imm; Mon, 15 Oct 2018 07:28:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV617rIbLPShE+6SEUKhloumpjc4HAhZ6Vx2ut6frfupcKdi5FZO3Dnw0zTBttjOGg9VJW6ic X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr17509344plg.108.1539613691873; Mon, 15 Oct 2018 07:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539613691; cv=none; d=google.com; s=arc-20160816; b=Vlhi9XxJKa82laQZ3UCxyQjY4b5/LwKSM7lr8TRThK5P/QeR/hD2y0EWZTQSEWN7Tp 9eApedhzbLrVrCBeriAowpN72PCfVgQukuVojnD6VV+MMZYOBXySYueGAbdF9DfdXVf+ Jy5HB3iEXsbL6MoOQa7IdTmozqwSL9eT3ncNUNT1l1kHDU5c0AHW6YYrRGwDI775FZgk 7SWHuFLZ7Rnah4fKcdyIeIYjBLrSn7Ih/LPSBwfyF536JSwSgh2fPto2dJni+YXyU/Rt r5XvSr21QRC3NLfHiuDHKVK1Y6r+mw5B8O+tHMjvlpd/iYIsi0UsEouoGyzX28iSjjrP aTEg== 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=LfddvKoGgUO3/lAd4OGoNcdxRS2hnNj3Nk48LH4Xv5w=; b=MGn6wbBhI0mesJ8HNAA82uRZo+dapEx/Vr+bdsMME1+rsCT/R7MPKCB6gqCf6wAl4v RraTmodYjmesRxWax7au3xrRL/JAV1fwDCLd4ZBFAcpV8Qc7SFW2SejrT3oktK8DtBAY CEKbh1e2+qKxWPNH/NejF69cLMwm+NElAwER9izFKHSn7dUPNTHhc5Ms8Qy1bu1/SjRv vGODLhlfrWEN1h/GOhHz2IYhtVG6AeKrh+yuL9bx2zFmNAdEz1VBCr3Eiad1RrqI6L8t F6XdGFBb9lb7ePvbPEKZyDCVn4hrjEI449lI6SF5MHSbNKgYTc8FrSxtRDKpj9GiGweV Ltog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PSRD+GZo; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19-v6si10974130pll.286.2018.10.15.07.27.56; Mon, 15 Oct 2018 07:28:11 -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=@linaro.org header.s=google header.b=PSRD+GZo; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbeJOWMy (ORCPT + 99 others); Mon, 15 Oct 2018 18:12:54 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:36891 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726727AbeJOWMy (ORCPT ); Mon, 15 Oct 2018 18:12:54 -0400 Received: by mail-it1-f194.google.com with SMTP id e74-v6so27935735ita.2 for ; Mon, 15 Oct 2018 07:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LfddvKoGgUO3/lAd4OGoNcdxRS2hnNj3Nk48LH4Xv5w=; b=PSRD+GZoOicTy86en3epiE390tyCkTriBsXPpyf/nt69WE+8+nw2ePa3kxZU7hsa5H l126ybSDgJhh8hYmTt+a/Bjby0QAH1+t0SGGB7lTr5Hvi33CxcL/U7SW0kVv7zLsABr7 cZt8bqiNcCM8HlQQl+5fZaiyd2EHTHpGXk3G8= 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=LfddvKoGgUO3/lAd4OGoNcdxRS2hnNj3Nk48LH4Xv5w=; b=H/25ZoVxEa7QiOidVevB74bKtdAxHSGllE2b0gBMP0YmU58e9TU1cndKIUaTiKKot9 +b+KXj5HeLRp2XxLJHZIghxMSIcMsoNdVfjSevRi/d7obexLtzEqHLpxzPZkW6rkARs8 2m0kYIF5THaPY2QwvGH87ZNZh1VP5ENvM11HctCQ2bUb5BYbamGMKS5XPnRZzz4S/j4L 9H4ZGzLbBTwHT7Bb1j5EJEq2HHTiU5EZseDUepMZOSHR3zHrEfxZwNyoakhEBTQ8K35S YDHZGtPmLbzXwcLD2eCSav03WScV8doK1QG3aKNC7+ukDtckKGyznbLvkaslpUNYpxSP iz8g== X-Gm-Message-State: ABuFfogtQah4pxcP6wmwQD8NEWGWtP1DRCyLwlqU155MJslLDK9jmikW CVQg428XMx6mN+OZP2hCSI+xVSnUXqLLpwEx9Ct4GQ== X-Received: by 2002:a02:7789:: with SMTP id g131-v6mr13507174jac.66.1539613643206; Mon, 15 Oct 2018 07:27:23 -0700 (PDT) MIME-Version: 1.0 References: <20180925192433.1377-1-jmkrzyszt@gmail.com> <20181012190901.1243-1-jmkrzyszt@gmail.com> In-Reply-To: <20181012190901.1243-1-jmkrzyszt@gmail.com> From: Linus Walleij Date: Mon, 15 Oct 2018 16:27:10 +0200 Message-ID: Subject: Re: [RFT PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap To: Janusz Krzysztofik Cc: Ulf Hansson , Marek Szyprowski , Krzysztof Kozlowski , linux-mmc , "open list:GPIO SUBSYSTEM" , linux-samsung-soc , "linux-kernel@vger.kernel.org" , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Linux ARM , Kukjin Kim , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , ext Tony Lindgren , Enric Balletbo i Serra , Javier Martinez Canillas , Linux-OMAP , =?UTF-8?Q?Heiko_St=C3=BCbner?= , "open list:ARM/Rockchip SoC..." , Carlo Caione , Kevin Hilman , "open list:ARM/Amlogic Meson..." 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 Fri, Oct 12, 2018 at 9:07 PM Janusz Krzysztofik wrote: > Commit b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to > get/set array") changed the way GPIO values are passed to > gpiod_get/set_array_value() and friends. The new code introduced into > mmc_pwrseq_simple_set_gpios_value() incorrectly interpretes the 'value' > argument as a bitmap of GPIO values and assigns it directly to the > 'values' bitmap variable passed to gpiod_set_array_value_cansleep() > instead of filling that bitmap with bits equal to the 'value' argument. > As a result, only member 0 of the array is handled correctly. > > Moreover, wrong assumption is taken about the 'values' bitmap size not > exceding the number of bits of the 'value' argument type. > > Fix it. > > Signed-off-by: Janusz Krzysztofik Patch applied with Ulf's and Marek's tags! Yours, Linus Walleij