This is a note to let you know that I've just added the patch titled rpmsg: Constify local variable in field store macro to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: rpmsg-constify-local-variable-in-field-store-macro.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable-owner@xxxxxxxxxxxxxxx Wed Oct 18 14:06:05 2023 From: Lee Jones <lee@xxxxxxxxxx> Date: Wed, 18 Oct 2023 13:05:47 +0100 Subject: rpmsg: Constify local variable in field store macro To: lee@xxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Message-ID: <20231018120552.2110677-2-lee@xxxxxxxxxx> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> commit e5f89131a06142e91073b6959d91cea73861d40e upstream. Memory pointed by variable 'old' in field store macro is not modified, so it can be made a pointer to const. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220419113435.246203-12-krzysztof.kozlowski@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Lee Jones <lee@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/rpmsg/rpmsg_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -332,7 +332,8 @@ field##_store(struct device *dev, struct const char *buf, size_t sz) \ { \ struct rpmsg_device *rpdev = to_rpmsg_device(dev); \ - char *new, *old; \ + const char *old; \ + char *new; \ \ new = kstrndup(buf, sz, GFP_KERNEL); \ if (!new) \ Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-4.19/rpmsg-fix-kfree-of-static-memory-on-setting-driver_override.patch queue-4.19/rpmsg-constify-local-variable-in-field-store-macro.patch queue-4.19/driver-platform-add-helper-for-safer-setting-of-driver_override.patch