[PATCH] Add generic LE/BE load/store uint type convertors and use them in msgb

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sun Jan 12 18:46:54 UTC 2014


Hi Max,

On Sat, Dec 28, 2013 at 10:02:10PM +0100, ☎ wrote:
> Improved version of 1st patch (rol16 implementation were missing) and
> actual kasumi implementation which uses macro from 1st patch.

thanks for your patch.

I think it would be better if the load/store macros would at least have
an OSMO_ name prefix in order to avoid namespace clashes with other
code.  I'd consider that mandatory for a merge.

As a matter of style, I would prefer to have proper inline functions
rather than hard to read multi-line macros.  I'd consider that optional,
as we could still increase readibility later on by either breaking the
macros into multi-line macros or inline functions at a later point
without breaking the API / uesers.

What you get from inline functions is better compiler warnings in case
of type mismatches on the input side.  Trying to understand compiler
warnings in complex macros is much harder.

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the baseband-devel mailing list