lkml.org 
[lkml]   [2002]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RESEND] Cleanup (BIN|BCD)_TO_(BCD|BIN) usage/macros
Tom Rini wrote:
> Right now there's a bit of a mess with all of the BIN_TO_BCD/BCD_TO_BIN
> macros in the kernel. It's defined in a half dozen places, and worse
> yet, not all places use them the same way. Most users do something
> like:
> if ( ... )
> BIN_TO_BCD(x);
>
> But in a few places, it's used as:
> if ( ... )
> y = BIN_TO_BCD(x);
>
> The following creates include/linux/bcd.h which has the 'normal'
> BIN_TO_BCD macros, as well as CONVERT_{BIN,BCD}_TO_{BCD,BIN},
> which are for the second case.


hmmm... removing all the private definitions certainly makes good sense,
but having both CONVERT_foo and foo seems a bit wonky...

IMO it would be better to have BIN_TO_BCD which returns a value, and
__BIN_TO_BCD which has side effects but returns no value...

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.048 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site