Re: [PATCH v2 5/9] staging: kpc2000: use atomic_t to assign card numbers.

2019-05-17 Thread Greg KH
On Thu, May 16, 2019 at 10:14:56PM +, Matt Sickler wrote: > >-Original Message- > >From: devel On Behalf Of > >Previously the next card number was assigned from a static int local > >variable, > >which was read and later incremented. This was not thread- safe, so now we > >use an

RE: [PATCH v2 5/9] staging: kpc2000: use atomic_t to assign card numbers.

2019-05-16 Thread Matt Sickler
>-Original Message- >From: devel On Behalf Of >Previously the next card number was assigned from a static int local variable, >which was read and later incremented. This was not thread- safe, so now we >use an atomic_t and atomic_fetch_add instead. Switching to atomic_fetch_add is