linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jules Irenge <jbi.octave@gmail.com>,
	boqun.feng@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] time: Add missing annotation to lock_hrtimer_base()
Date: Sat, 25 Jan 2020 01:26:58 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.2001250115550.8426@ninjahub.org> (raw)
In-Reply-To: <87d0b8mry4.fsf@nanos.tec.linutronix.de>


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@gmail.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
> 

  reply	other threads:[~2020-01-25  1:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/3>
2020-01-24 20:08 ` [PATCH 0/3] Lock warning cleanup Jules Irenge
2020-01-24 20:12   ` [PATCH 2/3] futex: Add missing annotation for wake_futex_pi() Jules Irenge
2020-01-24 20:12   ` [PATCH 3/3] mutex: Add missing annotations Jules Irenge
2020-01-27  8:51     ` Peter Zijlstra
2020-02-01  0:27       ` Jules Irenge
2020-01-24 20:12   ` [PATCH 1/3] time: Add missing annotation to lock_hrtimer_base() Jules Irenge
2020-01-24 22:04     ` Thomas Gleixner
2020-01-25  1:26       ` Jules Irenge [this message]
2020-02-01  0:04 ` [PATCH 0/3] Lock warning cleanups Jules Irenge
2020-02-01  0:04   ` [PATCH 1/3] hrtimer: Add missing annotation to lock_hrtimer_base() Jules Irenge
2020-02-01  0:04   ` [PATCH 2/3] futex: Add missing annotation for wake_futex_pi() Jules Irenge
2020-02-01  0:04   ` [PATCH 3/3] futex: Add missing annotation for fixup_pi_state_owner() Jules Irenge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2001250115550.8426@ninjahub.org \
    --to=jbi.octave@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).