From: Arne R. <arn...@go...> - 2011-09-19 11:17:41
|
2011/9/14 Lars Ellenberg <lar...@li...>: > On Sun, Sep 11, 2011 at 02:19:53PM +0200, Arne Redlich wrote: >> As much as bitfields improve readability - they're not portable. > > As long as you reverse the order of the definition depending on > endianess, they should be portable "enough". Nice idea :) I'm seriously considering doing this as I really like the readability improvements provided by bitfields. > Or which kind of protability are you concerned about? > >> Signed-off-by: Arne Redlich <arn...@go...> >> >> --- >> kernel/persist.c | 78 +++++++++++++++++----------------------- >> kernel/persist.h | 103 +++++++++++++++++++++++++++-------------------------- >> 2 files changed, 85 insertions(+), 96 deletions(-) >> >> diff --git a/kernel/persist.c b/kernel/persist.c >> index 01821a0..654a1f4 100644 >> --- a/kernel/persist.c >> +++ b/kernel/persist.c >> @@ -32,15 +32,8 @@ pr_initiator_has_registered(const struct reservation *res, >> >> static const struct pr_in_report_capabilities_data pr_capabilities = { >> .length = cpu_to_be16(8), >> - .ptpl_c = 0, >> - .atp_c = 0, >> - .sip_c = 0, >> - .crh = 0, > > BTW, standard says: not mentioned fields are set to zero, anyways. Yes, of course. I (ab)used that do provide "documentation", but I'm not married to it and will consider removing it to maintain consistency with kernel coding style. Thanks for your comments, Arne > Lars > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > Iscsitarget-devel mailing list > Isc...@li... > https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel > |