lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e23f3bc-3185-862d-e2e5-5a54620fe5e5@users.sourceforge.net>
Date:   Wed, 19 Oct 2016 15:50:23 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     David Härdeman <david@...deman.nu>,
        linux-media@...r.kernel.org
Cc:     Sean Young <sean@...s.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 4/5] [media] winbond-cir: One variable and its check less
 in wbcir_shutdown() after error detection

>>>> + /* 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.

Can an other update suggestion like "[PATCH 6/6] crypto-caamhash:
Move common error handling code in two functions" explain this technique
a bit better in principle?
https://patchwork.kernel.org/patch/9333861/
https://lkml.kernel.org/r/<baa5db91-27e7-ecab-f2c9-29e549b6e5f0@...rs.sourceforge.net>

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ