Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1027983ybl; Fri, 24 Jan 2020 14:06:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxQn5A/WH5NjQuAxQPqkCAld1rl7nBwPcRLKYrJKqxkVMi4yxlm2hrYS8GUPgwGoq/i9+VW X-Received: by 2002:aca:3d7:: with SMTP id 206mr712623oid.98.1579903593723; Fri, 24 Jan 2020 14:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579903593; cv=none; d=google.com; s=arc-20160816; b=xCPU+kT5g/hoV7olVIzmO/GtAGWYtngso50S5GpzlA2m0T1Q6N/IFQjlWkk9tV8SmH GVpXYJJR1mn7NIVgAdUp0YmZFuZ2pupnZfBtw6U67WR/ZQtk2WQNBjml0bOMy9EwcuCH 6oEQK+Hq9wkyVjZ5vpeQ0cbnvkgnRnLJL22ZlDUQ0GYyA8bFwrUSgnV7Ew4wRNJIvKBh WR3UA1/UrqknXFUhtT+7KR9CCL/ArgE23q5NkC6g310y2PcH0AqBAgv2HbAR4XLK/e3a 6IdM0RqN5S5EK1Iq7xX8d6sF9sA0uujBKoCySo+X9arUjl2SadjKLga+5HrWjpjebI0x 5UOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=ZU5Kqw06fujKgRitBQ4Re8BWp8kQ2OwOS3sm8OUzqd8=; b=PEJCV+3nckB6j2Fw2DYG73BhTCHUrRvjaKBv1J3aubFj3JW5Bc6+7nTgIVBcy+H2ws H3BOK516GsihrWdZzr1oK8Y3wbYObwraKinMgzyj0SOuTJNamq1S5E2TTeThat0JJXoR kygCZQWDkMpPMFNw5bzWe6lx2Vz+9NoGvVYtAzaqgjJME59RV3e+nZLGC5/ncYhF9RNX K0iIQE1nmr3XAbDQYB5G3BnbBVOv4i5OdMZIz/kEHsY7wevP33auMs1+3r945xADZiA4 TJ2dD9yLk3KH3q6VJnMz5FC371BQvD1+J+4lU8z2WrFj5CZFiQX0vqh4nwDje///k0uO q5oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w196si422499oia.135.2020.01.24.14.06.21; Fri, 24 Jan 2020 14:06:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728921AbgAXWEz (ORCPT + 99 others); Fri, 24 Jan 2020 17:04:55 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:43698 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgAXWEy (ORCPT ); Fri, 24 Jan 2020 17:04:54 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iv74O-0002QG-5y; Fri, 24 Jan 2020 23:04:52 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 947D710308A; Fri, 24 Jan 2020 23:04:51 +0100 (CET) From: Thomas Gleixner To: Jules Irenge Cc: boqun.feng@gmail.com, Jules Irenge , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] time: Add missing annotation to lock_hrtimer_base() In-Reply-To: <31c31ca2d78d9368d38e1a5909bc0c9a7be5dc98.1579893447.git.jbi.octave@gmail.com> References: <31c31ca2d78d9368d38e1a5909bc0c9a7be5dc98.1579893447.git.jbi.octave@gmail.com> Date: Fri, 24 Jan 2020 23:04:51 +0100 Message-ID: <87d0b8mry4.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jules, Jules Irenge 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