Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1784796ybv; Sun, 23 Feb 2020 15:20:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzWxbHJ/uscmpkAkTroOkAjPaXAvdyU+HqRU3EDiMzlDD2oFIAGcEhJxxPyx2+y3suKMJub X-Received: by 2002:aca:1108:: with SMTP id 8mr10657887oir.127.1582500025797; Sun, 23 Feb 2020 15:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582500025; cv=none; d=google.com; s=arc-20160816; b=y8sM0izgLlvU9QNU6Dc9C+5lXpFG0uMZtsk+MgJj9hgzG55kDC/XjZrkNgZ0A7kDT9 5emfbPvcVvbLphBOU/SQcnppc58HpQfC97pjcNh+6hS3Fq5aNpf0usMSuZ7ORvhygXbl BHNMJ5AYqJh9WbOFxvUEUTvqWgFrD+qdI19fWdmNOlgbTuS5mkNpJ/3ARu2DIt3L0bEc eml1iG+/loUmPl5drcjdJk3K9zNJHKO/EmcJodLRHnJx2MDcVZ5QNBxW96uKpgReUjqz Qs5ASD6VlJkNSgWPMyL64IlG59gC8di/hPxE18Ny17pK7O/o+SGIlx1m5m3bkTxdl9EU 2bVw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VIsEnufW5UKiFaauxUQT7cROwH9cIkz3iDWaRKI6faU=; b=rP7zLZRUqQ4JlDGRLZ4HI6wLgVVnx3Yx/pcD2Ii9bli3gSJiEmKO5PsyCsXV1zCpoP cmpIBXtEril8NCtB0HgLczq8K9Ah8SDS0p/dEHQ2c1jEUL1VEeEJRfcH9N/zHbEYBFAN xCNpswlzumdoa+DUnbZBbhgn8du3cOtu6fJ2RjRR0qlEEEqs+8TYBXyNg46Xn7vk+iIf 1oePq2UL8k6yWdA/gZ8ibh5gkoK5cty4h0EWYE7fYUo9WcE4IQeUYY1gJCjAL89v2yCD xtWQJJSgSTLljrysDFvUY0XaMf+W+8xpgkSURV1yDMRd0IY7kVJUKdldezb4FKOju0xj ylnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="vVJ/1ZoC"; 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 h18si5049394otj.114.2020.02.23.15.20.14; Sun, 23 Feb 2020 15:20:25 -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="vVJ/1ZoC"; 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 S1727899AbgBWXSu (ORCPT + 99 others); Sun, 23 Feb 2020 18:18:50 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35696 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbgBWXSb (ORCPT ); Sun, 23 Feb 2020 18:18:31 -0500 Received: by mail-wr1-f68.google.com with SMTP id w12so8248235wrt.2; Sun, 23 Feb 2020 15:18:29 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=VIsEnufW5UKiFaauxUQT7cROwH9cIkz3iDWaRKI6faU=; b=vVJ/1ZoC5W11oiU8xaXPGb2BttMijboDlcCe99BzGqHqsV5OgpSYi+MGa7KOM2K2WJ f3hdCsFLbL87Em61UqceVR2Wl6nGyiztoQhvA45ou6MDTErJNYO7S0asPSD5QEYTyw4c FuHBQFj3gEP1qvivLa6FJndDyTuh4/UAEpbHlaMBUnqlbVw/Aev+FZHl94NurooxzyaF KOpfNlLa1tu4liqGURow94/5huQgUBY5+ZIjYFIx6I2m1k6TYqmfUyX02tMGmt/b83ao 42zudGsv88wWTYe/j6WiVCm2VoSpFCWUGUEaLXkrSuDa5l00LgTNVaHxFZM9DH7mql2h 3/Pg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=VIsEnufW5UKiFaauxUQT7cROwH9cIkz3iDWaRKI6faU=; b=L7DHUGZ2wSkvBnhcm8CfAgwgzr0SY9kJQt7M7P31dbQqWj+kBjvmqTGToiBCWN/NsO MaGOaMYoHIIKWYuan6FNaV/CfOw5Cb9KSuJJaWpVJ83bWh3Oru/qfC6BZpvYV22vQfbz H5VMec4bJXYIsum/cY+wqcvl1KcrCsMWDS+tTSOa1AE6GZOlGR9p25h/VE14NNT6kkXM oVxB2qDxk87ulnZzBj2wwuPp5jq72ZYakODYEWPDjz/nJx5LbsmnQSsZbsc+g6bFnFOL zj13jBStZCIw4elVTNj85o3Yhc58wkQEfuACZYUBu9qHBa9Rj8xV6l1vWBxYEHVTOT7h xiXQ== X-Gm-Message-State: APjAAAUWSnxyFR2k8KhaSuw9LC8jk5KIQ3d00GazfqTg/7VqKt6JMSTA 739N3L1inIFWPX15hS0O7g== X-Received: by 2002:adf:e602:: with SMTP id p2mr57070948wrm.388.1582499908754; Sun, 23 Feb 2020 15:18:28 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:28 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, Minchan Kim , Nitin Gupta , Sergey Senozhatsky , Jens Axboe , linux-block@vger.kernel.org (open list:BLOCK LAYER) Subject: [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock() Date: Sun, 23 Feb 2020 23:17:07 +0000 Message-Id: <20200223231711.157699-27-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-1-jbi.octave@gmail.com> 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 zram_slot_unlock() warning: context imbalance in zram_slot_unlock() - unexpected unlock The root cause is the missing annotation at zram_slot_unlock() Add the missing __releases(ZRAM_LOCK) annotation Signed-off-by: Jules Irenge --- drivers/block/zram/zram_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 1462b1bfec11..a38725452966 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -68,6 +68,7 @@ static void zram_slot_lock(struct zram *zram, u32 index) } static void zram_slot_unlock(struct zram *zram, u32 index) + __releases(ZRAM_LOCK) { bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags); } -- 2.24.1