Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] RDMA/core: remove err in iw_query_port
@ 2020-01-09 13:40 jgq516
  2020-01-10 15:23 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: jgq516 @ 2020-01-09 13:40 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, Guoqing Jiang

From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>

Since we can return device->ops.query_port directly, so no need
to keep those lines.

Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
---
 drivers/infiniband/core/device.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 2dd2cfe9b561..51ab6d31fbf4 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1979,7 +1979,6 @@ static int iw_query_port(struct ib_device *device,
 {
 	struct in_device *inetdev;
 	struct net_device *netdev;
-	int err;
 
 	memset(port_attr, 0, sizeof(*port_attr));
 
@@ -2010,11 +2009,7 @@ static int iw_query_port(struct ib_device *device,
 	}
 
 	dev_put(netdev);
-	err = device->ops.query_port(device, port_num, port_attr);
-	if (err)
-		return err;
-
-	return 0;
+	return device->ops.query_port(device, port_num, port_attr);
 }
 
 static int __ib_query_port(struct ib_device *device,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/core: remove err in iw_query_port
  2020-01-09 13:40 [PATCH] RDMA/core: remove err in iw_query_port jgq516
@ 2020-01-10 15:23 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-01-10 15:23 UTC (permalink / raw)
  To: jgq516; +Cc: dledford, linux-rdma, Guoqing Jiang

On Thu, Jan 09, 2020 at 02:40:43PM +0100, jgq516@gmail.com wrote:
> From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
> 
> Since we can return device->ops.query_port directly, so no need
> to keep those lines.
> 
> Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
> ---
>  drivers/infiniband/core/device.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 13:40 [PATCH] RDMA/core: remove err in iw_query_port jgq516
2020-01-10 15:23 ` Jason Gunthorpe

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git