Messages in this thread | | | From | Michal Nazarewicz <> | Subject | Re: [PATCH RESEND] crypto: make sure *blkcipher_walk_init properly initialises walk | Date | Mon, 11 Nov 2013 12:26:38 +0100 |
| |
On Mon, Nov 11 2013, Herbert Xu <herbert@gondor.apana.org.au> wrote: > Nack. The field flags is used as a bit-field and all bits other > than those initialised that you see are used internally by the > walker function and will be initialised on demand. > > Please do not just rely on tools such as coverity and actually > read the code when submitting patches.
I have read the code which is why I concluded that it is safe to replace the bit operations with a simple assignment. Since, as you described, all other bit fields are initialised on demand anyway, there is no harm in setting them to zero here. Especially since I see no advantages of the current approach, but instead see two disadvantages: longer machine code (load-modiy-store vs. store) and confusion of tools such as Coverity.
But of course, if you want it as it is, I won't be bothering you.
-- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo-- [unhandled content-type:application/pgp-signature] | |