Re: sparc: bpf_jit: Move four assignments in bpf_jit_compile()

From: Julian Calaby
Date: Sun Sep 04 2016 - 03:19:48 EST


Hi Markus,

On Sun, Sep 4, 2016 at 5:07 PM, SF Markus Elfring
<elfring@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> I really wish he'd concentrate on the former rather than the latter.
>
> I am on the way for such a software development adventure.
> There are further improvement opportunities to consider besides the main route,
> aren't there?

You're missing the point here. Find something useful to change.

People are going through the kernel finding functions that should be
static for example - this is useful as it provides better
documentation for those functions (static == not used outside this
file) and fixes errors reported by GCC and static code checkers. Those
changes are useful.

Another useful change would be ensuring that every struct that has a
bool member is kzalloc'd instead of kmalloc'd as this eliminates a
possible source of undefined behaviour. (A bool is effectively a u8
with behaviour defined for when that value is 0 or 1, kmalloc'd memory
can have any data in it, therefore it's possible and likely that a
kmalloc'd struct with a bool member will end up with some value for
that member that isn't 0 or 1. kzalloc eliminates this possibility.)

Moving four assignments because you think they might improve stuff is
just annoying people.

>> He's not another Nick Krause.
>
> Are you going to remember me under an other nickname anyhow?

Nick Krause submitted patches that make yours look good. At least yours compile.

Thanks,

--
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/