[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZE6N/oZ5DFI6td/0@finisterre.sirena.org.uk>
Date: Mon, 1 May 2023 00:49:18 +0900
From: Mark Brown <broonie@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-spi@...r.kernel.org
Subject: Re: [PATCH] spi: Use non-atomic xxx_bit() functions
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists