public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Michael Wang <yun.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] IB/core: Don't warn on no SA support in event handler
Date: Thu, 11 Jun 2015 01:03:04 -0400	[thread overview]
Message-ID: <1433998984.71666.148.camel@redhat.com> (raw)
In-Reply-To: <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]

On Wed, 2015-06-10 at 12:13 +0300, Moni Shoua wrote:
> Registering an event handler is done for a device. This device may have
> one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
> Therefore, warning from the event handler about a specific port that
> doesn't have SA cap is correct but pollutes the kernel log without a
> need.
> 
> Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks, applied.

> ---
>  drivers/infiniband/core/multicast.c | 2 +-
>  drivers/infiniband/core/sa_query.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
> index 605f20a..1244f02 100644
> --- a/drivers/infiniband/core/multicast.c
> +++ b/drivers/infiniband/core/multicast.c
> @@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
>  	int index;
>  
>  	dev = container_of(handler, struct mcast_device, event_handler);
> -	if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
> +	if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
>  		return;
>  
>  	index = event->element.port_num - dev->start_port;
> diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
> index 7f7c8c9..3d0b7b2 100644
> --- a/drivers/infiniband/core/sa_query.c
> +++ b/drivers/infiniband/core/sa_query.c
> @@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
>  		struct ib_sa_port *port =
>  			&sa_dev->port[event->element.port_num - sa_dev->start_port];
>  
> -		if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num)))
> +		if (!rdma_cap_ib_sa(handler->device, port->port_num))
>  			return;
>  
>  		spin_lock_irqsave(&port->ah_lock, flags);


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-06-11  5:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  9:13 [PATCH] IB/core: Don't warn on no SA support in event handler Moni Shoua
     [not found] ` <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-10 10:12   ` Michael Wang
     [not found]     ` <55780D8C.1070600-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2015-06-10 15:28       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373A8FE66CA-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-10 16:15           ` Weiny, Ira
     [not found]             ` <2807E5FD2F6FDA4886F6618EAC48510E11099957-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-11  7:48               ` Michael Wang
2015-06-11  5:03   ` Doug Ledford [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433998984.71666.148.camel@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yun.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox