[PATCH][RFC] have_residual_data()

Hollis Blanchard hollisb at us.ibm.com
Thu Jun 10 05:39:54 EST 2004


On Tue, 2004-06-08 at 03:12, Leigh Brown wrote:

> I just read Gustavo's email, and co-incidently have finally began looking
> again at my patches over the last couple of days to see about making
> them good enough to submit.  To this end, please find attached a patch
> to create a new inline function have_residual_data(), which looks like
> this:
>
> static inline int have_residual_data(void) {
> #if       defined(CONFIG_PREP_RESIDUAL)
> 	return res && res->ResidualLength;
> #else /* !defined(CONFIG_PREP_RESIDUAL) */
> 	return 0;
> #endif /* defined(CONFIG_PREP_RESIDUAL) */
> }

Sounds like a great idea. :) Without having time to read the whole
patch, I think preferred style is:

#if       defined(CONFIG_PREP_RESIDUAL)
static inline int have_residual_data(void) {
	return res && res->ResidualLength;
}
#else /* !defined(CONFIG_PREP_RESIDUAL) */
static inline int have_residual_data(void) {
	return 0;
}
#endif /* defined(CONFIG_PREP_RESIDUAL) */

--
Hollis Blanchard
IBM Linux Technology Center


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/




More information about the Linuxppc-dev mailing list