* [PATCH 1/1] RDS: add __printf format attribute to error reporting functions
@ 2016-08-05 20:11 Nicolas Iooss
2016-08-05 20:32 ` Santosh Shilimkar
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2016-08-05 20:11 UTC (permalink / raw)
To: Santosh Shilimkar, David S. Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Nicolas Iooss
This is helpful to detect at compile-time errors related to format
strings.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux-oWGTIYur0i8@public.gmane.org>
---
net/rds/ib.h | 1 +
net/rds/rds.h | 1 +
2 files changed, 2 insertions(+)
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)
--
2.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] RDS: add __printf format attribute to error reporting functions
2016-08-05 20:11 [PATCH 1/1] RDS: add __printf format attribute to error reporting functions Nicolas Iooss
@ 2016-08-05 20:32 ` Santosh Shilimkar
0 siblings, 0 replies; 2+ messages in thread
From: Santosh Shilimkar @ 2016-08-05 20:32 UTC (permalink / raw)
To: Nicolas Iooss, David S. Miller; +Cc: netdev, linux-rdma, linux-kernel
On 8/5/2016 1:11 PM, Nicolas Iooss wrote:
> This is helpful to detect at compile-time errors related to format
> strings.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> ---
OK.
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-05 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 20:11 [PATCH 1/1] RDS: add __printf format attribute to error reporting functions Nicolas Iooss
2016-08-05 20:32 ` Santosh Shilimkar
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).