From 74dcba3589fc184c7118905eda22b3a4aaef95ff Mon Sep 17 00:00:00 2001 From: Aaron Sierra Date: Tue, 6 Dec 2016 19:09:16 -0600 Subject: NTB: correct ntb_spad_count comment typo The comment for ntb_spad_count incorrectly referred to ntb_mw_count. Signed-off-by: Aaron Sierra Acked-by: Allen Hubbe Signed-off-by: Jiri Kosina --- include/linux/ntb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/ntb.h') diff --git a/include/linux/ntb.h b/include/linux/ntb.h index 6f47562d477b..50a7dbe88cf3 100644 --- a/include/linux/ntb.h +++ b/include/linux/ntb.h @@ -896,7 +896,7 @@ static inline int ntb_spad_is_unsafe(struct ntb_dev *ntb) } /** - * ntb_mw_count() - get the number of scratchpads + * ntb_spad_count() - get the number of scratchpads * @ntb: NTB device context. * * Hardware and topology may support a different number of scratchpads. -- cgit v1.2.3 From 5c43c52d5fb6163120ae5d9a281c3b757ca6119c Mon Sep 17 00:00:00 2001 From: Steven Wahl Date: Thu, 8 Dec 2016 17:02:28 +0000 Subject: NTB: correct ntb_peer_spad_read for case when callback is not supplied. Correct ntb_peer_spad_read for case when callback is not supplied Signed-off-by: Steve Wahl Acked-by: Allen Hubbe Signed-off-by: Jon Mason --- include/linux/ntb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/ntb.h') diff --git a/include/linux/ntb.h b/include/linux/ntb.h index 6f47562d477b..816bd9835bee 100644 --- a/include/linux/ntb.h +++ b/include/linux/ntb.h @@ -968,6 +968,9 @@ static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx, */ static inline u32 ntb_peer_spad_read(struct ntb_dev *ntb, int idx) { + if (!ntb->ops->peer_spad_read) + return 0; + return ntb->ops->peer_spad_read(ntb, idx); } -- cgit v1.2.3