Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp909131ybe; Wed, 4 Sep 2019 09:29:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIfQ0fbTKGbopMkxobu68GOU0zZ2uNUT11QfzeCAzMNgJ4gVtr0W4RUVuLQLXuoiPbsou9 X-Received: by 2002:a62:5ac1:: with SMTP id o184mr4866970pfb.67.1567614552470; Wed, 04 Sep 2019 09:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567614552; cv=none; d=google.com; s=arc-20160816; b=w2Bx/wWTmAESIz6tvwrw/8++sOkbn0ZLYb24ZIMQv+rdglsXrD32x0HVl3F0dNQtll YFxU7BJOdlJ3Mse1Rx2M2YecuXeiDBBNfFdW89ptXp81H+9wn08Y0S3smyPm1ipVHUOX fFD49G5GS+nWvsYY3h8Y/pOLZ4UNIAmBpEw4/19Hi5Vwa3xM1Xeh1B4S1SdsfGYi/YfC JTQSrETk1XvmqeoeyfBeem4LDw+syu+DCVxgGtwacy9nhCe8T3404T99MO+jyna+lgPD fucoYpu+DSA7hSUp+ZpDTiecl7Scu24Ji7ibVTq+UTrEf0dB3v53hgc/Xwv+ZKregdzj muyQ== 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=h04RkzjT3hXLTqVi3hxMYt7+XgkxZzlEb0BXvzdW1Iw=; b=Uoc0r+DqlHL9z7F5uxGoYqoYU4M4dH3e2PkNF0V2U2QBHJDbCIQXzpUAJznuO1hRjY +uv/gD5yVwkXyjs/evIAKjo1LlYGBDfJHmoYlFyLO9gZMwj7CuMkdqnOyMBIoRPqSvOp CmOeHCgwIEACEjOOMpBSPipusVMTYcg4FkOwlrG+bfpNiDJXKbFcX890fqEGLJEIEv0P Z9Pk67bqXezUnFwMsjh4YWphliyPA9iBwDx+roDi5WyKY/X0WNjXF+8i41kbTGZEn458 fUvOThgryw4efJCD6jBUcYZY4kH9TQiPxilV7qYv0V2u+30JL91Y5ozehyMkxIU0ABw3 BUqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u96W3i3h; 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 a23si7971732pls.252.2019.09.04.09.28.55; Wed, 04 Sep 2019 09:29:12 -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=u96W3i3h; 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 S1731792AbfIDQ1p (ORCPT + 99 others); Wed, 4 Sep 2019 12:27:45 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37668 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731466AbfIDQ1p (ORCPT ); Wed, 4 Sep 2019 12:27:45 -0400 Received: by mail-pg1-f196.google.com with SMTP id d1so11510512pgp.4; Wed, 04 Sep 2019 09:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h04RkzjT3hXLTqVi3hxMYt7+XgkxZzlEb0BXvzdW1Iw=; b=u96W3i3h8EyeOAeUHfKxUJeZZrPcR78dwH/TA9Q0gcEBy2fX0/RospEgR+NpW6qmL8 x7Cw14anhZMC/3swXtc5wbpMZ+zCJqv4YzAVxVQuTkU+2IspzSnhZM3Gv5klXmNda5mw wVF9asAXOiNpj3HEIMkNLKBdRy6DO8xyWZEufSISyBoqV0U9AFhOxjXiRaF3BcQWN0kq zWWkmevlB+++8fGIjUZFmXsFgLzRrXmjtPLiUiaPDrwTQ3LzcfaJ7vq2GqaVRy5rrt5u b4hUoaq7bsGZDSpHsgo2hT8e70WUzAVYai9e+pS1NGd+erk4+IDj3tcPJyGAyEfYLupO Z28g== 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=h04RkzjT3hXLTqVi3hxMYt7+XgkxZzlEb0BXvzdW1Iw=; b=R8Q+rky9+5LrBKssdJLVWb27mU5rjkGoPITDPc8u1ejqc9Cy8jEcXJI1cB957BlvnN KA+tV2Dw8azbpVyySdg3aJhDb8l5Pd6yQZ8lTpECRSE3+AxXeQcHL63pJdjYV0jUM0VR VWJLxmpcerR4Wksc89qGKlCcjg4fPwSOHOCvYicIbkiKkONxJMK9ZMI15h36RVDmxGB6 3DvMnGbfEIhkdSD3/FeMZa7fsdQViqO1mqD1tmUPMFenp9z+bGXumVZdoIYZI2l/fRrh lBLIEoSGlDvYmvW76QZCGWDPk3Yib0eDTOQ9Lpgn2uyxYqfHMC43JLhNvn4ERjQRxSXe xPSQ== X-Gm-Message-State: APjAAAV5E43VNKW7YG1jtkhMg2eZ1Z1c6OD2fp93GJXLGx2Qb0LETaR9 NIbjMB6lb1RjC9Tu3LS5MdmtoABKkPnnqyhUIPY= X-Received: by 2002:aa7:93a8:: with SMTP id x8mr14577315pff.151.1567614464501; Wed, 04 Sep 2019 09:27:44 -0700 (PDT) MIME-Version: 1.0 References: <20190904061245.30770-1-rashmica.g@gmail.com> In-Reply-To: <20190904061245.30770-1-rashmica.g@gmail.com> From: Andy Shevchenko Date: Wed, 4 Sep 2019 19:27:33 +0300 Message-ID: Subject: Re: [PATCH 1/4] gpio/aspeed: Fix incorrect number of banks To: Rashmica Gupta Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , linux-arm Mailing List , linux-aspeed@lists.ozlabs.org, Linux Kernel Mailing List , Joel Stanley , Andrew Jeffery 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 Wed, Sep 4, 2019 at 9:14 AM Rashmica Gupta wrote: > > Fixes: 361b79119a4b7 ('gpio: Add Aspeed driver') > > Signed-off-by: Rashmica Gupta > /* Allocate a cache of the output registers */ > - banks = gpio->config->nr_gpios >> 5; > + banks = (gpio->config->nr_gpios >> 5) + 1; Shouldn't be rather DIV_ROUND_UP(nr_gpios, sizeof(u32)) ? > gpio->dcache = devm_kcalloc(&pdev->dev, > banks, sizeof(u32), GFP_KERNEL); -- With Best Regards, Andy Shevchenko