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: <20200429102114.GF185537@smile.fi.intel.com>
Date:   Wed, 29 Apr 2020 13:21:14 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Syed Nayyar Waris <syednwaris@...il.com>
Cc:     akpm@...ux-foundation.org, vilhelm.gray@...il.com,
        linus.walleij@...aro.org, bgolaszewski@...libre.com,
        michal.simek@...inx.com, linux-gpio@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] gpio: xilinx: Utilize for_each_set_clump macro

On Wed, Apr 29, 2020 at 04:39:47AM +0530, Syed Nayyar Waris wrote:
> This patch reimplements the xgpio_set_multiple function in
> drivers/gpio/gpio-xilinx.c to use the new for_each_set_clump macro.
> Instead of looping for each bit in xgpio_set_multiple
> function, now we can check each channel at a time and save cycles.

> +	const unsigned long state_size = BITS_PER_TYPE(*state);

This '*state' is unneeded complication, use BITS_PER_U32.

> +#define TOTAL_BITS BITS_PER_TYPE(chip->gpio_state)

This macro makes code uglier, besides the fact of absence of #undef.
And also see above.

> +	DECLARE_BITMAP(old, TOTAL_BITS);
> +	DECLARE_BITMAP(new, TOTAL_BITS);
> +	DECLARE_BITMAP(changed, TOTAL_BITS);

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ