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] [day] [month] [year] [list]
Message-ID: <CAHp75VeOJ5XwjpupboaL1DzF03no=j=1HvDrVEy-1dF754On3w@mail.gmail.com>
Date:   Thu, 4 Nov 2021 12:50:30 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     davidcomponentone@...il.com
Cc:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Colin King <colin.king@...onical.com>,
        Alan Stern <stern@...land.harvard.edu>,
        Yang Guang <yang.guang5@....com.cn>,
        USB <linux-usb@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] USB: UDC: use swap() to make code cleaner

On Thu, Nov 4, 2021 at 3:14 AM <davidcomponentone@...il.com> wrote:

> Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
> opencoding it.

Same comment as per all your valuable contributions: think about the
code you are modifying a little bit more. Okay?

>         struct net2280_dma      *end;
> -       dma_addr_t              tmp;
>
>         /* swap new dummy for old, link; fill and maybe activate */
>         end = ep->dummy;
>         ep->dummy = req->td;
>         req->td = end;
>
> -       tmp = ep->td_dma;
> -       ep->td_dma = req->td_dma;
> -       req->td_dma = tmp;
> +       swap(ep->td_dma, req->td_dma);

Interestingly, why the previous paragraph was not detected by you as
an opportunity to convert as well?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ