driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I867RA CVE: NA
----------------------------------------------------------------------
Remove 'dev_state' since it is not in use.
Signed-off-by: Weili Qian qianweili@huawei.com Signed-off-by: JiangShui Yang yangjiangshui@h-partners.com --- drivers/crypto/hisilicon/qm.c | 12 ------------ drivers/misc/uacce/uacce.c | 10 ---------- include/linux/uacce.h | 1 - 3 files changed, 23 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index f428850a376d..1a39f3166a66 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -2571,17 +2571,6 @@ static long hisi_qm_uacce_ioctl(struct uacce_queue *q, unsigned int cmd, return -EINVAL; }
-static enum uacce_dev_state hisi_qm_get_state(struct uacce_device *uacce) -{ - struct hisi_qm *qm = uacce->priv; - enum qm_state curr; - - curr = atomic_read(&qm->status.flags); - if (curr == QM_STOP) - return UACCE_DEV_ERR; - - return UACCE_DEV_NORMAL; -} static void qm_uacce_api_ver_init(struct hisi_qm *qm) { struct uacce_device *uacce = qm->uacce; @@ -2758,7 +2747,6 @@ static const struct uacce_ops uacce_qm_ops = { .stop_queue = hisi_qm_uacce_stop_queue, .mmap = hisi_qm_uacce_mmap, .ioctl = hisi_qm_uacce_ioctl, - .get_dev_state = hisi_qm_get_state, .is_q_updated = hisi_qm_is_q_updated, .get_isolate_state = hisi_qm_get_isolate_state, .isolate_err_threshold_write = hisi_qm_isolate_threshold_write, diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 7bdccfe6f5f9..687b7fad9a29 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -795,14 +795,6 @@ static ssize_t isolate_strategy_store(struct device *dev, struct device_attribut return count; }
-static ssize_t dev_state_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct uacce_device *uacce = to_uacce_device(dev); - - return sysfs_emit(buf, "%d\n", uacce->ops->get_dev_state(uacce)); -} - static ssize_t node_id_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -839,7 +831,6 @@ static DEVICE_ATTR_RO(region_mmio_size); static DEVICE_ATTR_RO(region_dus_size); static DEVICE_ATTR_RO(isolate); static DEVICE_ATTR_RW(isolate_strategy); -static DEVICE_ATTR_RO(dev_state); static DEVICE_ATTR_RO(numa_distance);
static struct attribute *uacce_dev_attrs[] = { @@ -852,7 +843,6 @@ static struct attribute *uacce_dev_attrs[] = { &dev_attr_region_dus_size.attr, &dev_attr_isolate.attr, &dev_attr_isolate_strategy.attr, - &dev_attr_dev_state.attr, &dev_attr_numa_distance.attr, NULL, }; diff --git a/include/linux/uacce.h b/include/linux/uacce.h index 07a96a771da9..fca9cb703e53 100644 --- a/include/linux/uacce.h +++ b/include/linux/uacce.h @@ -68,7 +68,6 @@ struct uacce_ops { enum uacce_dev_state (*get_isolate_state)(struct uacce_device *uacce); int (*isolate_err_threshold_write)(struct uacce_device *uacce, u32 num); u32 (*isolate_err_threshold_read)(struct uacce_device *uacce); - enum uacce_dev_state (*get_dev_state)(struct uacce_device *uacce); };
/**