Skip to content

Commit c5bd853

Browse files
committed
drm/i915/gvt: remove unused type attributes
Only need to get attribute group instead of attributes and it has no use, so remove it. Reviewed-by: Yan Zhao <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1883e29 commit c5bd853

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

drivers/gpu/drm/i915/gvt/gvt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ static struct attribute_group *gvt_vgpu_type_groups[] = {
120120
[0 ... NR_MAX_INTEL_VGPU_TYPES - 1] = NULL,
121121
};
122122

123-
static bool intel_get_gvt_attrs(struct attribute ***type_attrs,
124-
struct attribute_group ***intel_vgpu_type_groups)
123+
static bool intel_get_gvt_attrs(struct attribute_group ***intel_vgpu_type_groups)
125124
{
126-
*type_attrs = gvt_type_attrs;
127125
*intel_vgpu_type_groups = gvt_vgpu_type_groups;
128126
return true;
129127
}

drivers/gpu/drm/i915/gvt/gvt.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,7 @@ struct intel_gvt_ops {
570570
void (*vgpu_deactivate)(struct intel_vgpu *);
571571
struct intel_vgpu_type *(*gvt_find_vgpu_type)(struct intel_gvt *gvt,
572572
const char *name);
573-
bool (*get_gvt_attrs)(struct attribute ***type_attrs,
574-
struct attribute_group ***intel_vgpu_type_groups);
573+
bool (*get_gvt_attrs)(struct attribute_group ***intel_vgpu_type_groups);
575574
int (*vgpu_query_plane)(struct intel_vgpu *vgpu, void *);
576575
int (*vgpu_get_dmabuf)(struct intel_vgpu *vgpu, unsigned int);
577576
int (*write_protect_handler)(struct intel_vgpu *, u64, void *,

drivers/gpu/drm/i915/gvt/kvmgt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,12 +1597,10 @@ static struct mdev_parent_ops intel_vgpu_ops = {
15971597

15981598
static int kvmgt_host_init(struct device *dev, void *gvt, const void *ops)
15991599
{
1600-
struct attribute **kvm_type_attrs;
16011600
struct attribute_group **kvm_vgpu_type_groups;
16021601

16031602
intel_gvt_ops = ops;
1604-
if (!intel_gvt_ops->get_gvt_attrs(&kvm_type_attrs,
1605-
&kvm_vgpu_type_groups))
1603+
if (!intel_gvt_ops->get_gvt_attrs(&kvm_vgpu_type_groups))
16061604
return -EFAULT;
16071605
intel_vgpu_ops.supported_type_groups = kvm_vgpu_type_groups;
16081606

0 commit comments

Comments
 (0)