[ofa-general] Re: [PATCH] RDMA/nes: Initialize limit_maxrdreqsz to 0
Roland Dreier
rdreier at cisco.com
Mon Nov 3 21:47:45 PST 2008
> Left out initialization from previous patch (commit
> 633693660045b3e46a63ed618eb38a54339fbcc0). Don't know how easy
> it would be to fix the previous patch.
In general, if I haven't asked Linus to pull a given patch yet, it's
easy to go back and amend it, and if I have asked him to pull, it's too
late to change things (we just add the fix later).
However, in this case:
> -static unsigned int limit_maxrdreqsz;
> +static unsigned int limit_maxrdreqsz = 0;
the "fix" is bogus -- unless I'm very confused, limit_maxrdreqsz is a
static variable which is already in BSS and hence initialized to zero.
And the kernel style is to leave off the superfluous initializer.
Running your patch through checkpatch.pl would have shown the clue
"ERROR: do not initialise statics to 0 or NULL" as well.
So I think the original patch is fine.
- R.
More information about the general
mailing list