Replace all strncpy() calls with strlcpy() and fix indentation issues.
Signed-off-by: Dharanitharan R dharanitharan725@gmail.com --- Changes in v3: - Fix Signed-off-by spacing - Move changelog below '---'
Changes in v2: - Fixed indentation issues reported by Greg KH --- .../staging/greybus/Documentation/firmware/firmware.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c index 3b35ef6d4adb..6f6410878ee6 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware.c +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c @@ -63,9 +63,11 @@ static int update_intf_firmware(int fd) intf_load.major = 0; intf_load.minor = 0;
- strncpy((char *)&intf_load.firmware_tag, firmware_tag, + strlcpy(intf_load.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load); if (ret < 0) { printf("Failed to load interface firmware: %s (%d)\n", fwdev, @@ -101,9 +103,10 @@ static int update_backend_firmware(int fd) /* Get Backend Firmware Version */ printf("Getting Backend Firmware Version\n");
- strncpy((char *)&backend_fw_info.firmware_tag, firmware_tag, + strlcpy(backend_fw_info.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_version: ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info); if (ret < 0) { @@ -129,8 +132,8 @@ static int update_backend_firmware(int fd) /* Try Backend Firmware Update over Unipro */ printf("Updating Backend Firmware\n");
- strncpy((char *)&backend_update.firmware_tag, firmware_tag, - GB_FIRMWARE_U_TAG_MAX_SIZE); + strlcpy(backend_update.firmware_tag, firmware_tag, + GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_update: backend_update.status = 0;
On Wed, Nov 19, 2025 at 04:30:05AM +0000, Dharanitharan R wrote:
Replace all strncpy() calls with strlcpy() and fix indentation issues.
Signed-off-by: Dharanitharan R dharanitharan725@gmail.com
You did not do what I asked you to do, so I'm going to have to just ignore your emails now :(
Why are there two v3 patches? if you make any changes to a patch, increment the version when you post again.
Also why did you drop the rationale for making the change that was present in the original patch?
Most importantly, why did you ignore Dan's comment on your original patch? https://msgid.link/aRwiEnEx4gX90eVh@stanley.mountain
/jeff