From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC663C433F5 for ; Mon, 8 Nov 2021 23:44:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9897960E54 for ; Mon, 8 Nov 2021 23:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240806AbhKHXrm (ORCPT ); Mon, 8 Nov 2021 18:47:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbhKHXrk (ORCPT ); Mon, 8 Nov 2021 18:47:40 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC37BC061570; Mon, 8 Nov 2021 15:44:55 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id 127so17606424pfu.1; Mon, 08 Nov 2021 15:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OHXQVVugqLEZabs4XAPu6SxuojvcV+gl3GjwwPy2W6U=; b=GgP3yX+2RJ0qVe/n8jcElv+We0+LJBP1sfm8YckQ5tdrUWzNs30Tm1dCOfuuqF0aG2 f5+1C/Gojs9C8EywY/XJ4Ffak+4Nd12FjylHL20kfId99LoumkL/Lnv4+fK12HzKda3V H6qoCRYpjGOeIt7+IJJzmWLKm7aERtRuJwAEekn/IsIdbaeR9x7tRZ8BMACDrrq0wZIb q+IPlgyQGPtbbxHdnveAOFGEzQn7Z4NJMvxZ/9mP7tcltN4PuAJHAD2F0UM0kZhQvo6U bZ3N4JR44V0rkL8Ogza9eYCB9QfSowGRK/7+56nuZpM7sgxyF668tisbyQ+WgB3Fz0YW 6SLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OHXQVVugqLEZabs4XAPu6SxuojvcV+gl3GjwwPy2W6U=; b=I/3t6nFRd1pzdenXpUJdXwTDatUEXX4Bl396+YvKqIhdz8yB0x0d31wwWBuDmV9tj2 Ej4UMqfCOi3I0rwBnztH2ILIkxc73ZjnpQ/5U2ujyRvoKyOy0MUBEhhMsHDDyPDzTxd8 mdfjl6Yi3lFuJrFYSkLjROL9ycqcjAn1PpMmtu8zXYSLsCWwpPPFnFRyzrMZwWyGWkCB GCMJwDDRn34x6fkAInAyWLYtakSj7sxCFEu+x16TTaMUC8IC17rawCAAIiY/eNPc23Rb YFDb7r9LsZjvpDujfiJOWz28Bsms74YKJKHGz1Z/6VMw6Om6IXm10hQ87Y9M3HYP5/Br llGw== X-Gm-Message-State: AOAM530W79/itIQVxMpATSp0ooJa3M1/quPq+qEg5P7z6jKKmzxkG7Yp NFiTgorc4wygjowx+s1shkJoWJzMgRw= X-Google-Smtp-Source: ABdhPJw4zjY7/8GRXtqYNtuqqQavoHjrurClmY1Xkr6EoPyJ2LZxsQfC4N+o7ldUWxOrrnwEu3FY8A== X-Received: by 2002:a63:455f:: with SMTP id u31mr2572185pgk.206.1636415095093; Mon, 08 Nov 2021 15:44:55 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id p14sm394627pjb.9.2021.11.08.15.44.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 15:44:54 -0800 (PST) Subject: Re: [PATCH] PCI: brcmstb: Declare a bitmap as a bitmap, not as a plain 'unsigned long' To: Christophe JAILLET , nsaenz@kernel.org, jim2101024@gmail.com, bcm-kernel-feedback-list@broadcom.com, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: From: Florian Fainelli Message-ID: Date: Mon, 8 Nov 2021 15:44:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/21 1:32 AM, Christophe JAILLET wrote: > The 'used' field of 'struct brcm_msi' is used as a bitmap. So it should > be declared as so (i.e. unsigned long *). > > This fixes an harmless Coverity warning about array vs singleton usage. > > This bitmap can be BRCM_INT_PCI_MSI_LEGACY_NR or BRCM_INT_PCI_MSI_NR long. > So, while at it, document it, should it help someone in the future. > > Addresses-Coverity: "Out-of-bounds access (ARRAY_VS_SINGLETON)" > Suggested-by: Krzysztof Wilczynski > Signed-off-by: Christophe JAILLET Reviewed-by: Florian Fainelli -- Florian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1444C433F5 for ; Mon, 8 Nov 2021 23:46:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E2BD610A5 for ; Mon, 8 Nov 2021 23:46:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9E2BD610A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=m0gQgrd9GOsGXQxnS03aPsOXes+O+b7whPm7Khd/wGI=; b=4u8LnTlSxmgH0NV37yMmqwiFZ0 oYT6i1Pw3IILTYcBtgELtuILtf7d8CaSWFZas81jPNXNq8UqQUMTgK9jMCdHnA9eft6tdqdPiSp0S zzb6vJNzJ4iVgD3LVwJZfuqXpGQoO9nUJATm6x8voTS/HYO5/gKq/ClBKD9p39kKwgvoLYfX0xYzh yucu3hkz1oQPdnXHI2qSh7sPGAARVZ3ybU+1cTWgcYaXCicI0liUNen8M3U4cdsuNbzFb6qhzqRt8 AW6HjBSAlfQHwKB2lJLVCnyI/cP1B/Jpsntw2dS2KYvU5y36LNhpYxCrJNWnwn8qVerJ4C/lRgH18 zoaisz4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkEJu-0000h7-Eb; Mon, 08 Nov 2021 23:44:58 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkEJr-0000gO-Rc; Mon, 08 Nov 2021 23:44:57 +0000 Received: by mail-pf1-x42a.google.com with SMTP id z6so1849505pfe.7; Mon, 08 Nov 2021 15:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OHXQVVugqLEZabs4XAPu6SxuojvcV+gl3GjwwPy2W6U=; b=GgP3yX+2RJ0qVe/n8jcElv+We0+LJBP1sfm8YckQ5tdrUWzNs30Tm1dCOfuuqF0aG2 f5+1C/Gojs9C8EywY/XJ4Ffak+4Nd12FjylHL20kfId99LoumkL/Lnv4+fK12HzKda3V H6qoCRYpjGOeIt7+IJJzmWLKm7aERtRuJwAEekn/IsIdbaeR9x7tRZ8BMACDrrq0wZIb q+IPlgyQGPtbbxHdnveAOFGEzQn7Z4NJMvxZ/9mP7tcltN4PuAJHAD2F0UM0kZhQvo6U bZ3N4JR44V0rkL8Ogza9eYCB9QfSowGRK/7+56nuZpM7sgxyF668tisbyQ+WgB3Fz0YW 6SLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OHXQVVugqLEZabs4XAPu6SxuojvcV+gl3GjwwPy2W6U=; b=wNgD0cEtXlVI6OrdZ3yKFaE+cySuwpO7UNnd52sRZnIIFJIOLhdFSR+a0qH5DfB6qN YII2i0bPX7gODZi6Yatz2fOAofDjQUhc1ymfTMaukPpKMPeoVpVpbM9NsCxG/fFDHR4T YH0vfo6h+B2CamF1KFIuESBgwaEEoDPCpZdWgVIBMeWA0lNoEiKaJ/a46Mb3PbkE9dqh /nAJuYos21IFKl/IBlBXe9FHkEsdCw30OFZxbNjW73a5VLrcENjf6kGabJVCy7Hwqo8M 0CV2Ug5aWt6jFlT5L1XNbzqXwT0BgaK3LSDMdq1cQyJB4a7R3Rlvpon9pgGiUmqeWOTf CQWA== X-Gm-Message-State: AOAM533lA1YsPnjvS0PObbtIS5D1I/MYyt3r96dLRI1kb3U3JJVEILNj QAD9WFlAhCFqUTdB2+7rzSk= X-Google-Smtp-Source: ABdhPJw4zjY7/8GRXtqYNtuqqQavoHjrurClmY1Xkr6EoPyJ2LZxsQfC4N+o7ldUWxOrrnwEu3FY8A== X-Received: by 2002:a63:455f:: with SMTP id u31mr2572185pgk.206.1636415095093; Mon, 08 Nov 2021 15:44:55 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id p14sm394627pjb.9.2021.11.08.15.44.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 15:44:54 -0800 (PST) Subject: Re: [PATCH] PCI: brcmstb: Declare a bitmap as a bitmap, not as a plain 'unsigned long' To: Christophe JAILLET , nsaenz@kernel.org, jim2101024@gmail.com, bcm-kernel-feedback-list@broadcom.com, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: From: Florian Fainelli Message-ID: Date: Mon, 8 Nov 2021 15:44:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_154455_947245_13FB5B05 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/7/21 1:32 AM, Christophe JAILLET wrote: > The 'used' field of 'struct brcm_msi' is used as a bitmap. So it should > be declared as so (i.e. unsigned long *). > > This fixes an harmless Coverity warning about array vs singleton usage. > > This bitmap can be BRCM_INT_PCI_MSI_LEGACY_NR or BRCM_INT_PCI_MSI_NR long. > So, while at it, document it, should it help someone in the future. > > Addresses-Coverity: "Out-of-bounds access (ARRAY_VS_SINGLETON)" > Suggested-by: Krzysztof Wilczynski > Signed-off-by: Christophe JAILLET Reviewed-by: Florian Fainelli -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel