Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3044056ybl; Mon, 20 Jan 2020 14:45:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxeA1P5WJrl5C86DuZWM/t+2Wo6tNFvM459Gx+6Hsez0BMnKclWttgAas9R456RRljXiJsb X-Received: by 2002:aca:6042:: with SMTP id u63mr889971oib.76.1579560307075; Mon, 20 Jan 2020 14:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579560307; cv=none; d=google.com; s=arc-20160816; b=ZW/y9w6u1vKO8WeyWBV+HiWEMpEwluzI0vGnPkkuLb83PhwSPi2Lw8jKgfXOqpNyAC IlHO8VNZ9SsduN21gyqE3t+soWUrWrykkD8h1A0dz7X+qc3QJo7dyv591dyzp6bOJyOi gaV91OW7TmoHy6o4czV0adBnJe0ELYPudGa3wp4bdjobijqrgmKesmn1aD1UtbbIPfBq yfBEdVxeqyM54iliIyIZ+0zITtMJviAeheVF+vX2yzoIYn5KsJNiTPO7acryW6wb0sQs kwvA3ltMwWtg0811/QMD2BmO10C3aagwWW6HRIEHxaZ+wZxx/mB1I5Rc+TEzx1ddJ6h/ nM6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LIr9v+lPF9m04aOL6YbMXajLYqQw2LLsXJkvfGL0mQk=; b=q8kq2ZST8vjy4kbicul3cP3EFZmgxT8G2BFsqlxpvFua6Hfng2qv1mEBPAf7SnASYx 0EC4CfR6JNhOF3GA2xirhdUZnNGppKlDoA8CTiB714OGvQiml7xt7Au8hk6vONARCeQu Bl58GHCqwZc58UHENUNur3viKe0RBFlA+lX5NTEicWpxTYC0lXx8jI7PZlAQMibY4nC5 u8IV3z9HwA/7gk1iLjctz/7fKFT7zlGGIwGycSrtlbNimJZAcDfKAtmN0HzGmlpxBVTh AFWv8A4TAIh578wJPHX3SkIoyzBWPMciaxT+07023ggFNG0X5fpvXt+4wDUJ4luVuPjl HIUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rIzeDpTI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si18131191oih.206.2020.01.20.14.44.55; Mon, 20 Jan 2020 14:45:07 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rIzeDpTI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbgATWoE (ORCPT + 99 others); Mon, 20 Jan 2020 17:44:04 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52431 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbgATWoD (ORCPT ); Mon, 20 Jan 2020 17:44:03 -0500 Received: by mail-wm1-f66.google.com with SMTP id p9so1002428wmc.2 for ; Mon, 20 Jan 2020 14:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LIr9v+lPF9m04aOL6YbMXajLYqQw2LLsXJkvfGL0mQk=; b=rIzeDpTIuB0fA3WkCVgeL/zTOL2ApKVRf6AsRWrDNXxctBI4iqUJqcUFkrvgSc66yr qkxwTkJvvaaMgJJnGYLM3PdOksWWrzKeqXMTBqE7LU7yWYuHcwWoFQKYuKl9PxGDidjH lCJOhi05qfrVM1PnkuhDCGgGrGR/+zFWGcyL0rrY/QWuxgygvn5UnFqIxIOMrRtDjeRF aQ08JidsuUjfPG2t4RaUusS9ohtqYepncEEeIOtlKZW0/4sqcJk5B8MCJYHvet/bHm9x EXkySVHsmI3raTarbl9H9Ae5hnxjmBylnvLhYc1JRDtoeyoDa2prdwftoyHdBEoTTHcM n2aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LIr9v+lPF9m04aOL6YbMXajLYqQw2LLsXJkvfGL0mQk=; b=qqLOfqTOih+SUU7YHBLKjppzgRPZnYGkRWbVJwSmGIUK7sb0EIE8rX40GMpRlo3OzW saElohay3Qb5pZ+IWsOocF4C8F84f6NhqZTqxFa7zeIFJNZn3lWFv+QwhxCHeA4TNYvy VqJ6y0UPlelnY2ZdnOuJ8ruZ2b04WwP3oh/h8spPpC38LNzcS9OPZTBqGumkl/MApYfz omcFpx5Z8jaW2XVycNoKZrbnfj0be6esOll97iGSWPB6KWk4uoOgw7y3xUOM3/yAqfWN 9u1oydgkFniyt89IcXPVy19eUtlZ5kACTZZDND6AVSouxEsomj1hAxh8BOd7cLyXLIMK MYAQ== X-Gm-Message-State: APjAAAXa4FnQW1o1pItdskS4lm4F6ZcmCUG3/TwqgCJk1sRQLjgrum8i r9AlyU9Tbj4DU1+uHWibau4RSxFlCBR/ X-Received: by 2002:a05:600c:2290:: with SMTP id 16mr903542wmf.184.1579560241675; Mon, 20 Jan 2020 14:44:01 -0800 (PST) Received: from ninjahost.lan (host-92-15-170-165.as43234.net. [92.15.170.165]) by smtp.googlemail.com with ESMTPSA id o4sm47817626wrx.25.2020.01.20.14.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 14:44:01 -0800 (PST) From: Jules Irenge To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, Jules Irenge Subject: [PATCH 5/5] time: Add missing annotation for __run_timer() Date: Mon, 20 Jan 2020 22:43:47 +0000 Message-Id: <20200120224347.51843-1-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at __run_hrtimer() |warning: context imbalance in __run_hrtimer() - unexpected unlock To fix this, a must_hold() annotation is added. Given that __run_hrtimer() requires lock to be held This not only fixes the warning but also improves on the readability of the code. Signed-off-by: Jules Irenge --- kernel/time/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 8de90ea31280..3e94ea58b18d 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1477,7 +1477,7 @@ EXPORT_SYMBOL_GPL(hrtimer_active); static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, struct hrtimer_clock_base *base, struct hrtimer *timer, ktime_t *now, - unsigned long flags) + unsigned long flags) __must_hold(&cpu_base->lock) { enum hrtimer_restart (*fn)(struct hrtimer *); int restart; -- 2.24.1