Add debugfs_create_u8() based on other already present implementations.
I am unclear if we need to add extra checks.
Add a dummy (no real implementation yet) for debugfs_create_blob().
Both are needed for iwlwifi debugfs support.
Differential D37090
LinuxKPI,lindebugfs: add more base type support Authored by bz on Oct 22 2022, 6:15 PM. Tags None Referenced Files
Details Add debugfs_create_u8() based on other already present implementations. Add a dummy (no real implementation yet) for debugfs_create_blob(). Both are needed for iwlwifi debugfs support.
Diff Detail
Event TimelineComment Actions This is just so to have the skeleton for a discussion on how to implement "blob" properly. I am hoping @jfree may have a good idea. Comment Actions I feel like the scattered nature of debugfs material makes it incredibly difficult to work with. static int
debugfs_blob_get(void *data, uint64_t *value)
{
struct debugfs_blob_wrapper *blob = data;
memcpy(value, blob->data, blob->size);
return (0);
}
static int
debugfs_blob_set(void *data, uint64_t value)
{
struct debugfs_blob_wrapper *blob = data;
blob->size = sizeof(value);
memcpy(blob->data, &value, blob->size);
return (0);
}I think the blob's fops should be defined manually rather than using DEFINE_DEBUGFS_ATTRIBUTE. Alternatively, we could dynamically malloc in debugfs_blob_set, but I do not know how to reliably free that. I am not sure what the origin authors intended for the implementation. Let me know what you think. Comment Actions I just took a quick glance, but everything looks good :)
| ||||||||||||||||||||||||||||||||||||||