linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: boqun.feng@gmail.com, Jules Irenge <jbi.octave@gmail.com>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org (open list:ZSMALLOC COMPRESSED SLAB MEMORY
	ALLOCATOR)
Subject: [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag()
Date: Fri, 14 Feb 2020 20:47:23 +0000	[thread overview]
Message-ID: <20200214204741.94112-13-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com>

Sparse reports a warning at pin_tag()()

warning: context imbalance in pin_tag() - wrong count at exit

The root cause is the missing annotation at pin_tag()
Add the missing __acquires(bitlock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2eab424c8c67..7bac76ae11b3 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -891,7 +891,7 @@ static inline int trypin_tag(unsigned long handle)
 	return bit_spin_trylock(HANDLE_PIN_BIT, (unsigned long *)handle);
 }
 
-static void pin_tag(unsigned long handle)
+static void pin_tag(unsigned long handle) __acquires(bitlock)
 {
 	bit_spin_lock(HANDLE_PIN_BIT, (unsigned long *)handle);
 }
-- 
2.24.1



  parent reply	other threads:[~2020-02-14 20:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/30>
     [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
2020-02-14 20:47   ` [PATCH 03/30] mm/memcontrol: Add missing annotation for unlock_page_lru() Jules Irenge
2020-02-14 20:47   ` [PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru() Jules Irenge
2020-02-14 20:47   ` [PATCH 05/30] mm/compaction: Add missing annotation for compact_lock_irqsave Jules Irenge
2020-02-14 20:47   ` [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages() Jules Irenge
2020-02-14 23:40     ` Mike Kravetz
2020-02-14 20:47   ` [PATCH 07/30] mm/mempolicy: Add missing annotation for queue_pages_pmd() Jules Irenge
2020-02-14 20:47   ` [PATCH 08/30] mm/slub: Add missing annotation for get_map() Jules Irenge
2020-02-14 20:47   ` [PATCH 09/30] mm/slub: Add missing annotation for put_map() Jules Irenge
2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
2020-02-27 21:52     ` Minchan Kim
2020-02-27 21:52     ` Minchan Kim
2020-02-14 20:47   ` [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock() Jules Irenge
2020-02-27 21:54     ` Minchan Kim
2020-02-14 20:47   ` Jules Irenge [this message]
2020-02-27 21:53     ` [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Minchan Kim
2020-02-14 20:47   ` [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag() Jules Irenge
2020-02-27 21:53     ` Minchan Kim
     [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
2020-02-23 23:16   ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
2020-02-23 23:16   ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
2020-02-23 23:17   ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
2020-02-23 23:17   ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() 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=20200214204741.94112-13-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /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