mm: shmem: Fix variable type to int to evaluate negative conditions
Subsystems (2)
PATCH v2 1/1 mm: shmem: Fix variable type to int to evaluate negative conditions
Use signed data type for version handling
in shmem_parse_opt_casefold()
---
Coverity Message:
CID 1601569: (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This less-than-zero comparison of an unsigned value is never true. version < 0U
Coverity Link:
https://scan7.scan.coverity.com/#/project-view/10043/11354?selectedIssue=1601569
---
Changes in v2:
- Updated the log summary.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/shmem.c +1 -1
@@ -4367,7 +4367,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter * bool latest_version) {struct shmem_options *ctx = fc->fs_private; -unsigned int version =UTF8_LATEST ; +int version =UTF8_LATEST ;struct unicode_map *encoding;char *version_str = param->string +5 ;
---
base-commit: 6d59cab07b8d74d0f0422b750038123334f6ecc2
change-id: 20241111-unsignedcompare1601569-05b5932145ef
Best regards,
Signature · 1 line
Karan Sanghavi <[email protected]>
Quoted 41 lines · Karan Sanghavi
Use signed data type for version handling
inshmem_parse_opt_casefold()Fixes 58e55efd6c72 ("tmpfs: Add casefold lookup support")Reviewed-by André Almeida <[email protected]>Reviewed-by Gabriel Krisman Bertazi <[email protected]>Signed-off-by Karan Sanghavi <[email protected]>---
Coverity Message:
CID 1601569: (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This less-than-zero comparison of an unsigned value is never true. version < 0UCoverity Link:
https://scan7.scan.coverity.com/#/project-view/10043/11354?selectedIssue=1601569
---
Changes in v2:
- Updated the log summary.
- Link to v1: https://lore.kernel.org/r/[email protected]--- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/shmem.c +1
-2@@ -4367,7 +4367,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter * bool latest_version) {struct shmem_options *ctx = fc->fs_private; -unsigned int version =UTF8_LATEST ; +int version =UTF8_LATEST ;struct unicode_map *encoding;char *version_str = param->string +5 ; ---base-commit:
6d59cab07b8d74d0f0422b750038123334f6ecc2
change-id: 20241111-unsignedcompare1601569-05b5932145ef
Quoted 4 lines
Best regards,
Signature · 1 line
Karan Sanghavi <[email protected]>
Hello Markus,
I hope you are doing great,
Can you please let me know by can I expect this patch to be applied since I have changed the log summary as you have mentioned in the last mail.
Please do let me know if there anything else to be done for it to get
accepted
Thank you,
Karan.
Quoted 2 lines
Quoted 2 lines
Use signed data type for version handling
inshmem_parse_opt_casefold()
How do you think about to move this information into the summary phrase?
…
Quoted 5 lines
Quoted 5 lines
---
Coverity Message:
CID 1601569: (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This less-than-zero comparison of an unsigned value is never true. version < 0U
…
May such information become a part for the final change description?
Regards,
Markus
Quoted 6 lines · Markus Elfring
Quoted 2 lines
Quoted 2 lines
Use signed data type for version handling
inshmem_parse_opt_casefold()How do you think about to move this information into the summary phrase?
should i add more info to this? as i am still not able to understand what i need to do here. Can you please suggest what changes are you suggesting here.
Quoted 10 lines
…
Quoted 5 lines
Quoted 5 lines
---
Coverity Message:
CID 1601569: (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This less-than-zero comparison of an unsigned value is never true. version < 0U…
May such information become a part for the final change description?
ofcoure not, as per my understanding, text after '---' are not included in the change descriptions. (Do correct me if i am wrong here) Thus no need to worry for them getting added in the change log.
Thank you,
Karan.
Quoted 2 lines
Regards,
Markus
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Use signed data type for version handling
inshmem_parse_opt_casefold()How do you think about to move this information into the summary phrase?
should i add more info to this? as i am still not able to understand what i need to do here. Can you please suggest what changes are you suggesting here.
I propose to refine the distribution of information between the patch subject and the changelog.
Regards,
Markus