@@ -3034,9 +3034,9 @@ static ssize_t i915_perf_read(struct file *file,
30343034 struct i915_perf_stream * stream = file -> f_data ;
30353035#else
30363036 struct i915_perf_stream * stream = file -> private_data ;
3037- size_t offset = 0 ;
30383037#endif
30393038 struct i915_perf * perf = stream -> perf ;
3039+ size_t offset2 = 0 ;
30403040 int ret ;
30413041
30423042 /* To ensure it's handled consistently we simply treat all reads of a
@@ -3066,20 +3066,12 @@ static ssize_t i915_perf_read(struct file *file,
30663066 return ret ;
30673067
30683068 mutex_lock (& perf -> lock );
3069- #ifdef __NetBSD__
3070- ret = stream -> ops -> read (stream , buf , count , offset );
3071- #else
3072- ret = stream -> ops -> read (stream , buf , count , & offset );
3073- #endif
3069+ ret = stream -> ops -> read (stream , buf , count , & offset2 );
30743070 mutex_unlock (& perf -> lock );
3075- } while (!offset && !ret );
3071+ } while (!offset2 && !ret );
30763072 } else {
30773073 mutex_lock (& perf -> lock );
3078- #ifdef __NetBSD__
3079- ret = stream -> ops -> read (stream , buf , count , offset );
3080- #else
3081- ret = stream -> ops -> read (stream , buf , count , & offset );
3082- #endif
3074+ ret = stream -> ops -> read (stream , buf , count , & offset2 );
30833075 mutex_unlock (& perf -> lock );
30843076 }
30853077
0 commit comments