Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp577773pxb; Mon, 8 Nov 2021 19:00:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLJX9xruAelFFu4vyyJ5t+K6ONumVsHckSkPoQHQua3mfpwCgEPro9HPvZE5pKcAJb887E X-Received: by 2002:a92:dd08:: with SMTP id n8mr2833167ilm.227.1636426805265; Mon, 08 Nov 2021 19:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636426805; cv=none; d=google.com; s=arc-20160816; b=pB0wAF3RDvRbrZPQUErkGz3+OxyGGin40trRAcK/LcEixuJRajTzNxCEjcG4+OcjHL Bi75wHaMjbWb+rySZX897TRrV4ScvVgmBJT5Ct9PgAcRFqvYTcvPvhzmBI4iyUCqWWEU bJVPhkuUgbxIrvGSIxch7uR/rrlCv/gJdxAc4uO0R8i8DVwzqOUeRviFn4tdwuLenONl fihje/MnQuyOM2OrEkiCQ6e10eCGhlfsuWF346hAC0U2Gfj3uVrkNlFIHj5K61FxixAB mzTuMn/Uy4IFMiafX5Yx7iTenlo6TdhVLsLAOoY/UtgUCMwhcr0sZSPmrFkE2StUPMlA Jo1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Lwcw4/EZ9AKLQH83sptrU3+TxAeQKvOd0MiqNfqRINE=; b=YCbbamTmpSd4CZocSjyupypjdo4bxoObYI2f0y+QHBWAWeM1Zuc1j1G2hNKScSwBfM 7JSGEJHYEeba8XsL/yB7mdCYCAk/NpJPhRuQILxj3fjfnfnn7lD65/neHcuiK/cO7gDY 90M5Z4sprerfYYYP1By9W1m1Mo+sg+9/+fTz8B/S+SeNX/YpTSYHbX32YCQ1VMG5eFRU odfl0DOa3BYo5O9h1uT33p5R7LgLL5sqiaoEdCGsMYi3PrsatdsRH20JHLeCtj6E46U6 KUf+qerDtIK1UCbd3XqzZQdu8+Gg4awPbJhWPqmXeKzVZYKg4KkK+XIq2BOEwCTbesT7 AFsw== 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 m14si36693661jam.86.2021.11.08.18.59.51; Mon, 08 Nov 2021 19:00:05 -0800 (PST) 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 S237934AbhKHTyc (ORCPT + 99 others); Mon, 8 Nov 2021 14:54:32 -0500 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:53302 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237891AbhKHTyb (ORCPT ); Mon, 8 Nov 2021 14:54:31 -0500 Received: from [192.168.1.18] ([86.243.171.122]) by smtp.orange.fr with ESMTPA id kAgBmHCd3OvR0kAgBmrd8n; Mon, 08 Nov 2021 20:51:45 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Mon, 08 Nov 2021 20:51:45 +0100 X-ME-IP: 86.243.171.122 Subject: Re: [PATCH] PCI: brcmstb: Declare a bitmap as a bitmap, not as a plain 'unsigned long' To: Florian Fainelli , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= Cc: nsaenz@kernel.org, jim2101024@gmail.com, bcm-kernel-feedback-list@broadcom.com, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, 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: <4d556ac3-b936-b99c-5a50-9add8607047d@gmail.com> From: Christophe JAILLET Message-ID: <4997ef3c-5867-7ce0-73a2-f4381cf0879b@wanadoo.fr> Date: Mon, 8 Nov 2021 20:51:43 +0100 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: <4d556ac3-b936-b99c-5a50-9add8607047d@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 08/11/2021 à 17:28, Florian Fainelli a écrit : > > > On 11/7/2021 5:34 PM, Krzysztof Wilczyński wrote: >> Hi Christophe! >> >> [...] >>> This bitmap can be BRCM_INT_PCI_MSI_LEGACY_NR or BRCM_INT_PCI_MSI_NR >>> long. >> >> Ahh.  OK.  Given this an option would be to: do nothing (keep current >> status quo); allocate memory dynamically passing the "msi->nr" after it >> has been set accordingly; use BRCM_INT_PCI_MSI_NR and waste a little bit >> of space. >> >> Perhaps moving to using the DECLARE_BITMAP() would be fine in this case >> too, at least to match style of other drivers more closely. >> >> Jim, Florian and Lorenzo - is this something that would be OK with you, >> or you would rather keep things as they were? > > I would be tempted to leave the code as-is, but if we do we are probably > bound to seeing patches like Christophe's in the future to address the Even if I don't find this report in the Coverity database, it should from around April 2018. So, if you have not already received several patches for that, I doubt that you will receive many in the future. My own feeling is that using a long (and not a long *) as a bitmap, and accessing it with &long may look spurious to a reader. That said, it works. So, I let you decide if the patch is of any use. Should I need to tweak or resend it, let me know. CJ > problem, unless we place a coverity specific comment in the source tree, > which is probably frowned upon. > > The addition of the BUILD_BUG_ON() is a good addition though.