]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/fungible: Remove unused fun_create_queue
authorDr. David Alan Gilbert <linux@treblig.org>
Sat, 16 Nov 2024 15:26:44 +0000 (15:26 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Nov 2024 02:54:11 +0000 (18:54 -0800)
fun_create_queue was added in 2022 by
commit e1ffcc66818f ("net/fungible: Add service module for Fungible
drivers")
but hasn't been used.

Remove it.

Also remove the static helper functions it was the only user of.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/fungible/funcore/fun_queue.c
drivers/net/ethernet/fungible/funcore/fun_queue.h

index 8ab9f68434f5ae3392ce8621e0a8d13fdbb868c9..d07ee3e4f52adef014d705e3e839216a0f4e684d 100644 (file)
@@ -482,43 +482,6 @@ free_funq:
        return NULL;
 }
 
-/* Create a funq's CQ on the device. */
-static int fun_create_cq(struct fun_queue *funq)
-{
-       struct fun_dev *fdev = funq->fdev;
-       unsigned int rqid;
-       int rc;
-
-       rqid = funq->cq_flags & FUN_ADMIN_EPCQ_CREATE_FLAG_RQ ?
-               funq->rqid : FUN_HCI_ID_INVALID;
-       rc = fun_cq_create(fdev, funq->cq_flags, funq->cqid, rqid,
-                          funq->cqe_size_log2, funq->cq_depth,
-                          funq->cq_dma_addr, 0, 0, funq->cq_intcoal_nentries,
-                          funq->cq_intcoal_usec, funq->cq_vector, 0, 0,
-                          &funq->cqid, &funq->cq_db);
-       if (!rc)
-               dev_dbg(fdev->dev, "created CQ %u\n", funq->cqid);
-
-       return rc;
-}
-
-/* Create a funq's SQ on the device. */
-static int fun_create_sq(struct fun_queue *funq)
-{
-       struct fun_dev *fdev = funq->fdev;
-       int rc;
-
-       rc = fun_sq_create(fdev, funq->sq_flags, funq->sqid, funq->cqid,
-                          funq->sqe_size_log2, funq->sq_depth,
-                          funq->sq_dma_addr, funq->sq_intcoal_nentries,
-                          funq->sq_intcoal_usec, funq->cq_vector, 0, 0,
-                          0, &funq->sqid, &funq->sq_db);
-       if (!rc)
-               dev_dbg(fdev->dev, "created SQ %u\n", funq->sqid);
-
-       return rc;
-}
-
 /* Create a funq's RQ on the device. */
 int fun_create_rq(struct fun_queue *funq)
 {
@@ -561,34 +524,6 @@ int fun_request_irq(struct fun_queue *funq, const char *devname,
        return rc;
 }
 
-/* Create all component queues of a funq  on the device. */
-int fun_create_queue(struct fun_queue *funq)
-{
-       int rc;
-
-       rc = fun_create_cq(funq);
-       if (rc)
-               return rc;
-
-       if (funq->rq_depth) {
-               rc = fun_create_rq(funq);
-               if (rc)
-                       goto release_cq;
-       }
-
-       rc = fun_create_sq(funq);
-       if (rc)
-               goto release_rq;
-
-       return 0;
-
-release_rq:
-       fun_destroy_sq(funq->fdev, funq->rqid);
-release_cq:
-       fun_destroy_cq(funq->fdev, funq->cqid);
-       return rc;
-}
-
 void fun_free_irq(struct fun_queue *funq)
 {
        if (funq->irq_handler) {
index 7fb53d0ae8b000b632544aa16931368213dd4a91..2d966afb187ad787daf41f6e8fab859edc30842c 100644 (file)
@@ -163,7 +163,6 @@ static inline void fun_set_cq_callback(struct fun_queue *funq, cq_callback_t cb,
 }
 
 int fun_create_rq(struct fun_queue *funq);
-int fun_create_queue(struct fun_queue *funq);
 
 void fun_free_irq(struct fun_queue *funq);
 int fun_request_irq(struct fun_queue *funq, const char *devname,