Rid W=1 warnings from Block
Subsystems (4)
cover Rid W=1 warnings from Block
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(-)
Signature · 1 line
2.27.0
PATCH 1/11 block: rsxx: core: Remove superfluous const qualifier
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]
--- drivers/block/rsxx/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/rsxx/core.c +1 -1
@@ -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" ,
Signature · 1 line
2.27.0
Re: [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier
Quoted 22 lines · Lee Jones
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 <[email protected]>Cc Philip Kelleher <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/block/rsxx/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/block/rsxx/core.c +0
-0
drivers/block/rsxx/core.c static irqreturn_t rsxx_isr(int irq, void *pdata) · line 398
Quoted 8 lines
drivers/block/rsxx/core.c +1
-1@@ -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" ,
PATCH 2/11 block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_interval.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/block/drbd/drbd_interval.c +5 -3
@@ -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 *
Signature · 1 line
2.27.0
Re: [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header
Quoted 2 lines · Lee Jones
Fixes the following W=1 kernel build warning(s):
[ ... ]
PATCH 3/11 block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
In reply to Lee JonesFixes 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]
--- drivers/block/mtip32xx/mtip32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/mtip32xx/mtip32xx.c +1 -1
@@ -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. */
Signature · 1 line
2.27.0
Re: [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
Quoted 4 lines · Lee Jones
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.
Re: [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused
Quoted 8 lines · Bart Van Assche
Quoted 4 lines · Lee Jones
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 4/11 block: drbd: drbd_state: Fix some function documentation issues
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_state.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/block/drbd/drbd_state.c +4 -3
@@ -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,
Signature · 1 line
2.27.0
PATCH 5/11 block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_receiver.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
drivers/block/drbd/drbd_receiver.c +11 -13
@@ -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 packetreturn -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_holdreturn 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_holdreturn 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_ireturn 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
Signature · 1 line
2.27.0
PATCH 6/11 block: drbd: drbd_main: Remove duplicate field initialisation
In reply to Lee Jones[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]’)
--- drivers/block/drbd/drbd_main.c | 1 - 1 file changed, 1 deletion(-)
drivers/block/drbd/drbd_main.c +0 -1
@@ -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",
Signature · 1 line
2.27.0
Re: [PATCH 06/11] block: drbd: drbd_main: Remove duplicate field initialisation
Quoted 9 lines · Lee Jones
[
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]’)
Quoted 6 lines
Cc Philipp Reisner <[email protected]>Cc Lars Ellenberg <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Lee Jones <[email protected]>
Looks correct. I had actually posted a slightly different fix last year, but either one addresses the warning:
https://lore.kernel.org/lkml/[email protected]/
Arnd
PATCH 7/11 block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
In reply to Lee JonesFixes 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]
--- drivers/block/drbd/drbd_nl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/block/drbd/drbd_nl.c +8 -5
@@ -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);
Signature · 1 line
2.27.0
PATCH 8/11 block: drbd: drbd_main: Fix a bunch of function documentation discrepancies
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_main.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-)
drivers/block/drbd/drbd_main.c +15 -14
@@ -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.
Signature · 1 line
2.27.0
PATCH 9/11 block: drbd: drbd_receiver: Demote less than half complete kernel-doc header
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_receiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/drbd/drbd_receiver.c +1 -1
@@ -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
Signature · 1 line
2.27.0
PATCH 10/11 block: xen-blkfront: Demote kernel-doc abuses
In reply to Lee JonesFixes 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:
--- drivers/block/xen-blkfront.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/block/xen-blkfront.c +3 -3
@@ -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,
Signature · 1 line
2.27.0
Re: [PATCH 10/11] block: xen-blkfront: Demote kernel-doc abuses
Quoted 9 lines · Lee Jones
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 thebasic(). Prototype was forblkfront_probe()insteaddrivers/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 abackend(). Prototype was forblkfront_resume()insteaddrivers/block/xen-blkfront.c:2444: warning: wrong kernel-doc identifier on line:
Quoted 9 lines
Cc Konrad Rzeszutek Wilk <[email protected]>Cc "Roger Pau Monné" <[email protected]>Cc Boris Ostrovsky <[email protected]>Cc Juergen Gross <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Lee Jones <[email protected]>
Thanks, Roger.
PATCH 11/11 block: drbd: drbd_nl: Demote half-complete kernel-doc headers
In reply to Lee JonesFixes 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'
--- drivers/block/drbd/drbd_nl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/drbd/drbd_nl.c +2 -2
@@ -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. *
Signature · 1 line
2.27.0
Quoted 4 lines · Lee Jones
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.
Quoted 16 lines
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 'enumdrbd_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?
Quoted 23 lines
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 <[email protected]>Cc Jens Axboe <[email protected]>Cc Joshua Morris <[email protected]>Cc Juergen Gross <[email protected]>Cc Konrad Rzeszutek Wilk <[email protected]>Cc Lars Ellenberg <[email protected]>Cc Philip Kelleher <[email protected]>Cc Philipp Reisner <[email protected]>Cc "Roger Pau Monné" <[email protected]>Cc Stefano Stabellini <[email protected]>
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 23 lines · Lee Jones
Quoted 4 lines · Lee Jones
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.
Quoted 16 lines
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 'enumdrbd_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
Quoted 1 line
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?
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jens Axboe
maintainerQuoted 3 lines · Lee Jones
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.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 3 lines · Lee Jones
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog