From: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Lars Ellenberg <lars.ellenberg@linbit.com>,
drbd-dev@lists.linbit.com
Subject: [Drbd-dev] [PATCH 5/8] drbd: remove macros using require_context
Date: Fri, 13 Jan 2023 13:35:35 +0100 [thread overview]
Message-ID: <20230113123538.144276-6-christoph.boehmwalder@linbit.com> (raw)
In-Reply-To: <20230113123538.144276-1-christoph.boehmwalder@linbit.com>
This require_context attribute originated in a proposed sparse patch by
Philipp Reisner back in 2008. Johannes Berg had a different solution to
a similar problem, and that patch "won" in the end; so the require_context
thing never got merged. The whole history can be read at [0].
DRBD kept using these annotations anyway for a while. Nowadays, on a
modern unmodified sparse, they obviously do nothing, and they are hardly
used anymore anyway.
So, just remove the definitions of these macros.
[0] https://www.spinics.net/lists/linux-sparse/msg01150.html
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: Joel Colledge <joel.colledge@linbit.com>
---
drivers/block/drbd/drbd_int.h | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index ae713338aa46..edce1f7ac2da 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -39,16 +39,6 @@
#include "drbd_protocol.h"
#include "drbd_polymorph_printk.h"
-#ifdef __CHECKER__
-# define __protected_by(x) __attribute__((require_context(x,1,999,"rdwr")))
-# define __protected_read_by(x) __attribute__((require_context(x,1,999,"read")))
-# define __protected_write_by(x) __attribute__((require_context(x,1,999,"write")))
-#else
-# define __protected_by(x)
-# define __protected_read_by(x)
-# define __protected_write_by(x)
-#endif
-
/* shared module parameters, defined in drbd_main.c */
#ifdef CONFIG_DRBD_FAULT_INJECTION
extern int drbd_enable_faults;
@@ -774,7 +764,7 @@ struct drbd_device {
unsigned long flags;
/* configured by drbdsetup */
- struct drbd_backing_dev *ldev __protected_by(local);
+ struct drbd_backing_dev *ldev;
sector_t p_size; /* partner's disk size */
struct request_queue *rq_queue;
--
2.38.1
next prev parent reply other threads:[~2023-01-13 12:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 12:35 [Drbd-dev] [RESEND PATCH 0/8] Miscellaneous DRBD reorganization Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 1/8] drbd: adjust drbd_limits license header Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 2/8] drbd: fix DRBD_VOLUME_MAX 65535 -> 65534 Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 3/8] drbd: make limits unsigned Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 4/8] drbd: remove unnecessary assignment in vli_encode_bits Christoph Böhmwalder
2023-01-13 12:35 ` Christoph Böhmwalder [this message]
2023-01-13 12:35 ` [Drbd-dev] [PATCH 6/8] MAINTAINERS: add drbd headers Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 7/8] drbd: interval tree: make removing an "empty" interval a no-op Christoph Böhmwalder
2023-01-13 12:35 ` [Drbd-dev] [PATCH 8/8] drbd: drbd_insert_interval(): Clarify comment Christoph Böhmwalder
2023-01-13 20:44 ` [Drbd-dev] [RESEND PATCH 0/8] Miscellaneous DRBD reorganization Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2022-12-09 14:53 [Drbd-dev] [PATCH " Christoph Böhmwalder
2022-12-09 14:53 ` [Drbd-dev] [PATCH 5/8] drbd: remove macros using require_context Christoph Böhmwalder
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=20230113123538.144276-6-christoph.boehmwalder@linbit.com \
--to=christoph.boehmwalder@linbit.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.reisner@linbit.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