* [PATCH v1 0/2] drm/ttm: two small ttm_bo.c cleanups
@ 2026-08-18 16:09 Sean Chang
2026-08-18 16:09 ` [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry Sean Chang
2026-08-18 16:09 ` [PATCH v1 2/2] drm/ttm: make ttm_swap_ops static Sean Chang
0 siblings, 2 replies; 5+ messages in thread
From: Sean Chang @ 2026-08-18 16:09 UTC (permalink / raw)
To: Christian Koenig, Huang Rui, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Matthew Auld, Matthew Brost, dri-devel, linux-kernel, Sean Chang
This series contains two independent, minor cleanups to
drivers/gpu/drm/ttm/ttm_bo.c found while auditing the file. They do
not depend on each other and could be applied in either order or
separately.
Patch 1 removes a stale @ctx kernel-doc entry left over from an
earlier struct change, fixing a kernel-doc / W=1 mismatch warning.
Patch 2 gives ttm_swap_ops static linkage since it is not used
outside this file and is not exported, fixing a sparse
"was not declared, should it be static?" warning.
Both patches were build-tested with make W=1 C=2.
Sean Chang (2):
drm/ttm: drop stale @ctx kernel-doc entry
drm/ttm: make ttm_swap_ops static
drivers/gpu/drm/ttm/ttm_bo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry
2026-08-18 16:09 [PATCH v1 0/2] drm/ttm: two small ttm_bo.c cleanups Sean Chang
@ 2026-08-18 16:09 ` Sean Chang
2026-08-18 16:13 ` sashiko-bot
2026-08-18 16:09 ` [PATCH v1 2/2] drm/ttm: make ttm_swap_ops static Sean Chang
1 sibling, 1 reply; 5+ messages in thread
From: Sean Chang @ 2026-08-18 16:09 UTC (permalink / raw)
To: Christian Koenig, Huang Rui, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Matthew Auld, Matthew Brost, dri-devel, linux-kernel, Sean Chang
ttm_bo_alloc_state no longer has a ctx member, but its kernel-doc
comment still documents @ctx. Remove the stale entry so the
documentation matches the struct.
Signed-off-by: Sean Chang <seanwascoding@gmail.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index ef56c18ded1b..943297b49dc5 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -506,7 +506,6 @@ struct ttm_bo_alloc_state {
*
* @bo: The buffer to allocate the backing store of
* @place: The place to attempt allocation in
- * @ctx: ttm_operation_ctx associated with this allocation
* @force_space: If we should evict buffers to force space
* @res: On allocation success, the resulting struct ttm_resource.
* @alloc_state: Object holding allocation state such as charged cgroups.
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] drm/ttm: make ttm_swap_ops static
2026-08-18 16:09 [PATCH v1 0/2] drm/ttm: two small ttm_bo.c cleanups Sean Chang
2026-08-18 16:09 ` [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry Sean Chang
@ 2026-08-18 16:09 ` Sean Chang
1 sibling, 0 replies; 5+ messages in thread
From: Sean Chang @ 2026-08-18 16:09 UTC (permalink / raw)
To: Christian Koenig, Huang Rui, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Matthew Auld, Matthew Brost, dri-devel, linux-kernel, Sean Chang
ttm_swap_ops is not used outside ttm_bo.c and is not exported via
EXPORT_SYMBOL(), so give it static linkage to keep it file-local
and avoid polluting the global symbol namespace.
Signed-off-by: Sean Chang <seanwascoding@gmail.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 943297b49dc5..1b9477381a1d 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1449,7 +1449,7 @@ ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
return ret;
}
-const struct ttm_lru_walk_ops ttm_swap_ops = {
+static const struct ttm_lru_walk_ops ttm_swap_ops = {
.process_bo = ttm_bo_swapout_cb,
};
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry
2026-08-18 16:09 ` [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry Sean Chang
@ 2026-08-18 16:13 ` sashiko-bot
2026-08-18 16:29 ` Sean Chang
0 siblings, 1 reply; 5+ messages in thread
From: sashiko-bot @ 2026-08-18 16:13 UTC (permalink / raw)
To: Sean Chang; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The commit message incorrectly claims it is fixing the documentation for `struct ttm_bo_alloc_state` rather than the function `ttm_bo_alloc_at_place()`.
--
--- Patch [1]: [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry ---
commit eda6deffe5de61d4cef4644920a61899181f3f40
Author: Sean Chang <seanwascoding@gmail.com>
drm/ttm: drop stale @ctx kernel-doc entry
This commit removes a stale @ctx kernel-doc entry in ttm_bo.c to fix a
documentation mismatch.
> ttm_bo_alloc_state no longer has a ctx member, but its kernel-doc
> comment still documents @ctx. Remove the stale entry so the
> documentation matches the struct.
[Severity: Low]
This isn't a bug, but is this description accurate?
The commit message states the documentation for struct ttm_bo_alloc_state
is being fixed, but the modified kernel-doc block actually documents the
function ttm_bo_alloc_at_place().
It appears the diff chunk header below mistakenly picked up the struct
definition from earlier in the file, which may have caused the confusion.
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index ef56c18ded1b8..943297b49dc53 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -506,7 +506,6 @@ struct ttm_bo_alloc_state {
> *
> * @bo: The buffer to allocate the backing store of
> * @place: The place to attempt allocation in
> - * @ctx: ttm_operation_ctx associated with this allocation
> * @force_space: If we should evict buffers to force space
> * @res: On allocation success, the resulting struct ttm_resource.
> * @alloc_state: Object holding allocation state such as charged cgroups.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818160914.108313-1-seanwascoding@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry
2026-08-18 16:13 ` sashiko-bot
@ 2026-08-18 16:29 ` Sean Chang
0 siblings, 0 replies; 5+ messages in thread
From: Sean Chang @ 2026-08-18 16:29 UTC (permalink / raw)
To: sashiko-reviews; +Cc: dri-devel
On Wed, Aug 19, 2026 at 12:13 AM <sashiko-bot@kernel.org> wrote:
>
> > ttm_bo_alloc_state no longer has a ctx member, but its kernel-doc
> > comment still documents @ctx. Remove the stale entry so the
> > documentation matches the struct.
>
> [Severity: Low]
> This isn't a bug, but is this description accurate?
>
> The commit message states the documentation for struct ttm_bo_alloc_state
> is being fixed, but the modified kernel-doc block actually documents the
> function ttm_bo_alloc_at_place().
>
> It appears the diff chunk header below mistakenly picked up the struct
> definition from earlier in the file, which may have caused the confusion.
>
Yeah, I type the wrong function name, fixing that in the
next v2 patch.
Best Regard,
Sean
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-19 6:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 16:09 [PATCH v1 0/2] drm/ttm: two small ttm_bo.c cleanups Sean Chang
2026-08-18 16:09 ` [PATCH v1 1/2] drm/ttm: drop stale @ctx kernel-doc entry Sean Chang
2026-08-18 16:13 ` sashiko-bot
2026-08-18 16:29 ` Sean Chang
2026-08-18 16:09 ` [PATCH v1 2/2] drm/ttm: make ttm_swap_ops static Sean Chang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox