File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -53,26 +53,25 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
5353 int fd ,
5454 enum drm_sched_priority priority )
5555{
56- struct file * filp = fget (fd );
56+ struct fd f = fdget (fd );
5757 struct amdgpu_fpriv * fpriv ;
5858 struct amdgpu_ctx * ctx ;
5959 uint32_t id ;
6060 int r ;
6161
62- if (!filp )
62+ if (!f . file )
6363 return - EINVAL ;
6464
65- r = amdgpu_file_to_fpriv (filp , & fpriv );
65+ r = amdgpu_file_to_fpriv (f . file , & fpriv );
6666 if (r ) {
67- fput ( filp );
67+ fdput ( f );
6868 return r ;
6969 }
7070
7171 idr_for_each_entry (& fpriv -> ctx_mgr .ctx_handles , ctx , id )
7272 amdgpu_ctx_priority_override (ctx , priority );
7373
74- fput (filp );
75-
74+ fdput (f );
7675 return 0 ;
7776}
7877
@@ -81,30 +80,30 @@ static int amdgpu_sched_context_priority_override(struct amdgpu_device *adev,
8180 unsigned ctx_id ,
8281 enum drm_sched_priority priority )
8382{
84- struct file * filp = fget (fd );
83+ struct fd f = fdget (fd );
8584 struct amdgpu_fpriv * fpriv ;
8685 struct amdgpu_ctx * ctx ;
8786 int r ;
8887
89- if (!filp )
88+ if (!f . file )
9089 return - EINVAL ;
9190
92- r = amdgpu_file_to_fpriv (filp , & fpriv );
91+ r = amdgpu_file_to_fpriv (f . file , & fpriv );
9392 if (r ) {
94- fput ( filp );
93+ fdput ( f );
9594 return r ;
9695 }
9796
9897 ctx = amdgpu_ctx_get (fpriv , ctx_id );
9998
10099 if (!ctx ) {
101- fput ( filp );
100+ fdput ( f );
102101 return - EINVAL ;
103102 }
104103
105104 amdgpu_ctx_priority_override (ctx , priority );
106105 amdgpu_ctx_put (ctx );
107- fput ( filp );
106+ fdput ( f );
108107
109108 return 0 ;
110109}
You can’t perform that action at this time.
0 commit comments