linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Rid W=1 warnings from Block
@ 2021-03-12 10:55 Lee Jones
  2021-03-12 10:55 ` [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier Lee Jones
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Boris Ostrovsky, drbd-dev, Jens Axboe,
	Joshua Morris, Juergen Gross, Konrad Rzeszutek Wilk,
	Lars Ellenberg, linux-block, Philip Kelleher, Philipp Reisner,
	Roger Pau Monné,
	Stefano Stabellini, xen-devel

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (11):
  block: rsxx: core: Remove superfluous const qualifier
  block: drbd: drbd_interval: Demote some kernel-doc abuses and fix
    another header
  block: mtip32xx: mtip32xx: Mark debugging variable 'start' as
    __maybe_unused
  block: drbd: drbd_state: Fix some function documentation issues
  block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers
  block: drbd: drbd_main: Remove duplicate field initialisation
  block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
  block: drbd: drbd_main: Fix a bunch of function documentation
    discrepancies
  block: drbd: drbd_receiver: Demote less than half complete kernel-doc
    header
  block: xen-blkfront: Demote kernel-doc abuses
  block: drbd: drbd_nl: Demote half-complete kernel-doc headers

 drivers/block/drbd/drbd_interval.c |  8 +++++---
 drivers/block/drbd/drbd_main.c     | 30 +++++++++++++++---------------
 drivers/block/drbd/drbd_nl.c       | 17 ++++++++++-------
 drivers/block/drbd/drbd_receiver.c | 26 ++++++++++++--------------
 drivers/block/drbd/drbd_state.c    |  7 ++++---
 drivers/block/mtip32xx/mtip32xx.c  |  2 +-
 drivers/block/rsxx/core.c          |  2 +-
 drivers/block/xen-blkfront.c       |  6 +++---
 8 files changed, 51 insertions(+), 47 deletions(-)

Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: drbd-dev@lists.linbit.com
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Joshua Morris <josh.h.morris@us.ibm.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: linux-block@vger.kernel.org
Cc: Philip Kelleher <pjk1939@linux.ibm.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org
-- 
2.27.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-04-06 20:59   ` Bart Van Assche
  2021-03-12 10:55 ` [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header Lee Jones
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Joshua Morris, Philip Kelleher, Jens Axboe, linux-block

This function returns a const string.

The second const qualifier is not required.

Fixes the following W=1 kernel build warning(s):

 drivers/block/rsxx/core.c:395:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

Cc: Joshua Morris <josh.h.morris@us.ibm.com>
Cc: Philip Kelleher <pjk1939@linux.ibm.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/rsxx/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index 5ac1881396afb..813b0a554d4a8 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -392,7 +392,7 @@ static irqreturn_t rsxx_isr(int irq, void *pdata)
 }
 
 /*----------------- Card Event Handler -------------------*/
-static const char * const rsxx_card_state_to_str(unsigned int state)
+static const char *rsxx_card_state_to_str(unsigned int state)
 {
 	static const char * const state_strings[] = {
 		"Unknown", "Shutdown", "Starting", "Formatting",
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
  2021-03-12 10:55 ` [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-04-06 21:00   ` Bart Van Assche
  2021-03-12 10:55 ` [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused Lee Jones
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_interval.c:11: warning: Function parameter or member 'node' not described in 'interval_end'
 drivers/block/drbd/drbd_interval.c:26: warning: Function parameter or member 'root' not described in 'drbd_insert_interval'
 drivers/block/drbd/drbd_interval.c:26: warning: Function parameter or member 'this' not described in 'drbd_insert_interval'
 drivers/block/drbd/drbd_interval.c:70: warning: Function parameter or member 'root' not described in 'drbd_contains_interval'
 drivers/block/drbd/drbd_interval.c:96: warning: Function parameter or member 'root' not described in 'drbd_remove_interval'
 drivers/block/drbd/drbd_interval.c:96: warning: Function parameter or member 'this' not described in 'drbd_remove_interval'
 drivers/block/drbd/drbd_interval.c:113: warning: Function parameter or member 'root' not described in 'drbd_find_overlap'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_interval.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c
index 651bd0236a996..f07b4378388b0 100644
--- a/drivers/block/drbd/drbd_interval.c
+++ b/drivers/block/drbd/drbd_interval.c
@@ -3,7 +3,7 @@
 #include <linux/rbtree_augmented.h>
 #include "drbd_interval.h"
 
-/**
+/*
  * interval_end  -  return end of @node
  */
 static inline
@@ -18,7 +18,7 @@ sector_t interval_end(struct rb_node *node)
 RB_DECLARE_CALLBACKS_MAX(static, augment_callbacks,
 			 struct drbd_interval, rb, sector_t, end, NODE_END);
 
-/**
+/*
  * drbd_insert_interval  -  insert a new interval into a tree
  */
 bool
@@ -56,6 +56,7 @@ drbd_insert_interval(struct rb_root *root, struct drbd_interval *this)
 
 /**
  * drbd_contains_interval  -  check if a tree contains a given interval
+ * @root:	red black tree root
  * @sector:	start sector of @interval
  * @interval:	may not be a valid pointer
  *
@@ -88,7 +89,7 @@ drbd_contains_interval(struct rb_root *root, sector_t sector,
 	return false;
 }
 
-/**
+/*
  * drbd_remove_interval  -  remove an interval from a tree
  */
 void
@@ -99,6 +100,7 @@ drbd_remove_interval(struct rb_root *root, struct drbd_interval *this)
 
 /**
  * drbd_find_overlap  - search for an interval overlapping with [sector, sector + size)
+ * @root:	red black tree root
  * @sector:	start sector
  * @size:	size, aligned to 512 bytes
  *
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
  2021-03-12 10:55 ` [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier Lee Jones
  2021-03-12 10:55 ` [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-04-06 21:01   ` Bart Van Assche
  2021-03-12 10:55 ` [PATCH 04/11] block: drbd: drbd_state: Fix some function documentation issues Lee Jones
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Jens Axboe, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_standby_immediate’:
 drivers/block/mtip32xx/mtip32xx.c:1216:16: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]

Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/mtip32xx/mtip32xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 3be0dbc674bd0..bc485f1623361 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1213,7 +1213,7 @@ static int mtip_standby_immediate(struct mtip_port *port)
 {
 	int rv;
 	struct host_to_dev_fis	fis;
-	unsigned long start;
+	unsigned long __maybe_unused start;
 	unsigned int timeout;
 
 	/* Build the FIS. */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/11] block: drbd: drbd_state: Fix some function documentation issues
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (2 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-12 10:55 ` [PATCH 05/11] block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers Lee Jones
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_state.c:913: warning: Function parameter or member 'connection' not described in 'is_valid_soft_transition'
 drivers/block/drbd/drbd_state.c:913: warning: Excess function parameter 'device' description in 'is_valid_soft_transition'
 drivers/block/drbd/drbd_state.c:1054: warning: Function parameter or member 'warn' not described in 'sanitize_state'
 drivers/block/drbd/drbd_state.c:1054: warning: Excess function parameter 'warn_sync_abort' description in 'sanitize_state'
 drivers/block/drbd/drbd_state.c:1703: warning: Function parameter or member 'state_change' not described in 'after_state_ch'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_state.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index 0067d328f0b56..b8a27818ab3f8 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -904,9 +904,9 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
  * is_valid_soft_transition() - Returns an SS_ error code if the state transition is not possible
  * This function limits state transitions that may be declined by DRBD. I.e.
  * user requests (aka soft transitions).
- * @device:	DRBD device.
- * @ns:		new state.
  * @os:		old state.
+ * @ns:		new state.
+ * @connection:  DRBD connection.
  */
 static enum drbd_state_rv
 is_valid_soft_transition(union drbd_state os, union drbd_state ns, struct drbd_connection *connection)
@@ -1044,7 +1044,7 @@ static void print_sanitize_warnings(struct drbd_device *device, enum sanitize_st
  * @device:	DRBD device.
  * @os:		old state.
  * @ns:		new state.
- * @warn_sync_abort:
+ * @warn:	placeholder for returned state warning.
  *
  * When we loose connection, we have to set the state of the peers disk (pdsk)
  * to D_UNKNOWN. This rule and many more along those lines are in this function.
@@ -1696,6 +1696,7 @@ static bool lost_contact_to_peer_data(enum drbd_disk_state os, enum drbd_disk_st
  * @os:		old state.
  * @ns:		new state.
  * @flags:	Flags
+ * @state_change: state change to broadcast
  */
 static void after_state_ch(struct drbd_device *device, union drbd_state os,
 			   union drbd_state ns, enum chg_state_flags flags,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/11] block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (3 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 04/11] block: drbd: drbd_state: Fix some function documentation issues Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-12 10:55 ` [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation Lee Jones
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_receiver.c:265: warning: Function parameter or member 'peer_device' not described in 'drbd_alloc_pages'
 drivers/block/drbd/drbd_receiver.c:265: warning: Excess function parameter 'device' description in 'drbd_alloc_pages'
 drivers/block/drbd/drbd_receiver.c:1362: warning: Function parameter or member 'connection' not described in 'drbd_may_finish_epoch'
 drivers/block/drbd/drbd_receiver.c:1362: warning: Excess function parameter 'device' description in 'drbd_may_finish_epoch'
 drivers/block/drbd/drbd_receiver.c:1451: warning: Function parameter or member 'resource' not described in 'drbd_bump_write_ordering'
 drivers/block/drbd/drbd_receiver.c:1451: warning: Function parameter or member 'bdev' not described in 'drbd_bump_write_ordering'
 drivers/block/drbd/drbd_receiver.c:1451: warning: Excess function parameter 'connection' description in 'drbd_bump_write_ordering'
 drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'op' not described in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'op_flags' not described in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'fault_type' not described in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:1643: warning: Excess function parameter 'rw' description in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:3055: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_0p'
 drivers/block/drbd/drbd_receiver.c:3138: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_1p'
 drivers/block/drbd/drbd_receiver.c:3195: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_2p'
 drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'peer_device' not described in 'receive_bitmap_plain'
 drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'size' not described in 'receive_bitmap_plain'
 drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'p' not described in 'receive_bitmap_plain'
 drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'c' not described in 'receive_bitmap_plain'
 drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'peer_device' not described in 'recv_bm_rle_bits'
 drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'p' not described in 'recv_bm_rle_bits'
 drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'c' not described in 'recv_bm_rle_bits'
 drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'len' not described in 'recv_bm_rle_bits'
 drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'peer_device' not described in 'decode_bitmap_c'
 drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'p' not described in 'decode_bitmap_c'
 drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'c' not described in 'decode_bitmap_c'
 drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'len' not described in 'decode_bitmap_c'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_receiver.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index c3f09a122f20c..89818a5e0ac67 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -242,9 +242,9 @@ static void conn_reclaim_net_peer_reqs(struct drbd_connection *connection)
 
 /**
  * drbd_alloc_pages() - Returns @number pages, retries forever (or until signalled)
- * @device:	DRBD device.
- * @number:	number of pages requested
- * @retry:	whether to retry, if not enough pages are available right now
+ * @peer_device:	DRBD device.
+ * @number:		number of pages requested
+ * @retry:		whether to retry, if not enough pages are available right now
  *
  * Tries to allocate number pages, first from our own page pool, then from
  * the kernel.
@@ -1352,7 +1352,7 @@ static void drbd_flush(struct drbd_connection *connection)
 
 /**
  * drbd_may_finish_epoch() - Applies an epoch_event to the epoch's state, eventually finishes it.
- * @device:	DRBD device.
+ * @connection:	DRBD connection.
  * @epoch:	Epoch object.
  * @ev:		Epoch event.
  */
@@ -1441,9 +1441,8 @@ max_allowed_wo(struct drbd_backing_dev *bdev, enum write_ordering_e wo)
 	return wo;
 }
 
-/**
+/*
  * drbd_bump_write_ordering() - Fall back to an other write ordering method
- * @connection:	DRBD connection.
  * @wo:		Write ordering method to try.
  */
 void drbd_bump_write_ordering(struct drbd_resource *resource, struct drbd_backing_dev *bdev,
@@ -1623,7 +1622,6 @@ static void drbd_issue_peer_wsame(struct drbd_device *device,
  * drbd_submit_peer_request()
  * @device:	DRBD device.
  * @peer_req:	peer request
- * @rw:		flag field, see bio->bi_opf
  *
  * May spread the pages to multiple bios,
  * depending on bio_add_page restrictions.
@@ -3048,7 +3046,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
 	return -EIO;
 }
 
-/**
+/*
  * drbd_asb_recover_0p  -  Recover after split-brain with no remaining primaries
  */
 static int drbd_asb_recover_0p(struct drbd_peer_device *peer_device) __must_hold(local)
@@ -3131,7 +3129,7 @@ static int drbd_asb_recover_0p(struct drbd_peer_device *peer_device) __must_hold
 	return rv;
 }
 
-/**
+/*
  * drbd_asb_recover_1p  -  Recover after split-brain with one remaining primary
  */
 static int drbd_asb_recover_1p(struct drbd_peer_device *peer_device) __must_hold(local)
@@ -3188,7 +3186,7 @@ static int drbd_asb_recover_1p(struct drbd_peer_device *peer_device) __must_hold
 	return rv;
 }
 
-/**
+/*
  * drbd_asb_recover_2p  -  Recover after split-brain with two remaining primaries
  */
 static int drbd_asb_recover_2p(struct drbd_peer_device *peer_device) __must_hold(local)
@@ -4672,7 +4670,7 @@ static int receive_sync_uuid(struct drbd_connection *connection, struct packet_i
 	return 0;
 }
 
-/**
+/*
  * receive_bitmap_plain
  *
  * Return 0 when done, 1 when another iteration is needed, and a negative error
@@ -4724,7 +4722,7 @@ static int dcbp_get_pad_bits(struct p_compressed_bm *p)
 	return (p->encoding >> 4) & 0x7;
 }
 
-/**
+/*
  * recv_bm_rle_bits
  *
  * Return 0 when done, 1 when another iteration is needed, and a negative error
@@ -4793,7 +4791,7 @@ recv_bm_rle_bits(struct drbd_peer_device *peer_device,
 	return (s != c->bm_bits);
 }
 
-/**
+/*
  * decode_bitmap_c
  *
  * Return 0 when done, 1 when another iteration is needed, and a negative error
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (4 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 05/11] block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-19 14:56   ` Arnd Bergmann
  2021-03-12 10:55 ` [PATCH 07/11] block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit Lee Jones
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

[P_RETRY_WRITE] is initialised more than once.

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_main.c: In function ‘cmdname’:
 drivers/block/drbd/drbd_main.c:3660:22: warning: initialized field overwritten [-Woverride-init]
 drivers/block/drbd/drbd_main.c:3660:22: note: (near initialization for ‘cmdnames[44]’)

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 25cd8a2f729db..69c9640d407df 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -3657,7 +3657,6 @@ const char *cmdname(enum drbd_packet cmd)
 		[P_RS_CANCEL]		= "RSCancel",
 		[P_CONN_ST_CHG_REQ]	= "conn_st_chg_req",
 		[P_CONN_ST_CHG_REPLY]	= "conn_st_chg_reply",
-		[P_RETRY_WRITE]		= "retry_write",
 		[P_PROTOCOL_UPDATE]	= "protocol_update",
 		[P_RS_THIN_REQ]         = "rs_thin_req",
 		[P_RS_DEALLOCATED]      = "rs_deallocated",
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/11] block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (5 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-12 10:55 ` [PATCH 08/11] block: drbd: drbd_main: Fix a bunch of function documentation discrepancies Lee Jones
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 from drivers/block/drbd/drbd_nl.c:24:
 drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_set_role’:
 drivers/block/drbd/drbd_nl.c:793:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]
 drivers/block/drbd/drbd_nl.c:795:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]
 drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_attach’:
 drivers/block/drbd/drbd_nl.c:1965:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]
 drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_connect’:
 drivers/block/drbd/drbd_nl.c:2690:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]
 drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_disconnect’:
 drivers/block/drbd/drbd_nl.c:2803:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_nl.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index bf7de4c7b96c1..31902304ddac7 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -790,9 +790,11 @@ int drbd_adm_set_role(struct sk_buff *skb, struct genl_info *info)
 	mutex_lock(&adm_ctx.resource->adm_mutex);
 
 	if (info->genlhdr->cmd == DRBD_ADM_PRIMARY)
-		retcode = drbd_set_role(adm_ctx.device, R_PRIMARY, parms.assume_uptodate);
+		retcode = (enum drbd_ret_code)drbd_set_role(adm_ctx.device,
+						R_PRIMARY, parms.assume_uptodate);
 	else
-		retcode = drbd_set_role(adm_ctx.device, R_SECONDARY, 0);
+		retcode = (enum drbd_ret_code)drbd_set_role(adm_ctx.device,
+						R_SECONDARY, 0);
 
 	mutex_unlock(&adm_ctx.resource->adm_mutex);
 	genl_lock();
@@ -1962,7 +1964,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
 	drbd_flush_workqueue(&connection->sender_work);
 
 	rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE);
-	retcode = rv;  /* FIXME: Type mismatch. */
+	retcode = (enum drbd_ret_code)rv;
 	drbd_resume_io(device);
 	if (rv < SS_SUCCESS)
 		goto fail;
@@ -2687,7 +2689,8 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
 	}
 	rcu_read_unlock();
 
-	retcode = conn_request_state(connection, NS(conn, C_UNCONNECTED), CS_VERBOSE);
+	retcode = (enum drbd_ret_code)conn_request_state(connection,
+					NS(conn, C_UNCONNECTED), CS_VERBOSE);
 
 	conn_reconfig_done(connection);
 	mutex_unlock(&adm_ctx.resource->adm_mutex);
@@ -2800,7 +2803,7 @@ int drbd_adm_disconnect(struct sk_buff *skb, struct genl_info *info)
 	mutex_lock(&adm_ctx.resource->adm_mutex);
 	rv = conn_try_disconnect(connection, parms.force_disconnect);
 	if (rv < SS_SUCCESS)
-		retcode = rv;  /* FIXME: Type mismatch. */
+		retcode = (enum drbd_ret_code)rv;
 	else
 		retcode = NO_ERROR;
 	mutex_unlock(&adm_ctx.resource->adm_mutex);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/11] block: drbd: drbd_main: Fix a bunch of function documentation discrepancies
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (6 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 07/11] block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-12 10:55 ` [PATCH 09/11] block: drbd: drbd_receiver: Demote less than half complete kernel-doc header Lee Jones
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_main.c:278: warning: Function parameter or member 'connection' not described in 'tl_clear'
 drivers/block/drbd/drbd_main.c:278: warning: Excess function parameter 'device' description in 'tl_clear'
 drivers/block/drbd/drbd_main.c:489: warning: Function parameter or member 'cpu_mask' not described in 'drbd_calc_cpu_mask'
 drivers/block/drbd/drbd_main.c:528: warning: Excess function parameter 'device' description in 'drbd_thread_current_set_cpu'
 drivers/block/drbd/drbd_main.c:549: warning: Function parameter or member 'connection' not described in 'drbd_header_size'
 drivers/block/drbd/drbd_main.c:1204: warning: Function parameter or member 'device' not described in 'send_bitmap_rle_or_plain'
 drivers/block/drbd/drbd_main.c:1204: warning: Function parameter or member 'c' not described in 'send_bitmap_rle_or_plain'
 drivers/block/drbd/drbd_main.c:1335: warning: Function parameter or member 'peer_device' not described in '_drbd_send_ack'
 drivers/block/drbd/drbd_main.c:1335: warning: Excess function parameter 'device' description in '_drbd_send_ack'
 drivers/block/drbd/drbd_main.c:1379: warning: Function parameter or member 'peer_device' not described in 'drbd_send_ack'
 drivers/block/drbd/drbd_main.c:1379: warning: Excess function parameter 'device' description in 'drbd_send_ack'
 drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'connection' not described in 'drbd_send_all'
 drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'sock' not described in 'drbd_send_all'
 drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'buffer' not described in 'drbd_send_all'
 drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'size' not described in 'drbd_send_all'
 drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'msg_flags' not described in 'drbd_send_all'
 drivers/block/drbd/drbd_main.c:3525: warning: Function parameter or member 'flags' not described in 'drbd_queue_bitmap_io'
 drivers/block/drbd/drbd_main.c:3563: warning: Function parameter or member 'flags' not described in 'drbd_bitmap_io'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_main.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 69c9640d407df..2ca126bbbc377 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -268,7 +268,7 @@ void tl_restart(struct drbd_connection *connection, enum drbd_req_event what)
 
 /**
  * tl_clear() - Clears all requests and &struct drbd_tl_epoch objects out of the TL
- * @device:	DRBD device.
+ * @connection:	DRBD connection.
  *
  * This is called after the connection to the peer was lost. The storage covered
  * by the requests on the transfer gets marked as our of sync. Called from the
@@ -479,7 +479,7 @@ int conn_lowest_minor(struct drbd_connection *connection)
 }
 
 #ifdef CONFIG_SMP
-/**
+/*
  * drbd_calc_cpu_mask() - Generate CPU masks, spread over all CPUs
  *
  * Forces all threads of a resource onto the same CPU. This is beneficial for
@@ -518,7 +518,6 @@ static void drbd_calc_cpu_mask(cpumask_var_t *cpu_mask)
 
 /**
  * drbd_thread_current_set_cpu() - modifies the cpu mask of the _current_ thread
- * @device:	DRBD device.
  * @thi:	drbd_thread object
  *
  * call in the "main loop" of _all_ threads, no need for any mutex, current won't die
@@ -538,7 +537,7 @@ void drbd_thread_current_set_cpu(struct drbd_thread *thi)
 #define drbd_calc_cpu_mask(A) ({})
 #endif
 
-/**
+/*
  * drbd_header_size  -  size of a packet header
  *
  * The header size is a multiple of 8, so any payload following the header is
@@ -1193,7 +1192,7 @@ static int fill_bitmap_rle_bits(struct drbd_device *device,
 	return len;
 }
 
-/**
+/*
  * send_bitmap_rle_or_plain
  *
  * Return 0 when done, 1 when another iteration is needed, and a negative error
@@ -1324,11 +1323,11 @@ void drbd_send_b_ack(struct drbd_connection *connection, u32 barrier_nr, u32 set
 
 /**
  * _drbd_send_ack() - Sends an ack packet
- * @device:	DRBD device.
- * @cmd:	Packet command code.
- * @sector:	sector, needs to be in big endian byte order
- * @blksize:	size in byte, needs to be in big endian byte order
- * @block_id:	Id, big endian byte order
+ * @peer_device:	DRBD peer device.
+ * @cmd:		Packet command code.
+ * @sector:		sector, needs to be in big endian byte order
+ * @blksize:		size in byte, needs to be in big endian byte order
+ * @block_id:		Id, big endian byte order
  */
 static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet cmd,
 			  u64 sector, u32 blksize, u64 block_id)
@@ -1370,9 +1369,9 @@ void drbd_send_ack_rp(struct drbd_peer_device *peer_device, enum drbd_packet cmd
 
 /**
  * drbd_send_ack() - Sends an ack packet
- * @device:	DRBD device
- * @cmd:	packet command code
- * @peer_req:	peer request
+ * @peer_device:	DRBD peer device
+ * @cmd:		packet command code
+ * @peer_req:		peer request
  */
 int drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet cmd,
 		  struct drbd_peer_request *peer_req)
@@ -1882,7 +1881,7 @@ int drbd_send(struct drbd_connection *connection, struct socket *sock,
 	return sent;
 }
 
-/**
+/*
  * drbd_send_all  -  Send an entire buffer
  *
  * Returns 0 upon success and a negative error value otherwise.
@@ -3509,6 +3508,7 @@ static int w_bitmap_io(struct drbd_work *w, int unused)
  * @io_fn:	IO callback to be called when bitmap IO is possible
  * @done:	callback to be called after the bitmap IO was performed
  * @why:	Descriptive text of the reason for doing the IO
+ * @flags:	Bitmap flags
  *
  * While IO on the bitmap happens we freeze application IO thus we ensure
  * that drbd_set_out_of_sync() can not be called. This function MAY ONLY be
@@ -3554,6 +3554,7 @@ void drbd_queue_bitmap_io(struct drbd_device *device,
  * @device:	DRBD device.
  * @io_fn:	IO callback to be called when bitmap IO is possible
  * @why:	Descriptive text of the reason for doing the IO
+ * @flags:	Bitmap flags
  *
  * freezes application IO while that the actual IO operations runs. This
  * functions MAY NOT be called from worker context.
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/11] block: drbd: drbd_receiver: Demote less than half complete kernel-doc header
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (7 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 08/11] block: drbd: drbd_main: Fix a bunch of function documentation discrepancies Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-12 10:55 ` [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses Lee Jones
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'op' not described in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'op_flags' not described in 'drbd_submit_peer_request'
 drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'fault_type' not described in 'drbd_submit_peer_request'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_receiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 89818a5e0ac67..7a32185347247 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1618,7 +1618,7 @@ static void drbd_issue_peer_wsame(struct drbd_device *device,
 }
 
 
-/**
+/*
  * drbd_submit_peer_request()
  * @device:	DRBD device.
  * @peer_req:	peer request
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (8 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 09/11] block: drbd: drbd_receiver: Demote less than half complete kernel-doc header Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-04-06  9:09   ` Roger Pau Monné
  2021-03-12 10:55 ` [PATCH 11/11] block: drbd: drbd_nl: Demote half-complete kernel-doc headers Lee Jones
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Konrad Rzeszutek Wilk, Roger Pau Monné,
	Boris Ostrovsky, Juergen Gross, Stefano Stabellini, Jens Axboe,
	xen-devel, linux-block

Fixes the following W=1 kernel build warning(s):

 drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'dev' not described in 'blkfront_probe'
 drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'id' not described in 'blkfront_probe'
 drivers/block/xen-blkfront.c:1960: warning: expecting prototype for Allocate the basic(). Prototype was for blkfront_probe() instead
 drivers/block/xen-blkfront.c:2085: warning: Function parameter or member 'dev' not described in 'blkfront_resume'
 drivers/block/xen-blkfront.c:2085: warning: expecting prototype for or a backend(). Prototype was for blkfront_resume() instead
 drivers/block/xen-blkfront.c:2444: warning: wrong kernel-doc identifier on line:

Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: xen-devel@lists.xenproject.org
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/xen-blkfront.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index e1c6798889f48..e57e3cd354fb8 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1949,7 +1949,7 @@ module_param(feature_persistent, bool, 0644);
 MODULE_PARM_DESC(feature_persistent,
 		"Enables the persistent grants feature");
 
-/**
+/*
  * Entry point to this code when a new device is created.  Allocate the basic
  * structures and the ring buffer for communication with the backend, and
  * inform the backend of the appropriate details for those.  Switch to
@@ -2075,7 +2075,7 @@ static int blkif_recover(struct blkfront_info *info)
 	return 0;
 }
 
-/**
+/*
  * We are reconnecting to the backend, due to a suspend/resume, or a backend
  * driver restart.  We tear down our blkif structure and recreate it, but
  * leave the device-layer structures intact so that this is transparent to the
@@ -2440,7 +2440,7 @@ static void blkfront_connect(struct blkfront_info *info)
 	return;
 }
 
-/**
+/*
  * Callback received when the backend's state changes.
  */
 static void blkback_changed(struct xenbus_device *dev,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/11] block: drbd: drbd_nl: Demote half-complete kernel-doc headers
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (9 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses Lee Jones
@ 2021-03-12 10:55 ` Lee Jones
  2021-03-30 13:21 ` [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
  2021-04-06 15:22 ` Jens Axboe
  12 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-03-12 10:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

Fixes the following W=1 kernel build warning(s):

 from drivers/block/drbd/drbd_nl.c:24:
 drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_attach’:
 drivers/block/drbd/drbd_nl.c:1968:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion]
 drivers/block/drbd/drbd_nl.c:930: warning: Function parameter or member 'flags' not described in 'drbd_determine_dev_size'
 drivers/block/drbd/drbd_nl.c:930: warning: Function parameter or member 'rs' not described in 'drbd_determine_dev_size'
 drivers/block/drbd/drbd_nl.c:1148: warning: Function parameter or member 'dc' not described in 'drbd_check_al_size'

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/block/drbd/drbd_nl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 31902304ddac7..e7d0e637e6321 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -918,7 +918,7 @@ void drbd_resume_io(struct drbd_device *device)
 		wake_up(&device->misc_wait);
 }
 
-/**
+/*
  * drbd_determine_dev_size() -  Sets the right device size obeying all constraints
  * @device:	DRBD device.
  *
@@ -1136,7 +1136,7 @@ drbd_new_dev_size(struct drbd_device *device, struct drbd_backing_dev *bdev,
 	return size;
 }
 
-/**
+/*
  * drbd_check_al_size() - Ensures that the AL is of the right size
  * @device:	DRBD device.
  *
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation
  2021-03-12 10:55 ` [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation Lee Jones
@ 2021-03-19 14:56   ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2021-03-19 14:56 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linux Kernel Mailing List, Philipp Reisner, Lars Ellenberg,
	Jens Axboe, drbd-dev, linux-block

On Fri, Mar 12, 2021 at 11:57 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> [P_RETRY_WRITE] is initialised more than once.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/block/drbd/drbd_main.c: In function ‘cmdname’:
>  drivers/block/drbd/drbd_main.c:3660:22: warning: initialized field overwritten [-Woverride-init]
>  drivers/block/drbd/drbd_main.c:3660:22: note: (near initialization for ‘cmdnames[44]’)
>
> Cc: Philipp Reisner <philipp.reisner@linbit.com>
> Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: drbd-dev@lists.linbit.com
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Looks correct. I had actually posted a slightly different fix last year,
but either one addresses the warning:

https://lore.kernel.org/lkml/20201026215043.3893318-1-arnd@kernel.org/

         Arnd

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/11] Rid W=1 warnings from Block
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (10 preceding siblings ...)
  2021-03-12 10:55 ` [PATCH 11/11] block: drbd: drbd_nl: Demote half-complete kernel-doc headers Lee Jones
@ 2021-03-30 13:21 ` Lee Jones
  2021-04-06  8:52   ` Lee Jones
  2021-04-06 15:22 ` Jens Axboe
  12 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2021-03-30 13:21 UTC (permalink / raw)
  To: linux-kernel, Boris Ostrovsky, drbd-dev, Jens Axboe,
	Joshua Morris, Juergen Gross, Konrad Rzeszutek Wilk,
	Lars Ellenberg, linux-block, Philip Kelleher, Philipp Reisner,
	Roger Pau Monné,
	Stefano Stabellini, xen-devel

On Fri, 12 Mar 2021, Lee Jones wrote:

> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> Lee Jones (11):
>   block: rsxx: core: Remove superfluous const qualifier
>   block: drbd: drbd_interval: Demote some kernel-doc abuses and fix
>     another header
>   block: mtip32xx: mtip32xx: Mark debugging variable 'start' as
>     __maybe_unused
>   block: drbd: drbd_state: Fix some function documentation issues
>   block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers
>   block: drbd: drbd_main: Remove duplicate field initialisation
>   block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
>   block: drbd: drbd_main: Fix a bunch of function documentation
>     discrepancies
>   block: drbd: drbd_receiver: Demote less than half complete kernel-doc
>     header
>   block: xen-blkfront: Demote kernel-doc abuses
>   block: drbd: drbd_nl: Demote half-complete kernel-doc headers

Would you like me to resubmit these?

>  drivers/block/drbd/drbd_interval.c |  8 +++++---
>  drivers/block/drbd/drbd_main.c     | 30 +++++++++++++++---------------
>  drivers/block/drbd/drbd_nl.c       | 17 ++++++++++-------
>  drivers/block/drbd/drbd_receiver.c | 26 ++++++++++++--------------
>  drivers/block/drbd/drbd_state.c    |  7 ++++---
>  drivers/block/mtip32xx/mtip32xx.c  |  2 +-
>  drivers/block/rsxx/core.c          |  2 +-
>  drivers/block/xen-blkfront.c       |  6 +++---
>  8 files changed, 51 insertions(+), 47 deletions(-)
> 
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: drbd-dev@lists.linbit.com
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Joshua Morris <josh.h.morris@us.ibm.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
> Cc: linux-block@vger.kernel.org
> Cc: Philip Kelleher <pjk1939@linux.ibm.com>
> Cc: Philipp Reisner <philipp.reisner@linbit.com>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: xen-devel@lists.xenproject.org

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/11] Rid W=1 warnings from Block
  2021-03-30 13:21 ` [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
@ 2021-04-06  8:52   ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-04-06  8:52 UTC (permalink / raw)
  To: linux-kernel, Boris Ostrovsky, drbd-dev, Jens Axboe,
	Joshua Morris, Juergen Gross, Konrad Rzeszutek Wilk,
	Lars Ellenberg, linux-block, Philip Kelleher, Philipp Reisner,
	Roger Pau Monné,
	Stefano Stabellini, xen-devel

On Tue, 30 Mar 2021, Lee Jones wrote:

> On Fri, 12 Mar 2021, Lee Jones wrote:
> 
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> > 
> > Lee Jones (11):
> >   block: rsxx: core: Remove superfluous const qualifier
> >   block: drbd: drbd_interval: Demote some kernel-doc abuses and fix
> >     another header
> >   block: mtip32xx: mtip32xx: Mark debugging variable 'start' as
> >     __maybe_unused
> >   block: drbd: drbd_state: Fix some function documentation issues
> >   block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers
> >   block: drbd: drbd_main: Remove duplicate field initialisation
> >   block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
> >   block: drbd: drbd_main: Fix a bunch of function documentation
> >     discrepancies
> >   block: drbd: drbd_receiver: Demote less than half complete kernel-doc
> >     header
> >   block: xen-blkfront: Demote kernel-doc abuses
> >   block: drbd: drbd_nl: Demote half-complete kernel-doc headers
> 
> Would you like me to resubmit these?

It's been 3.5 weeks since these were submitted.

We are now at -rc6, so these should be merged soon.

Is there anything you'd like me to do to help?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses
  2021-03-12 10:55 ` [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses Lee Jones
@ 2021-04-06  9:09   ` Roger Pau Monné
  0 siblings, 0 replies; 22+ messages in thread
From: Roger Pau Monné @ 2021-04-06  9:09 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	Juergen Gross, Stefano Stabellini, Jens Axboe, xen-devel,
	linux-block

On Fri, Mar 12, 2021 at 10:55:29AM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'dev' not described in 'blkfront_probe'
>  drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'id' not described in 'blkfront_probe'
>  drivers/block/xen-blkfront.c:1960: warning: expecting prototype for Allocate the basic(). Prototype was for blkfront_probe() instead
>  drivers/block/xen-blkfront.c:2085: warning: Function parameter or member 'dev' not described in 'blkfront_resume'
>  drivers/block/xen-blkfront.c:2085: warning: expecting prototype for or a backend(). Prototype was for blkfront_resume() instead
>  drivers/block/xen-blkfront.c:2444: warning: wrong kernel-doc identifier on line:
> 
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: xen-devel@lists.xenproject.org
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/11] Rid W=1 warnings from Block
  2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
                   ` (11 preceding siblings ...)
  2021-03-30 13:21 ` [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
@ 2021-04-06 15:22 ` Jens Axboe
  2021-04-06 15:32   ` Lee Jones
  12 siblings, 1 reply; 22+ messages in thread
From: Jens Axboe @ 2021-04-06 15:22 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Boris Ostrovsky, drbd-dev, Joshua Morris,
	Juergen Gross, Konrad Rzeszutek Wilk, Lars Ellenberg,
	linux-block, Philip Kelleher, Philipp Reisner,
	Roger Pau Monné,
	Stefano Stabellini, xen-devel

On 3/12/21 3:55 AM, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.

Applied 2-11, 1 is already in the my tree.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/11] Rid W=1 warnings from Block
  2021-04-06 15:22 ` Jens Axboe
@ 2021-04-06 15:32   ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-04-06 15:32 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-kernel, Boris Ostrovsky, drbd-dev, Joshua Morris,
	Juergen Gross, Konrad Rzeszutek Wilk, Lars Ellenberg,
	linux-block, Philip Kelleher, Philipp Reisner,
	Roger Pau Monné,
	Stefano Stabellini, xen-devel

On Tue, 06 Apr 2021, Jens Axboe wrote:

> On 3/12/21 3:55 AM, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> 
> Applied 2-11, 1 is already in the my tree.

Superstar, thanks Jens.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier
  2021-03-12 10:55 ` [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier Lee Jones
@ 2021-04-06 20:59   ` Bart Van Assche
  0 siblings, 0 replies; 22+ messages in thread
From: Bart Van Assche @ 2021-04-06 20:59 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Joshua Morris, Philip Kelleher, Jens Axboe, linux-block

On 3/12/21 2:55 AM, Lee Jones wrote:
> This function returns a const string.
> 
> The second const qualifier is not required.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/block/rsxx/core.c:395:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
> 
> Cc: Joshua Morris <josh.h.morris@us.ibm.com>
> Cc: Philip Kelleher <pjk1939@linux.ibm.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/block/rsxx/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
> index 5ac1881396afb..813b0a554d4a8 100644
> --- a/drivers/block/rsxx/core.c
> +++ b/drivers/block/rsxx/core.c
> @@ -392,7 +392,7 @@ static irqreturn_t rsxx_isr(int irq, void *pdata)
>  }
>  
>  /*----------------- Card Event Handler -------------------*/
> -static const char * const rsxx_card_state_to_str(unsigned int state)
> +static const char *rsxx_card_state_to_str(unsigned int state)
>  {
>  	static const char * const state_strings[] = {
>  		"Unknown", "Shutdown", "Starting", "Formatting",

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header
  2021-03-12 10:55 ` [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header Lee Jones
@ 2021-04-06 21:00   ` Bart Van Assche
  0 siblings, 0 replies; 22+ messages in thread
From: Bart Van Assche @ 2021-04-06 21:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Philipp Reisner, Lars Ellenberg, Jens Axboe,
	drbd-dev, linux-block

On 3/12/21 2:55 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> [ ... ]

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
  2021-03-12 10:55 ` [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused Lee Jones
@ 2021-04-06 21:01   ` Bart Van Assche
  2021-04-07  8:00     ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Bart Van Assche @ 2021-04-06 21:01 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Jens Axboe, linux-block

On 3/12/21 2:55 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_standby_immediate’:
>  drivers/block/mtip32xx/mtip32xx.c:1216:16: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]

Has it been verified that the compiler is wrong, or in other words that
this patch does not suppress a useful warning?

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
  2021-04-06 21:01   ` Bart Van Assche
@ 2021-04-07  8:00     ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2021-04-07  8:00 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-kernel, Jens Axboe, linux-block

On Tue, 06 Apr 2021, Bart Van Assche wrote:

> On 3/12/21 2:55 AM, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_standby_immediate’:
> >  drivers/block/mtip32xx/mtip32xx.c:1216:16: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]
> 
> Has it been verified that the compiler is wrong, or in other words that
> this patch does not suppress a useful warning?

Neither is true.

'start' is used, but only when debug is enabled.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-04-07  8:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 10:55 [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
2021-03-12 10:55 ` [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier Lee Jones
2021-04-06 20:59   ` Bart Van Assche
2021-03-12 10:55 ` [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header Lee Jones
2021-04-06 21:00   ` Bart Van Assche
2021-03-12 10:55 ` [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused Lee Jones
2021-04-06 21:01   ` Bart Van Assche
2021-04-07  8:00     ` Lee Jones
2021-03-12 10:55 ` [PATCH 04/11] block: drbd: drbd_state: Fix some function documentation issues Lee Jones
2021-03-12 10:55 ` [PATCH 05/11] block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers Lee Jones
2021-03-12 10:55 ` [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation Lee Jones
2021-03-19 14:56   ` Arnd Bergmann
2021-03-12 10:55 ` [PATCH 07/11] block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit Lee Jones
2021-03-12 10:55 ` [PATCH 08/11] block: drbd: drbd_main: Fix a bunch of function documentation discrepancies Lee Jones
2021-03-12 10:55 ` [PATCH 09/11] block: drbd: drbd_receiver: Demote less than half complete kernel-doc header Lee Jones
2021-03-12 10:55 ` [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses Lee Jones
2021-04-06  9:09   ` Roger Pau Monné
2021-03-12 10:55 ` [PATCH 11/11] block: drbd: drbd_nl: Demote half-complete kernel-doc headers Lee Jones
2021-03-30 13:21 ` [PATCH 00/11] Rid W=1 warnings from Block Lee Jones
2021-04-06  8:52   ` Lee Jones
2021-04-06 15:22 ` Jens Axboe
2021-04-06 15:32   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).