diff mbox series

[1/2] drm/ttm: fix the warning for hit_low and evict_low

Message ID 20250417093409.2242506-1-sunil.khatri@amd.com (mailing list archive)
State New
Headers show
Series [1/2] drm/ttm: fix the warning for hit_low and evict_low | expand

Commit Message

Sunil Khatri April 17, 2025, 9:34 a.m. UTC
fix the below warning messages:
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk'
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tvrtko Ursulin April 17, 2025, 11:31 a.m. UTC | #1
On 17/04/2025 10:34, Sunil Khatri wrote:
> fix the below warning messages:
> ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk'
> ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'
> 
> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 95b86003c50d..33fefdcc6323 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
>   	struct ttm_lru_walk walk;
>   	/** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
>   	gfp_t gfp_flags;
> -
> +	/** @hit_low: flag to mark low */
> +	/** @evict_low:  flag for low eviction */
>   	bool hit_low, evict_low;
>   };
>   

Hm, could you check if you could copy and adapt more detailed comments 
from struct ttm_bo_evict_walk?

	/** @try_low: Whether we should attempt to evict BO's with low 
watermark threshold */
	bool try_low;
	/** @hit_low: If we cannot evict a bo when @try_low is false (first 
pass) */
	bool hit_low;
};

Regards,

Tvrtko
Khatri, Sunil April 18, 2025, 7:46 a.m. UTC | #2
On 4/17/2025 5:01 PM, Tvrtko Ursulin wrote:
>
> On 17/04/2025 10:34, Sunil Khatri wrote:
>> fix the below warning messages:
>> ttm/ttm_bo.c:1098: warning: Function parameter or struct member 
>> 'hit_low' not described in 'ttm_bo_swapout_walk'
>> ttm/ttm_bo.c:1098: warning: Function parameter or struct member 
>> 'evict_low' not described in 'ttm_bo_swapout_walk'
>>
>> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
>> ---
>>   drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
>> index 95b86003c50d..33fefdcc6323 100644
>> --- a/drivers/gpu/drm/ttm/ttm_bo.c
>> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
>> @@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
>>       struct ttm_lru_walk walk;
>>       /** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
>>       gfp_t gfp_flags;
>> -
>> +    /** @hit_low: flag to mark low */
>> +    /** @evict_low:  flag for low eviction */
>>       bool hit_low, evict_low;
>>   };
>
> Hm, could you check if you could copy and adapt more detailed comments 
> from struct ttm_bo_evict_walk?
Even i doubt how to put it and i could not find that appropriate 
message. Let me add the original owner also for review if the comment 
could be made better.
Regards
Sunil Khatri
>
>     /** @try_low: Whether we should attempt to evict BO's with low 
> watermark threshold */
>     bool try_low;
>     /** @hit_low: If we cannot evict a bo when @try_low is false 
> (first pass) */
>     bool hit_low;
> };
>
> Regards,
>
> Tvrtko
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 95b86003c50d..33fefdcc6323 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1093,7 +1093,8 @@  struct ttm_bo_swapout_walk {
 	struct ttm_lru_walk walk;
 	/** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
 	gfp_t gfp_flags;
-
+	/** @hit_low: flag to mark low */
+	/** @evict_low:  flag for low eviction */
 	bool hit_low, evict_low;
 };