lkml.org 
[lkml]   [2015]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locking: type cleanup when accessing fast_read_ctr
On Wed, 20 May 2015, Oleg Nesterov wrote:

> On 05/19, Nicholas Mc Guire wrote:
> >
> > I assumed it would not matter but did not see a simple way of getting it
> > type clean with unsigned either mainly due to the atomic_t being int and
> > val in update_fast_ctr() being passed as -1.
>
> Perhaps clear_fast_ctr() should have a comment to explain why it returns
> "int"... even if "unsigned" should work too.
>
> Please see https://lkml.org/lkml/2012/11/2/346
>
thanks - makes it more clear to me where this came from - will give it
another run and see how this could be resolved type clean. in any case
I think that for such deliberate type missmatch it would be good to
add an explicit cast so that it is clear that it was actually intended.

thx!
hofrat



\
 
 \ /
  Last update: 2015-05-23 09:01    [W:0.071 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site