* [PATCH] NTB: correct ntb_peer_spad_read for case when callback is not supplied. [not found] <2a1282ae9ad64a34b4795541a2c290b5@mspexmb1.Beer.Town> @ 2016-12-08 17:02 ` Steven Wahl 2016-12-08 17:16 ` Allen Hubbe 0 siblings, 1 reply; 3+ messages in thread From: Steven Wahl @ 2016-12-08 17:02 UTC (permalink / raw) To: linux-ntb@googlegroups.com Signed-off-by: Steve Wahl <Steve.Wahl@dell.com> --- include/linux/ntb.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/ntb.h b/include/linux/ntb.h index 6f47562..816bd98 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); } -- 2.7.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] NTB: correct ntb_peer_spad_read for case when callback is not supplied. 2016-12-08 17:02 ` [PATCH] NTB: correct ntb_peer_spad_read for case when callback is not supplied Steven Wahl @ 2016-12-08 17:16 ` Allen Hubbe 2016-12-21 16:40 ` Jon Mason 0 siblings, 1 reply; 3+ messages in thread From: Allen Hubbe @ 2016-12-08 17:16 UTC (permalink / raw) To: Wahl, Steve, linux-ntb From: Steven Wahl > > Signed-off-by: Steve Wahl <Steve.Wahl@dell.com> The only thing lacking here is a commit comment, but the change is self-explanatory. Thanks! Acked-by: Allen Hubbe <Allen.Hubbe@dell.com> > --- > include/linux/ntb.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > index 6f47562..816bd98 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); > } > > -- > 2.7.4 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NTB: correct ntb_peer_spad_read for case when callback is not supplied. 2016-12-08 17:16 ` Allen Hubbe @ 2016-12-21 16:40 ` Jon Mason 0 siblings, 0 replies; 3+ messages in thread From: Jon Mason @ 2016-12-21 16:40 UTC (permalink / raw) To: Allen Hubbe; +Cc: Wahl, Steve, linux-ntb On Thu, Dec 08, 2016 at 12:16:57PM -0500, Allen Hubbe wrote: > From: Steven Wahl > > > > Signed-off-by: Steve Wahl <Steve.Wahl@dell.com> > > The only thing lacking here is a commit comment, but the change is self-explanatory. Thanks! > > Acked-by: Allen Hubbe <Allen.Hubbe@dell.com> This didn't apply cleanly for some reason. I hand applied it, as it was a simple patch and duplicated the title into the body of the commit. Thanks, Jon > > > --- > > include/linux/ntb.h | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/include/linux/ntb.h b/include/linux/ntb.h > > index 6f47562..816bd98 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); > > } > > > > -- > > 2.7.4 > > -- > You received this message because you are subscribed to the Google Groups "linux-ntb" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+unsubscribe@googlegroups.com. > To post to this group, send email to linux-ntb@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/002101d25176%24e14ac450%24a3e04cf0%24%40dell.com. > For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-21 16:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <2a1282ae9ad64a34b4795541a2c290b5@mspexmb1.Beer.Town>
2016-12-08 17:02 ` [PATCH] NTB: correct ntb_peer_spad_read for case when callback is not supplied Steven Wahl
2016-12-08 17:16 ` Allen Hubbe
2016-12-21 16:40 ` Jon Mason
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox