lkml.org 
[lkml]   [2016]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/5] [media] winbond-cir: One variable and its check less in wbcir_shutdown() after error detection
    October 15, 2016 6:42 PM, "SF Markus Elfring" <elfring@users.sourceforge.net> wrote:
    >>> + /* Set CEIR_EN */
    >>> + wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_CTL, 0x01, 0x01);
    >>> +set_irqmask:
    >>> /*
    >>> * ACPI will set the HW disable bit for SP3 which means that the
    >>> * output signals are left in an undefined state which may cause
    >>> @@ -876,6 +858,14 @@ wbcir_shutdown(struct pnp_dev *device)
    >>> */
    >>> wbcir_set_irqmask(data, WBCIR_IRQ_NONE);
    >>> disable_irq(data->irq);
    >>> + return;
    >>> +clear_bits:
    >>> + /* Clear BUFF_EN, Clear END_EN, Clear MATCH_EN */
    >>> + wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_EV_EN, 0x00, 0x07);
    >>> +
    >>> + /* Clear CEIR_EN */
    >>> + wbcir_set_bits(data->wbase + WBCIR_REG_WCEIR_CTL, 0x00, 0x01);
    >>> + goto set_irqmask;
    >>
    >> I'm not convinced that adding a goto which goes backwards is making this
    >> code any more readible, just so that a local variable can be dropped.
    >
    > Thanks for your feedback.
    >
    > Is such a "backward jump" usual and finally required when you would like
    > to move a bit of common error handling code to the end without using extra
    > local variables and a few statements should still be performed after it?
    >

    I'm sorry, I can't parse this.

    \
     
     \ /
      Last update: 2016-10-19 17:49    [W:2.230 / U:0.960 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site