From: Nicolas Iooss Date: Fri, 5 Aug 2016 20:11:12 +0000 (+0200) Subject: RDS: add __printf format attribute to error reporting functions X-Git-Tag: MMI-PSA29.97-13-9~6950^2~136 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cdaf03f8c23fcbfe7d4fa6876e114193bb6b632;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller --- diff --git a/net/rds/ib.h b/net/rds/ib.h index 046f7508c06b..45ac8e8e58f4 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h @@ -333,6 +333,7 @@ void rds_ib_conn_path_shutdown(struct rds_conn_path *cp); void rds_ib_state_change(struct sock *sk); int rds_ib_listen_init(void); void rds_ib_listen_stop(void); +__printf(2, 3) void __rds_ib_conn_error(struct rds_connection *conn, const char *, ...); int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id, struct rdma_cm_event *event); diff --git a/net/rds/rds.h b/net/rds/rds.h index b2d17f0fafa8..fd0bccb2f9f9 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h @@ -688,6 +688,7 @@ void __rds_conn_error(struct rds_connection *conn, const char *, ...); #define rds_conn_error(conn, fmt...) \ __rds_conn_error(conn, KERN_WARNING "RDS: " fmt) +__printf(2, 3) void __rds_conn_path_error(struct rds_conn_path *cp, const char *, ...); #define rds_conn_path_error(cp, fmt...) \ __rds_conn_path_error(cp, KERN_WARNING "RDS: " fmt)