diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-12-22 14:16:11 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-12-22 14:16:11 +0300 |
commit | 1b3171929107326e9525e88133c820697bcea717 (patch) | |
tree | 1a21c17ee6b40dec1065a82c786f0da6de32f1c4 /drivers/firmware | |
parent | c55a4983e93ff4d4ddb92ecd3d45c21066ed3b82 (diff) | |
parent | 2c2235292b33d788a1436f1d2a6108184a657f51 (diff) | |
download | linux-1b3171929107326e9525e88133c820697bcea717.tar.xz |
Merge tag 'ti-driver-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers
TI SoC driver updates for v6.8
- ti_sci: Minor fixup for off by one error in debugfs_create
- k3-socinfo: Refactoring and add j721e detection, j722s
* tag 'ti-driver-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
soc: ti: k3-socinfo: Add JTAG ID for J722S
soc: ti: k3-socinfo: Revamp driver to accommodate different rev structs
firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
Link: https://lore.kernel.org/r/20231218153043.r5psxbjjpccusjg4@september
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/ti_sci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 7041befc756a..8b9a2556de16 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -164,7 +164,7 @@ static int ti_sci_debugfs_create(struct platform_device *pdev, { struct device *dev = &pdev->dev; struct resource *res; - char debug_name[50] = "ti_sci_debug@"; + char debug_name[50]; /* Debug region is optional */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, @@ -181,10 +181,10 @@ static int ti_sci_debugfs_create(struct platform_device *pdev, /* Setup NULL termination */ info->debug_buffer[info->debug_region_size] = 0; - info->d = debugfs_create_file(strncat(debug_name, dev_name(dev), - sizeof(debug_name) - - sizeof("ti_sci_debug@")), - 0444, NULL, info, &ti_sci_debug_fops); + snprintf(debug_name, sizeof(debug_name), "ti_sci_debug@%s", + dev_name(dev)); + info->d = debugfs_create_file(debug_name, 0444, NULL, info, + &ti_sci_debug_fops); if (IS_ERR(info->d)) return PTR_ERR(info->d); |