Re: [PATCH] spi: Use non-atomic xxx_bit() functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 30, 2023 at 11:35:35AM +0200, Christophe JAILLET wrote:

> Accesses to 'minors' are guarded by the 'device_list_lock' mutex. So, it is
> safe to use the non-atomic version of (set|clear)_bit() in the
> corresponding sections.

Is it a problem to use the atomic version?

>  	if (status == 0) {
> -		set_bit(minor, minors);
> +		__set_bit(minor, minors);
>  		list_add(&spidev->device_entry, &device_list);

The __ usually means something is the more complicated and less
preferred API.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux