Re: [PATCH v2 net-next 6/9] sunvnet: straighten up message event handling logic

2017-02-08 Thread Sowmini Varadhan
On (02/08/17 08:28), Shannon Nelson wrote: > The existing code does this as well - if it first finds a RESET, it handles > it then hits the return 0. Next if it finds the UP, it does the goto back > to the ldc_ctrl: to process, and hits the same return 0. Only if neither of > these bits have

Re: [PATCH v2 net-next 6/9] sunvnet: straighten up message event handling logic

2017-02-08 Thread Shannon Nelson
On 2/8/2017 7:59 AM, Sowmini Varadhan wrote: On (02/07/17 14:12), Shannon Nelson wrote: + + /* we don't expect any other bits */ + BUG_ON(port->rx_event & ~(LDC_EVENT_DATA_READY | + LDC_EVENT_RESET | + LDC_EVENT_UP)); +

Re: [PATCH v2 net-next 6/9] sunvnet: straighten up message event handling logic

2017-02-08 Thread Sowmini Varadhan
On (02/07/17 14:12), Shannon Nelson wrote: > + > + /* we don't expect any other bits */ > + BUG_ON(port->rx_event & ~(LDC_EVENT_DATA_READY | > + LDC_EVENT_RESET | > + LDC_EVENT_UP)); > + > + /* RESET takes precedent over any

[PATCH v2 net-next 6/9] sunvnet: straighten up message event handling logic

2017-02-07 Thread Shannon Nelson
The use of gotos for handling the incoming events made this code harder to read and support than it should be. This patch straightens out and clears up the logic. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/sun/sunvnet_common.c | 94