Re: [PATCH v5 05/23] sg: bitops in sg_device

2019-10-21 Thread Hannes Reinecke
On 10/21/19 3:22 PM, Douglas Gilbert wrote: > On 2019-10-18 6:05 a.m., Hannes Reinecke wrote: [ .. ] >> One thing to keep in mind here is that 'set_bit()' is not atomic; it >> needs to be followed by a memory barrier or being replaced by >> test_and_set_bit() if possible. >> Please audit the code i

Re: [PATCH v5 05/23] sg: bitops in sg_device

2019-10-21 Thread Douglas Gilbert
On 2019-10-18 6:05 a.m., Hannes Reinecke wrote: On 10/8/19 9:50 AM, Douglas Gilbert wrote: Introduce bitops in sg_device to replace an atomic, a bool and a char. That char (sgdebug) had been reduced to only two states. Add some associated macros to make the code a little clearer. Signed-off-by:

Re: [PATCH v5 05/23] sg: bitops in sg_device

2019-10-18 Thread Hannes Reinecke
On 10/8/19 9:50 AM, Douglas Gilbert wrote: > Introduce bitops in sg_device to replace an atomic, a bool and a > char. That char (sgdebug) had been reduced to only two states. > Add some associated macros to make the code a little clearer. > > Signed-off-by: Douglas Gilbert > --- > drivers/scsi/s

[PATCH v5 05/23] sg: bitops in sg_device

2019-10-08 Thread Douglas Gilbert
Introduce bitops in sg_device to replace an atomic, a bool and a char. That char (sgdebug) had been reduced to only two states. Add some associated macros to make the code a little clearer. Signed-off-by: Douglas Gilbert --- drivers/scsi/sg.c | 104 +++---