2005-03-08 23:17:01

by Bagalkote, Sreenivas

[permalink] [raw]
Subject: RE: [ANNOUNCE][PATCH 2.6.11 2/3] megaraid_sas: Announcing new mod ule for LSI Logic's SAS based MegaRAID controllers

>
>> +static int is_dma64;
>
>the fact that this is a global variable worries me.
>

Matt also has the same concern. I am pasting my response from my reply
to his comment:

I will make this an instance parameter if the idea to reduce as many
global variables as possible. But if the objection is because each adapter
may have different value for variable, then it is indeed a global value.
"is_dma64" - which is computed using the size of dma_addr_t - is telling
something about the kernel rather than the controller feature.

Thanks,
Sreenivas
LSI Logic Corporation


2005-03-09 08:06:50

by Arjan van de Ven

[permalink] [raw]
Subject: RE: [ANNOUNCE][PATCH 2.6.11 2/3] megaraid_sas: Announcing new mod ule for LSI Logic's SAS based MegaRAID controllers

On Tue, 2005-03-08 at 18:08 -0500, Bagalkote, Sreenivas wrote:
>
> I will make this an instance parameter if the idea to reduce as many
> global variables as possible. But if the objection is because each
> adapter
> may have different value for variable, then it is indeed a global
> value.
> "is_dma64" - which is computed using the size of dma_addr_t - is
> telling
> something about the kernel rather than the controller feature.
>

then having it as variable sounds really really wrong; the size of
dma_addr_t is a compile time property...
(and why do you care about it? you see high dma addresses when they come
in, right?)