Skip to content

Commit 6cdaf03

Browse files
fishilicodavem330
authored andcommitted
RDS: add __printf format attribute to error reporting functions
This is helpful to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d50736a commit 6cdaf03

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

net/rds/ib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ void rds_ib_conn_path_shutdown(struct rds_conn_path *cp);
333333
void rds_ib_state_change(struct sock *sk);
334334
int rds_ib_listen_init(void);
335335
void rds_ib_listen_stop(void);
336+
__printf(2, 3)
336337
void __rds_ib_conn_error(struct rds_connection *conn, const char *, ...);
337338
int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
338339
struct rdma_cm_event *event);

net/rds/rds.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ void __rds_conn_error(struct rds_connection *conn, const char *, ...);
688688
#define rds_conn_error(conn, fmt...) \
689689
__rds_conn_error(conn, KERN_WARNING "RDS: " fmt)
690690

691+
__printf(2, 3)
691692
void __rds_conn_path_error(struct rds_conn_path *cp, const char *, ...);
692693
#define rds_conn_path_error(cp, fmt...) \
693694
__rds_conn_path_error(cp, KERN_WARNING "RDS: " fmt)

0 commit comments

Comments
 (0)