Re: nozomi version 2.1c for review

From: Alan Cox
Date: Fri Nov 09 2007 - 09:25:28 EST


> and already in Gregs git repository) i resolved and removed all those
> GET_* and SET_* macros.

Oh good, that was long overdue.

> + switch (port) {
> + case PORT_MDM:
> + dc->last_ier = (dc->last_ier & ~MDM_UL) | MDM_UL;
> + break;

The & ~xxx is unneeded if you then set it again always

Could also clean up to be

u8 mask[NR_PORTS] = { DIAG_UGL, APP1_UL, ... }
dc->last_ier |= mask[port];

instead of the switch - ditto disable transmit_ul etc

> + case PORT_DIAG:
> + dc->last_ier = (dc->last_ier & ~DIAG_UL) | DIAG_UL;
> + break;
> + case PORT_APP1:
> + dc->last_ier = (dc->last_ier & ~APP1_UL) | APP1_UL;


Looking a lot better than before and with plenty of scope for more
improvement now it can be read.

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