Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp120483ybe; Wed, 4 Sep 2019 16:20:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyl0MCn3CLcX0DV355jdI0gZ4JulXw80MT63X+YVgcExkfB6MIZLXQ/s4/EXhVgxfvXy7b9 X-Received: by 2002:a17:90a:a89:: with SMTP id 9mr698513pjw.126.1567639222972; Wed, 04 Sep 2019 16:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567639222; cv=none; d=google.com; s=arc-20160816; b=rAOb4iCZe3v41mOA6hBbjIB4uOC5pMPxoIA843Y6VEk4KQybYvLIKogpJv22pY0uhe 5A2ByAD2qiEbFa2LtBMvNXdQUMp3MGwT/bw1jNEuS9YM0MmybMBYxcVzt7qpn73R1Eeg YBOOxT+GHoBUcDnzx9H0j4uHu6WkXCtZf4402AG4vEyD7UeRzaTf03+n8VTYkMhjsq74 KXDDZ8+tTAIBdW5/+8FO9E6M+5dsHIlOKCIT7MjHa7davUX0dRWt+vI/cDkTGNoTnbpm tNRO4wiwmQ/Nbze1Km7BE1A1MzzBDdM1fvH5gD9iq3sGAuQRTAW2QvdGfKyxZk/1tuGC LlkA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=9R72raBBWXijV+vBxS2q3Hmwuxv9Ffre6Ti1aTb9Nhs=; b=HoE2hSZMwP9m+kWYCE8XNSnTnVZVbGm8GIfl1Jf96rU5k056DjRm5WXooSx5PUlxMK 3JPQF0wYQ+JrwLRTPmt5IDsVE0iiANwES7LzZYu9jVf8yvPOCk3hxxD3tqAlwfnQyfor pOTQVBQri4Li4R/MUtEtr2nBDrvgTesBwmOTq+4b4nAt5juTJeWMfBkWbRS4uebHA3t2 ZKehcnURgFH6OBnh8jJq7r5ZS0JlKknlUhVKQ4G7QmR4Sa3LdsJWaoH//T7UxhV4hbCb gxpSBLSTC1w3MtbcKlvhgn4dboXU6drQuDgfrBtnYXA7nCzHtBGBGm+gt5BDFhAeJuak +Cig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AKGsaHbL; 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 d7si135789pgv.86.2019.09.04.16.20.06; Wed, 04 Sep 2019 16:20:22 -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=AKGsaHbL; 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 S1730122AbfIDXRu (ORCPT + 99 others); Wed, 4 Sep 2019 19:17:50 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45453 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbfIDXRu (ORCPT ); Wed, 4 Sep 2019 19:17:50 -0400 Received: by mail-pg1-f194.google.com with SMTP id 4so259672pgm.12; Wed, 04 Sep 2019 16:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=9R72raBBWXijV+vBxS2q3Hmwuxv9Ffre6Ti1aTb9Nhs=; b=AKGsaHbLbruRWWZut5eEkFINbN1RAtp5Gc5P4ly1St6QoLFKbCCPMk1sCW6yIOJmU8 tgKoh4yl45sNzYiOglayAY5CL082kzY1Wz8BajqyKCYe1j0o1iBp/BhUdx4PkdtJovlo gddskujNDf7UReyFhrKEXjpli2ejZeidxVi5sNsASu+MTUwt9s+GokTa7o04VKCCSNdO iSW3KLaJcTPQwfTyiUfH3u2uJFmwy2eDCGEbwP3ASCSTqzfC6REQqGAEyEVeGHMcL673 sknyKtVLzla3A9W1v0ng4vS31x4w609YoumtFD6i0+aCcpwFyboKpck83kPrsJKNAGOV mJ5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=9R72raBBWXijV+vBxS2q3Hmwuxv9Ffre6Ti1aTb9Nhs=; b=CfVjE7QlJsGvOYnlGrWCPp91AsC2ztzncB1UALERYoLysJz8zfIw53XWseCHOWC4AS w9mLrVlYvD4DFaevkceqpzLgwdcnkQuZFBqY614qqm8b/1XxP++EUUoZQEx7wycIuizz MZ5muyU1SUJmqCjS0U1HS71IscevTG3GIpyxaK+Mt7FERgPTFTlpHu8bpg0J1PctMMN0 4AENZ2w6KTCu6mCZvpAsSDO6eHfqluqYy/8jayAW69PEcfXPFFs0kFk2PqRPdHNdFNyt 5hTlXYTbv9/xR3ea7YNgOdj+BX4ONn+rFnCQVd8sA1tstXZsCJ6uf0hwe+8K1xjmD7Uu nVKQ== X-Gm-Message-State: APjAAAWyubTOL1NFlI17XH4pZKb926dQPZ10LfhQh7wTfGQ65BhYn93u TX/O7eZ2vEQQ3RGEEIG+/EQ= X-Received: by 2002:a62:168e:: with SMTP id 136mr232320pfw.144.1567639069538; Wed, 04 Sep 2019 16:17:49 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.googlemail.com with ESMTPSA id r1sm177579pgv.70.2019.09.04.16.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 16:17:48 -0700 (PDT) Message-ID: Subject: Re: [PATCH 1/4] gpio/aspeed: Fix incorrect number of banks From: Rashmica Gupta To: Andy Shevchenko 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 Date: Thu, 05 Sep 2019 09:17:43 +1000 In-Reply-To: References: <20190904061245.30770-1-rashmica.g@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 19:27 +0300, Andy Shevchenko wrote: > 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)) ? I agree that DIV_ROUND_UP is the right thing to use here, but wouldn't it be DIV_ROUND_UP(nr_gpios, 32)? > > > gpio->dcache = devm_kcalloc(&pdev->dev, > > banks, sizeof(u32), > > GFP_KERNEL); > >