[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.2001250115550.8426@ninjahub.org>
Date: Sat, 25 Jan 2020 01:26:58 +0000 (GMT)
From: Jules Irenge <jbi.octave@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
cc: Jules Irenge <jbi.octave@...il.com>, boqun.feng@...il.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] time: Add missing annotation to
lock_hrtimer_base()
Thanks Thomas. I really appreciate your feedback, I take good note and I
will send a different version with all the changes in reference to the
email.
Thanks again,
Kind regards
Jules
On Fri, 24 Jan 2020, Thomas Gleixner wrote:
> Jules,
>
> Jules Irenge <jbi.octave@...il.com> writes:
>
> Please use the proper subsystem prefixes when sending patches.
>
> git log --oneline path/to/file
>
> gives you usally a pretty good hint.
>
> > Sparse reports a warning at lock_hrtimer_base()
> >
> > |warning: context imbalance in lock_hrtimer_base() - wrong count at exit
>
> This leading '|' is pointless
>
> > |warning: context imbalance in hrtimer_start_range_ns() - unexpected unlock
> > |warning: context imbalance in hrtimer_try_to_cancel() - unexpected unlock
> > |warning: context imbalance in __hrtimer_get_remaining()
> > |- unexpected unlock
>
> How are the last 3 related to:
>
> > Sparse reports a warning at lock_hrtimer_base()
>
> ?
>
> > To fix this , an __acquires(timer) annotation is added.
>
> Add the missing __acquires(timer) annotation.
>
> Is precise and follows the recommendations of Documentation/process/...
>
> > Given that lock_hrtimer_base() does actually call READ_ONCE(timer->base).
>
> Given that the above sentence uses 'Given that' it should not terminate
> right after explaining the 'Given'.
>
> > This not only fixes the warnings but also improves on readability of
> > the code.
>
> I tend to disagree. In fact the annotation disturbes the reading flow
> because it's on a separate line.
>
> Can you please stop using this boilerplate which is neither helping
> review nor giving someone who looks at the commit later on any useful
> information?
>
> Here is a suggestion for a change log for this:
>
> Sparse reports several warnings;
> warning: context imbalance in lock_hrtimer_base() - wrong count at exit
> warning: context imbalance in hrtimer_start_range_ns() - unexpected unlock
> warning: context imbalance in hrtimer_try_to_cancel() - unexpected unlock
> warning: context imbalance in __hrtimer_get_remaining()- unexpected unlock
>
> The root cause is a missing annotation of lock_hrtimer_base() which
> causes also the 'unexpected unlock' warnings.
>
> Add the missing __acquires(timer) annotation.
>
> Hmm?
>
> The other 2 patches of this series have similar issues. The futex
> changelog is also horribly formatted.
>
> Thanks,
>
> tglx
>
Powered by blists - more mailing lists