[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4997ef3c-5867-7ce0-73a2-f4381cf0879b@wanadoo.fr>
Date: Mon, 8 Nov 2021 20:51:43 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Florian Fainelli <f.fainelli@...il.com>,
Krzysztof Wilczyński <kw@...ux.com>
Cc: nsaenz@...nel.org, jim2101024@...il.com,
bcm-kernel-feedback-list@...adcom.com, lorenzo.pieralisi@....com,
robh@...nel.org, bhelgaas@...gle.com,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] PCI: brcmstb: Declare a bitmap as a bitmap, not as a
plain 'unsigned long'
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.
Powered by blists - more mailing lists