From patchwork Sat Dec 21 01:40:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13917590 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EEEE1E89C; Sat, 21 Dec 2024 01:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745234; cv=none; b=PHCosQwzYXjrD5uYp+fLTVc24y8ErH8S71XBBZWoulo3O8IIrlba51nT9E7AKZY62n89ruljn11oorHNJDCR/eCebfeLH7fye7W/iDtxRlUMuC1QHA2J4QNccOjWCPpRUhdjmM0vdWNcTrpKkx74FMpD54d2Z6R02tS5+BQnJ6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745234; c=relaxed/simple; bh=AmNVM5IWh2Kce00IvhmYlzFrv98WbbkAXRoqyqh5SSc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IxoXYqPHT6nt2WHW/F+NRUToSHLh3h5Ax6hoIEHgM7AWCljnMYq8cgx1x+SS3SWRq7kIB1kRKvq5CAg2mQQA8gtF5h6xlXQk7i7QNtq6IZCiH3sk3oh45OCHa9X8rUBxhOVlJ6kZO/R4OtQcBOXEap07bAfJNGx2MMn2y2boqRA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=TQuegl27; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="TQuegl27" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=T//G2rCd97TI1u3JSZ4/q5jOgTeoWPeGWz1x8NI4gFw=; b=TQuegl27a7dLmBaf 300grBg46IKqLMDdN7Zol2TJNfAADLSgTcp9xqrIyh8RYC20mUwC+sDGsI4mDGSmnLMkIbcuHfu4n ZiAQmkZbHFIGKFw+mqtPKc4l5T1ajiLLDgQZymgdzgGfAadaE0RttZcc0YjQhzNbaKQtxSSmTC7aH zc7vCgCuiX9WGq3WXGGgzaozVXJNTjplYIEpJT5N+cD6Rlz5Z3754YIqz0Z6sY6elPhMbp0XEOyDI BvE4gbF2ZdFa1Xgl+E9z0l5udGkoW0s9C3QS59aw36CaYb/gl5d2NiMdhReKtqmUtytycS8GHPahO suPbf4/4BpCRFdRZsg==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tOoTj-006dmT-16; Sat, 21 Dec 2024 01:40:27 +0000 From: linux@treblig.org To: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 1/4] RDMA/core: Remove unused ib_ud_header_unpack Date: Sat, 21 Dec 2024 01:40:18 +0000 Message-ID: <20241221014021.343979-2-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241221014021.343979-1-linux@treblig.org> References: <20241221014021.343979-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" ib_ud_header_unpack() is unused, and I can't see any sign of it ever having been used in git. The only reference I can find is from December 2004 BKrev: 41d30034XNbBUl0XnyC6ig9V61Nf-A when it looks like it was added. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/infiniband/core/ud_header.c | 83 ----------------------------- include/rdma/ib_pack.h | 3 -- 2 files changed, 86 deletions(-) diff --git a/drivers/infiniband/core/ud_header.c b/drivers/infiniband/core/ud_header.c index 64d9c492de64..8d3dfef9ebaa 100644 --- a/drivers/infiniband/core/ud_header.c +++ b/drivers/infiniband/core/ud_header.c @@ -462,86 +462,3 @@ int ib_ud_header_pack(struct ib_ud_header *header, return len; } EXPORT_SYMBOL(ib_ud_header_pack); - -/** - * ib_ud_header_unpack - Unpack UD header struct from wire format - * @header:UD header struct - * @buf:Buffer to pack into - * - * ib_ud_header_pack() unpacks the UD header structure @header from wire - * format in the buffer @buf. - */ -int ib_ud_header_unpack(void *buf, - struct ib_ud_header *header) -{ - ib_unpack(lrh_table, ARRAY_SIZE(lrh_table), - buf, &header->lrh); - buf += IB_LRH_BYTES; - - if (header->lrh.link_version != 0) { - pr_warn("Invalid LRH.link_version %u\n", - header->lrh.link_version); - return -EINVAL; - } - - switch (header->lrh.link_next_header) { - case IB_LNH_IBA_LOCAL: - header->grh_present = 0; - break; - - case IB_LNH_IBA_GLOBAL: - header->grh_present = 1; - ib_unpack(grh_table, ARRAY_SIZE(grh_table), - buf, &header->grh); - buf += IB_GRH_BYTES; - - if (header->grh.ip_version != 6) { - pr_warn("Invalid GRH.ip_version %u\n", - header->grh.ip_version); - return -EINVAL; - } - if (header->grh.next_header != 0x1b) { - pr_warn("Invalid GRH.next_header 0x%02x\n", - header->grh.next_header); - return -EINVAL; - } - break; - - default: - pr_warn("Invalid LRH.link_next_header %u\n", - header->lrh.link_next_header); - return -EINVAL; - } - - ib_unpack(bth_table, ARRAY_SIZE(bth_table), - buf, &header->bth); - buf += IB_BTH_BYTES; - - switch (header->bth.opcode) { - case IB_OPCODE_UD_SEND_ONLY: - header->immediate_present = 0; - break; - case IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE: - header->immediate_present = 1; - break; - default: - pr_warn("Invalid BTH.opcode 0x%02x\n", header->bth.opcode); - return -EINVAL; - } - - if (header->bth.transport_header_version != 0) { - pr_warn("Invalid BTH.transport_header_version %u\n", - header->bth.transport_header_version); - return -EINVAL; - } - - ib_unpack(deth_table, ARRAY_SIZE(deth_table), - buf, &header->deth); - buf += IB_DETH_BYTES; - - if (header->immediate_present) - memcpy(&header->immediate_data, buf, sizeof header->immediate_data); - - return 0; -} -EXPORT_SYMBOL(ib_ud_header_unpack); diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h index b8c56d7dc35d..8266fab826a7 100644 --- a/include/rdma/ib_pack.h +++ b/include/rdma/ib_pack.h @@ -283,7 +283,4 @@ int ib_ud_header_init(int payload_bytes, int ib_ud_header_pack(struct ib_ud_header *header, void *buf); -int ib_ud_header_unpack(void *buf, - struct ib_ud_header *header); - #endif /* IB_PACK_H */ From patchwork Sat Dec 21 01:40:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13917587 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B006282EE; Sat, 21 Dec 2024 01:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745232; cv=none; b=aluqddDPxSgJawHpB6AUfR97uEPbRJslVTGte5DrcYlGtywIdQGEB9XLERjAET4jYtGEIgQ302udbTYWctKDnqk/xIyDcmN+dIj9OGE3nmGdrvzkmo9ZNrVaL+X0yCqjTAJZp2D+Hio2/jMTmssR9N6T9PosPt1Gu3vVUiBMFsg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745232; c=relaxed/simple; bh=59cATSC8tYG6qTczkafkxfKMcZ83dqEKLqp5g3yDhlM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T2OXx772je7K9nmTaGGCsIrZWg9TyEHmn2EbYz03AsiD/DXPX33j7I/2sEdv50Fi5xkkKt18nxJhEJAA6WlPlxsVZMdzlBjY8wFMlTfa1IpH3eF/IEq3VWaEHNexAbNhhSW4Yqaevtgms9RSYPTY8kRfnwckGTuNYVQx8UDk7mA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=Ifvc09ke; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="Ifvc09ke" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=/EYrkAQg5wWMF/k4iroqJWgKXPZPZyDZ6ZVafcGJAvo=; b=Ifvc09ke/KxQGu2V 4mHJ+iho7soxuawpW9GcO3yDBAtiljoAf+pMNDI3Y/g/8mYBedZmFk0DvhxnThTT8Xhiaty7bRWyA g1smLO8gNr/ifbl80PBZFZnW1SnHJZBYzoppqt7hwl4N2PkGaSyF1wZk4AJyunpIulC5LHqVOvglG FR006bo/nU7FSWXBB39OWE3SS9Ig3WnaysKwJp7NWkmnpBOIrWwRyYhfbKb6oxFXNwa3k4eQTc0VP p93USdueU1KyBz/icXSKyB83eNF51rE/TWQ4Co7QH4BNDrRzyt4AfTzAssXFUK9Pya/fMUz274zEV xv/5WFxx0PJH0YvuGA==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tOoTj-006dmT-3A; Sat, 21 Dec 2024 01:40:28 +0000 From: linux@treblig.org To: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 2/4] RDMA/core: Remove unused ib_find_exact_cached_pkey Date: Sat, 21 Dec 2024 01:40:19 +0000 Message-ID: <20241221014021.343979-3-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241221014021.343979-1-linux@treblig.org> References: <20241221014021.343979-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" The last use of ib_find_exact_cached_pkey() was removed in 2012 by commit 2c75d2ccb6e5 ("IB/mlx4: Fix QP1 P_Key processing in the Primary Physical Function (PPF)") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/infiniband/core/cache.c | 35 --------------------------------- include/rdma/ib_cache.h | 16 --------------- 2 files changed, 51 deletions(-) diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index b7c078b7f7cf..f8413f8a9f26 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -1127,41 +1127,6 @@ int ib_find_cached_pkey(struct ib_device *device, u32 port_num, } EXPORT_SYMBOL(ib_find_cached_pkey); -int ib_find_exact_cached_pkey(struct ib_device *device, u32 port_num, - u16 pkey, u16 *index) -{ - struct ib_pkey_cache *cache; - unsigned long flags; - int i; - int ret = -ENOENT; - - if (!rdma_is_port_valid(device, port_num)) - return -EINVAL; - - read_lock_irqsave(&device->cache_lock, flags); - - cache = device->port_data[port_num].cache.pkey; - if (!cache) { - ret = -EINVAL; - goto err; - } - - *index = -1; - - for (i = 0; i < cache->table_len; ++i) - if (cache->table[i] == pkey) { - *index = i; - ret = 0; - break; - } - -err: - read_unlock_irqrestore(&device->cache_lock, flags); - - return ret; -} -EXPORT_SYMBOL(ib_find_exact_cached_pkey); - int ib_get_cached_lmc(struct ib_device *device, u32 port_num, u8 *lmc) { unsigned long flags; diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index 226ae3702d8a..2bf09b594d10 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h @@ -63,22 +63,6 @@ int ib_find_cached_pkey(struct ib_device *device, u16 pkey, u16 *index); -/** - * ib_find_exact_cached_pkey - Returns the PKey table index where a specified - * PKey value occurs. Comparison uses the FULL 16 bits (incl membership bit) - * @device: The device to query. - * @port_num: The port number of the device to search for the PKey. - * @pkey: The PKey value to search for. - * @index: The index into the cached PKey table where the PKey was found. - * - * ib_find_exact_cached_pkey() searches the specified PKey table in - * the local software cache. - */ -int ib_find_exact_cached_pkey(struct ib_device *device, - u32 port_num, - u16 pkey, - u16 *index); - /** * ib_get_cached_lmc - Returns a cached lmc table entry * @device: The device to query. From patchwork Sat Dec 21 01:40:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13917588 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3283288DA; Sat, 21 Dec 2024 01:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745233; cv=none; b=DhzhKW5FutjoXfnXx9DWjBvoGm5RsHD6wlknJxOZjvO2uzQuKjxxssFUMjvrFuuZYrGzmrePfuZREiELQYTZHihE1snlFhm/DKb00nDvVsq7m5oZABhJnchp33sHOy52oUUawWnJabWIgy6JBcU8loTdxyhpbjcYvKxOinPDl90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745233; c=relaxed/simple; bh=t0wSe1vEXTJT7CrxQB22YzkGBxglSvHD+hEM7MF90EI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eXxAuKMuBBhMbfpuV1AbU4042rgk5rXPOey5jGZq2GsWxU7mU4IgXV27QGzJK+RnPm+pace2znG07X1Ji/kY/fqcI1QKI+iB5wrX4RVaXkMqomjqrhtFZiGAH+Db24ARlF8S4+6Mw18PiKAy24vcbJjoocZdKSB+UNx+DhKvbJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=r8mlntAC; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="r8mlntAC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=xBXnrMAGGAq3U5kaAcYKfGNI6duVEzIOO8CBeqvWFAY=; b=r8mlntACvuwjey8r MpHaX4/6nsIj8Idkgx2IWxJRktOpTbQdVOpwj0yxXITDhLUy+doVDtOo/kXhZNfqJfVc966uIE0yW vjs2U3NkjO4I1+NG1+LZXnI6j9OBItp/rtweV/NdJRWs4x5QjQsAola7y8RnEQD/zAcxnckM+MdDo 7Jwdv+beyDJpUUntNbUwiB87NBjTPoAAYTEydG9Q3mGw1ipPK2vyFc8sTH49itPwcod3ELltCiQGd xECN4sLYCm1gyZqqElllxKXN3BFPc3PpjF4IDr8taq1HCZdq1msXu6zcIDTW/4Z5ZXr+eb7dP0wtq NWXlBcUPMaVsDz0EZA==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tOoTk-006dmT-1k; Sat, 21 Dec 2024 01:40:28 +0000 From: linux@treblig.org To: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 3/4] RDMA/core: Remove unused ibdev_printk Date: Sat, 21 Dec 2024 01:40:20 +0000 Message-ID: <20241221014021.343979-4-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241221014021.343979-1-linux@treblig.org> References: <20241221014021.343979-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" The last use of ibdev_printk() was removed in 2019 by commit b2299e83815c ("RDMA: Delete DEBUG code") Remove it. Note: The __ibdev_printk() is still used in the idev_err etc functions so leave that. Signed-off-by: Dr. David Alan Gilbert --- drivers/infiniband/core/device.c | 17 ----------------- include/rdma/ib_verbs.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index ca9b956c034d..a74e192b5588 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -209,23 +209,6 @@ static void __ibdev_printk(const char *level, const struct ib_device *ibdev, printk("%s(NULL ib_device): %pV", level, vaf); } -void ibdev_printk(const char *level, const struct ib_device *ibdev, - const char *format, ...) -{ - struct va_format vaf; - va_list args; - - va_start(args, format); - - vaf.fmt = format; - vaf.va = &args; - - __ibdev_printk(level, ibdev, &vaf); - - va_end(args); -} -EXPORT_SYMBOL(ibdev_printk); - #define define_ibdev_printk_level(func, level) \ void func(const struct ib_device *ibdev, const char *fmt, ...) \ { \ diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 3417636da960..295c394ffb48 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -59,9 +59,6 @@ extern struct workqueue_struct *ib_comp_unbound_wq; struct ib_ucq_object; -__printf(3, 4) __cold -void ibdev_printk(const char *level, const struct ib_device *ibdev, - const char *format, ...); __printf(2, 3) __cold void ibdev_emerg(const struct ib_device *ibdev, const char *format, ...); __printf(2, 3) __cold From patchwork Sat Dec 21 01:40:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13917589 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12E412AF16; Sat, 21 Dec 2024 01:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745233; cv=none; b=YRqzuEaKeIbO5E8/zvO1ZrzHntID3s+NE3UrOXTHIFqZD7WqeuOQL9BgflD345Sw1ovUM8F9mlErEYQ0nB8uKYMTQQLL94w67j3KaZ+WnQ2Wtc1dyxgypMgkixaIWPJWSBH9GYxjm5gf9XJDzR+862oUBMw1OcNapoVllHGGTZM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734745233; c=relaxed/simple; bh=bbUHuIIiJDY1be55IxLZHg2oplHHF6t2SmPC6Qqqgho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hX2cRXzgj4mQTcNpP9YVX1vZ+TaYKnLKVLtHRaSv/TRSKQGf7nkuBskIPblQ5Hw4Ti8eodf6UsGgDVribXOcmSUIhd0134CyWqTjQsUPLX/dCc8vCqc/l/OfObUegvGSH0AW4p3iWozGjiDJ0HXgOVx7SoFfC1gMjNRJddsnpF4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=j6GFY9aN; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="j6GFY9aN" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=7mvzulzb+HhH+BBqrE2pES0KkxiCmlF0e03o5S4f2/0=; b=j6GFY9aN33KHHLCj ldsORg1cTXD220tC4JsmO3riCIqyvDvPBuatGIWkXJ2EvbQ6a0IGoU59yZXHkO97Gwfr/cpRnurhU 3JDWt59ykUHZrKXiZiJYaCOQXWYwPfHhzKuJVGrl241ovmdKKeVS007zrsYA36BJmAXNW5NW6rtFY lQQdTnuurSSopgqZZsaZzGn0YoO5b0zHsxDTJHPWNx9Jo66Trv98ScedMsZQf0hU1aUM4rJUjxCE7 QIeES5E7bhsVkirMp7PrF9DqouuKYrQtdwdBVTPFoo3NxY1ikCoGwj7lovdpdIFO/DkT7Pm5jJsir LJOXpxnMnk8SD1KDiA==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tOoTl-006dmT-0Y; Sat, 21 Dec 2024 01:40:29 +0000 From: linux@treblig.org To: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 4/4] RDMA/core: Remove unused ib_copy_path_rec_from_user Date: Sat, 21 Dec 2024 01:40:21 +0000 Message-ID: <20241221014021.343979-5-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241221014021.343979-1-linux@treblig.org> References: <20241221014021.343979-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Dr. David Alan Gilbert" ib_copy_path_rec_from_user() has been unused since 2019's commit a1a8e4a85cf7 ("rdma: Delete the ib_ucm module") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/infiniband/core/uverbs_marshall.c | 42 ----------------------- include/rdma/ib_marshall.h | 3 -- 2 files changed, 45 deletions(-) diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c index 11a080646916..e803f609ec87 100644 --- a/drivers/infiniband/core/uverbs_marshall.c +++ b/drivers/infiniband/core/uverbs_marshall.c @@ -171,45 +171,3 @@ void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst, __ib_copy_path_rec_to_user(dst, src); } EXPORT_SYMBOL(ib_copy_path_rec_to_user); - -void ib_copy_path_rec_from_user(struct sa_path_rec *dst, - struct ib_user_path_rec *src) -{ - u32 slid, dlid; - - memset(dst, 0, sizeof(*dst)); - if ((ib_is_opa_gid((union ib_gid *)src->sgid)) || - (ib_is_opa_gid((union ib_gid *)src->dgid))) { - dst->rec_type = SA_PATH_REC_TYPE_OPA; - slid = opa_get_lid_from_gid((union ib_gid *)src->sgid); - dlid = opa_get_lid_from_gid((union ib_gid *)src->dgid); - } else { - dst->rec_type = SA_PATH_REC_TYPE_IB; - slid = ntohs(src->slid); - dlid = ntohs(src->dlid); - } - memcpy(dst->dgid.raw, src->dgid, sizeof dst->dgid); - memcpy(dst->sgid.raw, src->sgid, sizeof dst->sgid); - - sa_path_set_dlid(dst, dlid); - sa_path_set_slid(dst, slid); - sa_path_set_raw_traffic(dst, src->raw_traffic); - dst->flow_label = src->flow_label; - dst->hop_limit = src->hop_limit; - dst->traffic_class = src->traffic_class; - dst->reversible = src->reversible; - dst->numb_path = src->numb_path; - dst->pkey = src->pkey; - dst->sl = src->sl; - dst->mtu_selector = src->mtu_selector; - dst->mtu = src->mtu; - dst->rate_selector = src->rate_selector; - dst->rate = src->rate; - dst->packet_life_time = src->packet_life_time; - dst->preference = src->preference; - dst->packet_life_time_selector = src->packet_life_time_selector; - - /* TODO: No need to set this */ - sa_path_set_dmac_zero(dst); -} -EXPORT_SYMBOL(ib_copy_path_rec_from_user); diff --git a/include/rdma/ib_marshall.h b/include/rdma/ib_marshall.h index 1838869aad28..b179e464e3d1 100644 --- a/include/rdma/ib_marshall.h +++ b/include/rdma/ib_marshall.h @@ -22,7 +22,4 @@ void ib_copy_ah_attr_to_user(struct ib_device *device, void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst, struct sa_path_rec *src); -void ib_copy_path_rec_from_user(struct sa_path_rec *dst, - struct ib_user_path_rec *src); - #endif /* IB_USER_MARSHALL_H */