Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp430404imm; Wed, 26 Sep 2018 00:51:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV63N0VVMikV4c+p7oJ7Nxwyc2nuHp290HJlaT1PiDRxQ07TvjyGiosp7q4KlOF88wCSU1IMp X-Received: by 2002:a17:902:47:: with SMTP id 65-v6mr4623829pla.293.1537948290746; Wed, 26 Sep 2018 00:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537948290; cv=none; d=google.com; s=arc-20160816; b=I/eq8cBDwMLowQ2iKKe4mqEFSAuMstRZYBSgL/sBbYDlM1pguS80BKPHJPsaGq0zwS 0rkIeoO3fKkmUsD15nLiqVmfrIuR2osKXEHYLrA0x1bIMi+HBOBqX/JkvMIz3Xg5sJD0 KvXxkmgOwX/InmLGS7zPgLPFgepk0YltGblIA2ymFsGuC/yGmCT7AQtbPeq2+yvwGaxt W7HBLByznqOQNIgNGbB1WQvvnTfK1AICy1EIA1LTRdl2NBn+10Hl9NM3MbBjpljC1PRB riV5Ucw2nCuE1QGS9AYhMbOlP/rxqfO9VFq8cBwz10Z0cGgwN9Zdaqc8SI4nXasz6K5+ 7v3w== 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=tFu77F5sNY9c5BHkp7PR18fKHjrrsUk9CHFMf64NtTE=; b=lIFc/c7CCbAEWLSQjbgVVmynSAo/YGiB0WDsUk3SMH63w9AIfg//E0zxOaPxVmTtTm j3cS52YTdV4IDvcLuUAdenQsNX1lv7YpurOV5zOBGHAnZorXRD0T+hiblxIXbLTM5Go0 HijZKOg8rpDFWAWH8FABq29sqbD69E6fAPLUiZMbaND52V31gueSHWqqovuCEiTBO0VF K3G64N26PF33ujhe35v/azDtE7uddyHKbP45JkFZxYwJ2WgyR4thKCsndr3GEY7w6Jtw WvoR9hxZfm1sT1dx0f/As7TWwI8mwk7ubXy/f4i8KxFi/hXGNfGGG5vy4Xx9px7RYhIN Qryg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F3ft6dmC; 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 j4-v6si4817915pga.152.2018.09.26.00.51.15; Wed, 26 Sep 2018 00:51:30 -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=F3ft6dmC; 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 S1727433AbeIZOCI (ORCPT + 99 others); Wed, 26 Sep 2018 10:02:08 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:35178 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbeIZOCH (ORCPT ); Wed, 26 Sep 2018 10:02:07 -0400 Received: by mail-it1-f194.google.com with SMTP id 139-v6so1645132itf.0 for ; Wed, 26 Sep 2018 00:50:29 -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=tFu77F5sNY9c5BHkp7PR18fKHjrrsUk9CHFMf64NtTE=; b=F3ft6dmCUhNoc/C6ZbjNe+Hwi1orjhu6z/3reg2h+EKDH8Im3tlOSN1kyVZgyMQPyJ WKPNTCa99l9KSdqo4oE92t9YrGpWsUvjeazeyexcQG31lO6go4VvgjVt1Oi1cY8cgQrC TSt/+4WZ3bi4uvYNCGB3//U0XpwL2/gXjxr0E= 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=tFu77F5sNY9c5BHkp7PR18fKHjrrsUk9CHFMf64NtTE=; b=onnQjs0iqieh6ojnq4ZWsCCFz5KVGk0uA8EbFUuyhjC9QevGlK084NqEKQYmmiG3lc LUYnJ6TykCju/TlGvW62kB+lULq9xKkQMM+eLEBir9ghb1mOZ6P5Dp/anG/zpLW0ex6C csnJdYAh8j6CjDn49jjNPEz3U576HQMaADa0xIOlZA4ELz/bHLUCetJK+LncnOjHlNZg pyUBaLz4eNEvb4jH18p3ck9Fp8/2fQc7es2kumdC9YcwclK+fC2aD8XT5IATo7rxgfYD KXQUqdT+3DVooG+jQ7Q2GBWABKs2TGvMO2L5CuyAU9VqsGo6YBQEZNnD12nPlMSDPTuu Ua7g== X-Gm-Message-State: ABuFfog9wH5wZ5/s1llSVSUn6FNLjVWWBfeZdH9yHqqmnOtsW+pTaSwS L0wTHCRXMMftwjhs5AxiuduRfZ/QYJ93yneigamCyg== X-Received: by 2002:a02:5916:: with SMTP id p22-v6mr4294407jab.113.1537948229627; Wed, 26 Sep 2018 00:50:29 -0700 (PDT) MIME-Version: 1.0 References: <20180925192433.1377-1-jmkrzyszt@gmail.com> In-Reply-To: <20180925192433.1377-1-jmkrzyszt@gmail.com> From: Linus Walleij Date: Wed, 26 Sep 2018 09:50:18 +0200 Message-ID: Subject: Re: [PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap To: Janusz Krzysztofik , Ulf Hansson Cc: linux-mmc , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Marek Szyprowski , Krzysztof Kozlowski , linux-samsung-soc 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 Tue, Sep 25, 2018 at 9:23 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 updated code of > mmc_pwrseq_simple_set_gpios_value() incorrectly uses 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, boot hanging caused by incorrectly handled MMC device > has been observed. > > As a side effect of that incorrect interpreation of the 'value' > argument, wrong assumption is taken about the 'values' bitmap size > never exceding the number of bits of the 'value' argument type. > > Fix it. > > Reported-by: Marek Szyprowski > Signed-off-by: Janusz Krzysztofik Nice! Provided this works, Ulf can I have your ACK so I can queue this with the rest of the gpio array rework in the GPIO tree? Yours, Linus Walleij