Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2266647iof; Wed, 8 Jun 2022 00:55:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxl/ASR185hGuYVm8gSPLfdHoq1VQH5c4z6pmKt8NI/VEi7t1i53HW74T1VhOMKBx8f00D X-Received: by 2002:a65:6786:0:b0:3fc:e1c0:7bbc with SMTP id e6-20020a656786000000b003fce1c07bbcmr27549249pgr.65.1654674912064; Wed, 08 Jun 2022 00:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654674912; cv=none; d=google.com; s=arc-20160816; b=QwbzSgdGhxSlJ2gUX/OuoaU3rN4KPh6M6nVYWzkRc4qhQKbHX90XE/HzRcWWPt6sfS rjsA5v8can2MrFPNiafJk6C5/VmcR+vWkmo7gBPjMrJtUkbbXTuNO3F9Qdar9676Y5Ni vcWscnT4p65WXgRF0xJ0NLRP45KtdQ+p+uNRHaln+kDz6NB04EBIfgHEOO0gvdcyeEV1 XqJEAFZpGTsMgEV1cS6nooh0gx4gEdh+TcqaQVba2WG1OTT6+qzI87s0Wtx5sYPs8quf Wu6nfrOZN4PMB28H0d702TX05789Ze/hv1VjqWAmauSoxOgfw6UekSaWSP0OJFS/DTtU 1mmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+rZhFLxNgtjcqu4pxjkiCKc003PvBH7w/zCduOsWIsc=; b=vBt1aO9R1m701spj1oxrMKv1WPTcpYbBvXUM/5vUnQAOOeEbLD8ZSQQ//TeI2uksJj 2h7pTRlnDDYBj1Qcx5Qrj+8AZ+fEENNK143dBORuEyrGakl9ao+SQp0PkNPYcOGOKkVi EV7SdmifB4dPTn7iGYweh0jw4mfPiZkDk5shWpXSVL1QA+ICZyjQhhUX/5u7u+woCxae jWrUzvB6IathjJc9aLIAWsKp+J2gbj3br3LlzUzZDh8jN6Ei5hO72YqaDDAITXp0k1+W C9uwXM4qXk/lonvlps2ZEcD6HSjPAvIhKMk0INVF1fWHflbaolu5AEDuTQmgbazUsjlu LfdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mEGHg7PW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h6-20020aa786c6000000b0051927e618f7si24518724pfo.243.2022.06.08.00.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 00:55:12 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mEGHg7PW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D66CD1D9B4D; Wed, 8 Jun 2022 00:24:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349453AbiFGRut (ORCPT + 99 others); Tue, 7 Jun 2022 13:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347108AbiFGRd0 (ORCPT ); Tue, 7 Jun 2022 13:33:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 009EBFF589; Tue, 7 Jun 2022 10:30:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0530AB822B1; Tue, 7 Jun 2022 17:30:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57649C385A5; Tue, 7 Jun 2022 17:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623013; bh=cpjPFx3YXi+7fDXbtxcOmua1TOAOV77x3Tp9AjUhaRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEGHg7PWlMq2PMiRnYrH7/NfvsSPRfzMBMSEmxdRieFXnjZ6N1KUie+bxV4RdPT+x TdzIwrYpzZ1LD4NpkKnYtYKXj5/UgJQ236rzyB/gn6fhFsjWeFs4luTzeuEypda4wD 7a3xnIMmGjcGkOdgtWx5FfA+O/SuV0+tIQC2rPjw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 5.10 264/452] PCI: rockchip: Fix find_first_zero_bit() limit Date: Tue, 7 Jun 2022 19:02:01 +0200 Message-Id: <20220607164916.419843850@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 096950e230b8d83645c7cf408b9f399f58c08b96 ] The ep->ob_region_map bitmap is a long and it has BITS_PER_LONG bits. Link: https://lore.kernel.org/r/20220315065944.GB13572@kili Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller") Signed-off-by: Dan Carpenter Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-rockchip-ep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c index 7631dc3961c1..379cde59988c 100644 --- a/drivers/pci/controller/pcie-rockchip-ep.c +++ b/drivers/pci/controller/pcie-rockchip-ep.c @@ -264,8 +264,7 @@ static int rockchip_pcie_ep_map_addr(struct pci_epc *epc, u8 fn, struct rockchip_pcie *pcie = &ep->rockchip; u32 r; - r = find_first_zero_bit(&ep->ob_region_map, - sizeof(ep->ob_region_map) * BITS_PER_LONG); + r = find_first_zero_bit(&ep->ob_region_map, BITS_PER_LONG); /* * Region 0 is reserved for configuration space and shouldn't * be used elsewhere per TRM, so leave it out. -- 2.35.1