Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp201530ybr; Fri, 22 May 2020 04:42:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy10bAWgxXL1gX11/8HWUf5BBUYDQXY8pFOefRMuzUxnimL54M5+O81f/+g/qvKHfIlGrUQ X-Received: by 2002:a05:6402:1c94:: with SMTP id cy20mr2576219edb.270.1590147720728; Fri, 22 May 2020 04:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590147720; cv=none; d=google.com; s=arc-20160816; b=ep96Y0cdVEoN6SAHXla1evl2r065ItF35gdv7mEbHcYBySkvtrmr1X0WbrI2Ian1u6 TTyCqs6rYSSSDrGaoWTax0x1kcfyVgC95NVCKRayoAqerMDn/ClZiUcqFPGi0WRFhE/G jlRQ+XJG1uE2QLDFBBBlGlk8w/2az1CgI4IWWA6mpi1Yv8BTmPwNiAnlqGpwS8fWPThC LYLJBNui5TMBon8nH8NbV0NhVF06tlsJhVv75qExjLJMdKescdoUS5FAP/vKK/xGFNu8 CQ3u/0cPmyH7incDOtgmzBsRrusBntJ5BmS4xHmGSSDFsf1Noz1jQK770nC31t2/hg24 /2dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+FAYpU2lW3qo6yaMnnYDchdA2k0Av1DEnOyCg60Jqa0=; b=J994gF3ehNp3FfYXpmMF7CA3cCyq0zu4diWgyxQz2qTShT70LXv3Es1Mcmf2cy0aa+ qRHnHyUARbzwqsUInySdUZQTWiLLS4GCCm12EqAw3GGnLG741gkMwK196VkskGPtSbuf w7gpff/cpCJJzeI66xqmB+mbw6kfeCybZHDcwI69b90uhm1ssnsB55f1jAbnjRjybeNI AFF7J8BCtEfP61adXbzzIOjBcf7YO/E0HjboJLgCR+gfJsBGaUc2vsEtxMEeDOUcaTJb 1YhCvTd43D8STPBPkYjhvJa3til9gBJztKNP8E10DgdRG3VdjPLq5aiqoyU30M2pHdzy U+xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec15si4730108ejb.286.2020.05.22.04.41.36; Fri, 22 May 2020 04:42:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729547AbgEVLhw (ORCPT + 99 others); Fri, 22 May 2020 07:37:52 -0400 Received: from foss.arm.com ([217.140.110.172]:33792 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728601AbgEVLhw (ORCPT ); Fri, 22 May 2020 07:37:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 008FA55D; Fri, 22 May 2020 04:37:52 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C15B53F305; Fri, 22 May 2020 04:37:50 -0700 (PDT) Date: Fri, 22 May 2020 12:37:48 +0100 From: Lorenzo Pieralisi To: Lad Prabhakar Cc: Kishon Vijay Abraham I , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar Subject: Re: [PATCH] PCI: endpoint: Fix epc windows allocation in pci_epc_multi_mem_init() Message-ID: <20200522113748.GC11785@e121166-lin.cambridge.arm.com> References: <1589901081-29948-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1589901081-29948-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 04:11:20PM +0100, Lad Prabhakar wrote: > Fix allocation of epc windows with the correct size, this also fix smatch > warning: > > drivers/pci/endpoint/pci-epc-mem.c:65 pci_epc_multi_mem_init() > warn: double check that we're allocating correct size: 4 vs 112 > > Fixes: ecbae87 ("PCI: endpoint: Add support to handle multiple base for mapping outbound memory") > Signed-off-by: Lad Prabhakar > Reported-by: kbuild test robot > Reported-by: Dan Carpenter > --- > drivers/pci/endpoint/pci-epc-mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Squashed in the original commit in pci/rcar, pushed out. Thanks, Lorenzo > diff --git a/drivers/pci/endpoint/pci-epc-mem.c b/drivers/pci/endpoint/pci-epc-mem.c > index 2325f74..80c46f3 100644 > --- a/drivers/pci/endpoint/pci-epc-mem.c > +++ b/drivers/pci/endpoint/pci-epc-mem.c > @@ -62,7 +62,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc, > if (!windows || !num_windows) > return -EINVAL; > > - epc->windows = kcalloc(num_windows, sizeof(*mem), GFP_KERNEL); > + epc->windows = kcalloc(num_windows, sizeof(*epc->windows), GFP_KERNEL); > if (!epc->windows) > return -ENOMEM; > > -- > 2.7.4 >