net: hinic: remove unused functions
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 21 Sep 2022 12:33:51 +0000 (20:33 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Sep 2022 00:41:26 +0000 (17:41 -0700)
hinic_hwdev_max_num_qpas() and hinic_msix_attr_get() are no longer called,
remove them. Also the macro HINIC_MSIX_ATTR_GET is also not called, remove
it.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h
drivers/net/ethernet/huawei/hinic/hinic_hw_if.c
drivers/net/ethernet/huawei/hinic/hinic_hw_if.h

index 641a20da6bb8dece53c3684e8bf606fb0b551e06..4239013a3817ea9d988f5ed6eb86838cdaafd24d 100644 (file)
@@ -1041,13 +1041,6 @@ void hinic_free_hwdev(struct hinic_hwdev *hwdev)
        hinic_free_hwif(hwdev->hwif);
 }
 
-int hinic_hwdev_max_num_qps(struct hinic_hwdev *hwdev)
-{
-       struct hinic_cap *nic_cap = &hwdev->nic_cap;
-
-       return nic_cap->max_qps;
-}
-
 /**
  * hinic_hwdev_num_qps - return the number QPs available for use
  * @hwdev: the NIC HW device
index afa7b5e9601ce249c9507a7f109e07422eca59ba..d2d89b0a5ef06a72d036f8e460dd2e6a534dd2bf 100644 (file)
@@ -566,8 +566,6 @@ struct hinic_hwdev *hinic_init_hwdev(struct pci_dev *pdev, struct devlink *devli
 
 void hinic_free_hwdev(struct hinic_hwdev *hwdev);
 
-int hinic_hwdev_max_num_qps(struct hinic_hwdev *hwdev);
-
 int hinic_hwdev_num_qps(struct hinic_hwdev *hwdev);
 
 struct hinic_sq *hinic_hwdev_get_sq(struct hinic_hwdev *hwdev, int i);
index fe91942ff86a8216dc76e132478549cbf832bfff..88567305d06e7b9f997bf5f6954a8a582a5f41a6 100644 (file)
@@ -57,39 +57,6 @@ int hinic_msix_attr_set(struct hinic_hwif *hwif, u16 msix_index,
        return 0;
 }
 
-/**
- * hinic_msix_attr_get - get message attribute of msix entry
- * @hwif: the HW interface of a pci function device
- * @msix_index: msix_index
- * @pending_limit: the maximum pending interrupt events (unit 8)
- * @coalesc_timer: coalesc period for interrupt (unit 8 us)
- * @lli_timer: replenishing period for low latency credit (unit 8 us)
- * @lli_credit_limit: maximum credits for low latency msix messages (unit 8)
- * @resend_timer: maximum wait for resending msix (unit coalesc period)
- *
- * Return 0 - Success, negative - Failure
- **/
-int hinic_msix_attr_get(struct hinic_hwif *hwif, u16 msix_index,
-                       u8 *pending_limit, u8 *coalesc_timer,
-                       u8 *lli_timer, u8 *lli_credit_limit,
-                       u8 *resend_timer)
-{
-       u32 addr, val;
-
-       if (!VALID_MSIX_IDX(&hwif->attr, msix_index))
-               return -EINVAL;
-
-       addr = HINIC_CSR_MSIX_CTRL_ADDR(msix_index);
-       val  = hinic_hwif_read_reg(hwif, addr);
-
-       *pending_limit    = HINIC_MSIX_ATTR_GET(val, PENDING_LIMIT);
-       *coalesc_timer    = HINIC_MSIX_ATTR_GET(val, COALESC_TIMER);
-       *lli_timer        = HINIC_MSIX_ATTR_GET(val, LLI_TIMER);
-       *lli_credit_limit = HINIC_MSIX_ATTR_GET(val, LLI_CREDIT);
-       *resend_timer     = HINIC_MSIX_ATTR_GET(val, RESEND_TIMER);
-       return 0;
-}
-
 /**
  * hinic_msix_attr_cnt_clear - clear message attribute counters for msix entry
  * @hwif: the HW interface of a pci function device
index c06f2253151e2f7cf36eac01d65099a79a59e4cb..3d588896a36772e39825a4202e062ff12e43a63b 100644 (file)
        (((u32)(val) & HINIC_MSIX_##member##_MASK) <<           \
         HINIC_MSIX_##member##_SHIFT)
 
-#define HINIC_MSIX_ATTR_GET(val, member)                        \
-       (((val) >> HINIC_MSIX_##member##_SHIFT) &               \
-        HINIC_MSIX_##member##_MASK)
-
 #define HINIC_MSIX_CNT_RESEND_TIMER_SHIFT                       29
 
 #define HINIC_MSIX_CNT_RESEND_TIMER_MASK                        0x1
@@ -269,11 +265,6 @@ int hinic_msix_attr_set(struct hinic_hwif *hwif, u16 msix_index,
                        u8 lli_timer_cfg, u8 lli_credit_limit,
                        u8 resend_timer);
 
-int hinic_msix_attr_get(struct hinic_hwif *hwif, u16 msix_index,
-                       u8 *pending_limit, u8 *coalesc_timer_cfg,
-                       u8 *lli_timer, u8 *lli_credit_limit,
-                       u8 *resend_timer);
-
 void hinic_set_msix_state(struct hinic_hwif *hwif, u16 msix_idx,
                          enum hinic_msix_state flag);