Skip to content

Commit fab3649

Browse files
committed
drm/xe/configfs: Drop MAX_GT_TYPE_CHARS constant
Early revisions of commit 7abd692 ("drm/xe/configfs: Add attribute to disable GT types") used MAX_GT_TYPE_CHARS not only to size the constant name field, but also for some of the string matching logic. By the time the patch finally landed, the constant was no longer needed for parsing. Stop using it for the string field definition as well; this eliminates the risk that we forget to update the constant if we ever add a GT type name longer than seven characters. Suggested-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patch.msgid.link/20251024200834.1512329-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
1 parent 6d5511e commit fab3649

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/xe/xe_configfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ struct engine_info {
301301
/* Some helpful macros to aid on the sizing of buffer allocation when parsing */
302302
#define MAX_ENGINE_CLASS_CHARS 5
303303
#define MAX_ENGINE_INSTANCE_CHARS 2
304-
#define MAX_GT_TYPE_CHARS 7
305304

306305
static const struct engine_info engine_info[] = {
307306
{ .cls = "rcs", .mask = XE_HW_ENGINE_RCS_MASK, .engine_class = XE_ENGINE_CLASS_RENDER },
@@ -313,7 +312,7 @@ static const struct engine_info engine_info[] = {
313312
};
314313

315314
static const struct {
316-
const char name[MAX_GT_TYPE_CHARS + 1];
315+
const char *name;
317316
enum xe_gt_type type;
318317
} gt_types[] = {
319318
{ .name = "primary", .type = XE_GT_TYPE_MAIN },

0 commit comments

Comments
 (0)