Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp579763ybe; Thu, 5 Sep 2019 02:35:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBaqvsAQOjhJ3L3UCAr9LAFSzDKd3PqJeDOOw+ztCFlgUjkpwZ/dcNuF9mavQotI40VSua X-Received: by 2002:a62:2ec7:: with SMTP id u190mr2667002pfu.121.1567676119549; Thu, 05 Sep 2019 02:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567676119; cv=none; d=google.com; s=arc-20160816; b=ljwd14hMAWrT32CPIUywzU8JbiWyo+ad5cyUPL2iwKnAE2BrAum9WVsFQUJtiu5Trm dFdGmCuhWLsZNlgtuchaxhDNLnTu1q155e2kflQEmQJKN7injZrNgF5x1+d/W9bK03Nv d/c6JmFKY1Rov9p7dyV1XzovxBsSCnX9Q7cYUiHpiA9d1pOkQHqRVu9HrjyBQHwdRZIy /kz0UtN7Tf9iRHsJYuyT/KKFplItE/drIlPaY2gIaSpHyE6rr4K5q29EF+KTETTS2DUo p0w6ooHUC10TSHnfwvOn7QH1UJHnbrc60FjLcBWSsLjucVcVLjbrfpKDSp8ObJ09gGHu aVeg== 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=p4cc3HD6wCgRlnUtcn0OOHFmBZxcsFw0lbNwPOQXaMs=; b=O1iEQLY12cN7zZGEUXVnwaFbp9XZa3IQ6meKofzjJpZTGOKwHiikvUFszb7OnzN0Tb 8+ux42CDBWPQ4SWDiUb0UkRcV8MnfDIhgqcbPi3TR0r+/6naivAjkB+IGSjqbSshQmYg 7K5ep1ICjSAT6PCRdUk0pjEw8GSjWespI07vTDI5NTz5W0ZxRbW6qLpSPm4FBdKXeznG SkCCcUroinp9NDMFfG+rDRnAGpHMvOQ5Nwk0X5XQxqJXsmXkCnMFm5K2+APLFnvgOXZ0 rmb529CSo1lGqAU1pQrGh2CW2XZw3/y4AR0/FDfV0Gh2bOwTLqKrQLk3CrwN4wCpKoof AZ3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ldqIJr7r; 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 2si1364438pgl.179.2019.09.05.02.35.02; Thu, 05 Sep 2019 02:35:19 -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=ldqIJr7r; 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 S1732410AbfIEII0 (ORCPT + 99 others); Thu, 5 Sep 2019 04:08:26 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37773 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730809AbfIEII0 (ORCPT ); Thu, 5 Sep 2019 04:08:26 -0400 Received: by mail-pl1-f195.google.com with SMTP id b10so922750plr.4; Thu, 05 Sep 2019 01:08:26 -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=p4cc3HD6wCgRlnUtcn0OOHFmBZxcsFw0lbNwPOQXaMs=; b=ldqIJr7rYiw3PfQqdQzuOi7dClRQkPVHQ78j0B22mJIViZA3bBPXpqOgqQfRYw477s HSy1oDmzKI7o2tp87ZoXVsuCMMg1FTgRrNOA125vjse2m5crWv6rqwXnRW/56VJ3R5Gl 5lbkaq+trdJvu3B3FD95traiLrl5n0Frg1kDdyfgETxTIwvuH7fJ3Xbi+9rw6I0LpPyh 9dEC67LHeKADIOu3uUCU5Ja1B30P0AB6ewmQ72l5j0LBBBQ7bK0tBlz8PBniTjaLAE0E RQEM8MjW7Get5PgLg3Azvc4wbNxm1078ev2AKbDiNFD7yruPq+HkHQUu0Q7SgZ/te7KX y1DQ== 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=p4cc3HD6wCgRlnUtcn0OOHFmBZxcsFw0lbNwPOQXaMs=; b=EYkkE0Owejf6lNjiB9gQCxhtZgMJpWkTugTEJZOZJ+psCFQCEwQIgfs57LUIvPnYba ALZ0Cz50FqZYnHBdEHXMvUOkODG+TQEeHrKQBaCQC841myb4h3I9QHtYzCIeRmwvjNip GJ4q1SxzBbyKSWWqecZCUmsjwFj0/ZTmHpvCsibUKDjgD+JHIxQikDkWtQoGL2bsXtp8 2LKDbDF36lkUnawkqmoWSfwM688CDlfFaWAV4lvYZaE6NKL/zbO4aM1QDTo6fBlYxqz4 HPIcjh2sagwumjqUZt+sbU+7t8iQ0PP4YhiclEEx6tRIHREi5Yv56WR8DkGXVkGzUHxE XMdg== X-Gm-Message-State: APjAAAXIqN4OTT2Xo+Ue6qNUMJGhjIrA/TEXbQnyRUV52cgD8LcMZ0vR UYc8LAyp4HAeXlyilpD3Kgi/AhX1LC/r71xKTKI= X-Received: by 2002:a17:902:9348:: with SMTP id g8mr2103599plp.18.1567670905658; Thu, 05 Sep 2019 01:08:25 -0700 (PDT) MIME-Version: 1.0 References: <20190904061245.30770-1-rashmica.g@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 5 Sep 2019 11:08:13 +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 Thu, Sep 5, 2019 at 2:17 AM Rashmica Gupta wrote: > On Wed, 2019-09-04 at 19:27 +0300, Andy Shevchenko wrote: > > On Wed, Sep 4, 2019 at 9:14 AM Rashmica Gupta > > wrote: > > > - banks = gpio->config->nr_gpios >> 5; > > > + banks = (gpio->config->nr_gpios >> 5) + 1; > > > > Shouldn't be rather DIV_ROUND_UP(nr_gpios, sizeof(u32)) ? > > I agree that DIV_ROUND_UP is the right thing to use here, but wouldn't > it be DIV_ROUND_UP(nr_gpios, 32)? Right. Either this or BITS_PER_TYPE(u32). > > > gpio->dcache = devm_kcalloc(&pdev->dev, > > > banks, sizeof(u32), > > > GFP_KERNEL); -- With Best Regards, Andy Shevchenko