projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc034e5
)
NTB: correct ntb_peer_spad_read for case when callback is not supplied.
author
Steven Wahl
<Steve_Wahl@Dell.com>
Thu, 8 Dec 2016 17:02:28 +0000
(17:02 +0000)
committer
Jon Mason
<jdmason@kudzu.us>
Fri, 23 Dec 2016 21:10:50 +0000
(16:10 -0500)
Correct ntb_peer_spad_read for case when callback is not supplied
Signed-off-by: Steve Wahl <Steve.Wahl@dell.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
include/linux/ntb.h
patch
|
blob
|
history
diff --git
a/include/linux/ntb.h
b/include/linux/ntb.h
index
6f47562
..
816bd98
100644
(file)
--- 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);
}