All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: will@kernel.org
Cc: peterz@infradead.org, boqun.feng@gmail.com, mark.rutland@arm.com,
	thunder.leizhen@huawei.com, jacob.e.keller@intel.com,
	akpm@linux-foundation.org, linux-sparse@vger.kernel.org,
	cluster-devel@redhat.com, luc.vanoostenryck@gmail.com,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	aahringo@redhat.com
Subject: [RFC 0/2] refcount: attempt to avoid imbalance warnings
Date: Thu, 30 Jun 2022 09:59:32 -0400	[thread overview]
Message-ID: <20220630135934.1799248-1-aahringo@redhat.com> (raw)

Hi,

This patch tries to avoid some sparse warnings related to
refcount_dec_and_lock() and kref_put_lock().

I send this patch series as RFC because it was necessary to do a kref
change after adding __cond_lock() to refcount_dec_and_lock()
functionality.

For me it looks like we do a lot of acrobatics to avoid sparse warnings
here and I really don't know if it's worth the offer. However this is
what I have now...

- Alex

Alexander Aring (2):
  refcount: add __cond_lock() for conditional lock refcount API
  kref: move kref_put_lock() callback to caller

 include/linux/kref.h     | 24 ++++++++----------------
 include/linux/refcount.h | 21 ++++++++++++++++-----
 lib/refcount.c           | 23 ++++++++++++-----------
 3 files changed, 36 insertions(+), 32 deletions(-)

-- 
2.31.1


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC 0/2] refcount: attempt to avoid imbalance warnings
Date: Thu, 30 Jun 2022 09:59:32 -0400	[thread overview]
Message-ID: <20220630135934.1799248-1-aahringo@redhat.com> (raw)

Hi,

This patch tries to avoid some sparse warnings related to
refcount_dec_and_lock() and kref_put_lock().

I send this patch series as RFC because it was necessary to do a kref
change after adding __cond_lock() to refcount_dec_and_lock()
functionality.

For me it looks like we do a lot of acrobatics to avoid sparse warnings
here and I really don't know if it's worth the offer. However this is
what I have now...

- Alex

Alexander Aring (2):
  refcount: add __cond_lock() for conditional lock refcount API
  kref: move kref_put_lock() callback to caller

 include/linux/kref.h     | 24 ++++++++----------------
 include/linux/refcount.h | 21 ++++++++++++++++-----
 lib/refcount.c           | 23 ++++++++++++-----------
 3 files changed, 36 insertions(+), 32 deletions(-)

-- 
2.31.1


             reply	other threads:[~2022-06-30 14:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 13:59 Alexander Aring [this message]
2022-06-30 13:59 ` [Cluster-devel] [RFC 0/2] refcount: attempt to avoid imbalance warnings Alexander Aring
2022-06-30 13:59 ` [RFC 1/2] refcount: add __cond_lock() for conditional lock refcount API Alexander Aring
2022-06-30 13:59   ` [Cluster-devel] " Alexander Aring
2022-06-30 15:43   ` Peter Zijlstra
2022-06-30 15:43     ` [Cluster-devel] " Peter Zijlstra
2022-06-30 13:59 ` [RFC 2/2] kref: move kref_put_lock() callback to caller Alexander Aring
2022-06-30 13:59   ` [Cluster-devel] " Alexander Aring
2022-06-30 16:34 ` [RFC 0/2] refcount: attempt to avoid imbalance warnings Linus Torvalds
2022-06-30 16:34   ` [Cluster-devel] " Linus Torvalds
2022-07-01  8:47   ` Peter Zijlstra
2022-07-01  8:47     ` [Cluster-devel] " Peter Zijlstra
2022-07-01 12:07   ` Alexander Aring
2022-07-01 12:07     ` [Cluster-devel] " Alexander Aring
2022-07-01 19:09     ` Alexander Aring
2022-07-01 19:09       ` [Cluster-devel] " Alexander Aring

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=20220630135934.1799248-1-aahringo@redhat.com \
    --to=aahringo@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=boqun.feng@gmail.com \
    --cc=cluster-devel@redhat.com \
    --cc=jacob.e.keller@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=thunder.leizhen@huawei.com \
    --cc=torvalds@linux-foundation.org \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.