Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457267 > unrolled thread

[PATCH 1/1] RDS: add __printf format attribute to error reporting functions

Started byNicolas Iooss <nicolas.iooss_linux@m4x.org>
First post2016-08-05 22:20 +0200
Last post2016-08-05 22:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] RDS: add __printf format attribute to error reporting functions Nicolas Iooss <nicolas.iooss_linux@m4x.org> - 2016-08-05 22:20 +0200
    Re: [PATCH 1/1] RDS: add __printf format attribute to error reporting  functions Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2016-08-05 22:40 +0200

#1457267 — [PATCH 1/1] RDS: add __printf format attribute to error reporting functions

FromNicolas Iooss <nicolas.iooss_linux@m4x.org>
Date2016-08-05 22:20 +0200
Subject[PATCH 1/1] RDS: add __printf format attribute to error reporting functions
Message-ID<s2TL3-3TQ-5@gated-at.bofh.it>
This is helpful to detect at compile-time errors related to format
strings.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.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

[toc] | [next] | [standalone]


#1457271 — Re: [PATCH 1/1] RDS: add __printf format attribute to error reporting functions

FromSantosh Shilimkar <santosh.shilimkar@oracle.com>
Date2016-08-05 22:40 +0200
SubjectRe: [PATCH 1/1] RDS: add __printf format attribute to error reporting functions
Message-ID<s2U4p-40L-5@gated-at.bofh.it>
In reply to#1457267
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>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web