* [PATCH] fs/affs: remove redundant assignment to ch
@ 2022-03-07 15:07 Colin Ian King
2022-03-29 16:51 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-03-07 15:07 UTC (permalink / raw)
To: David Sterba, linux-fsdevel; +Cc: kernel-janitors, linux-kernel
The assignment of ch after subtracting ('a' - 'A') is redundant and
can be removed. Fix this by replacing the -= operator with just -
to remove the assignment.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/affs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index bcab18956b4f..a1270deba908 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -19,7 +19,7 @@ typedef int (*toupper_t)(int);
static int
affs_toupper(int ch)
{
- return ch >= 'a' && ch <= 'z' ? ch -= ('a' - 'A') : ch;
+ return ch >= 'a' && ch <= 'z' ? ch - ('a' - 'A') : ch;
}
/* International toupper() for DOS\3 ("international") */
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/affs: remove redundant assignment to ch
2022-03-07 15:07 [PATCH] fs/affs: remove redundant assignment to ch Colin Ian King
@ 2022-03-29 16:51 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2022-03-29 16:51 UTC (permalink / raw)
To: Colin Ian King; +Cc: David Sterba, linux-fsdevel, kernel-janitors, linux-kernel
On Mon, Mar 07, 2022 at 03:07:42PM +0000, Colin Ian King wrote:
> The assignment of ch after subtracting ('a' - 'A') is redundant and
> can be removed. Fix this by replacing the -= operator with just -
> to remove the assignment.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> fs/affs/namei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/affs/namei.c b/fs/affs/namei.c
> index bcab18956b4f..a1270deba908 100644
> --- a/fs/affs/namei.c
> +++ b/fs/affs/namei.c
> @@ -19,7 +19,7 @@ typedef int (*toupper_t)(int);
> static int
> affs_toupper(int ch)
> {
> - return ch >= 'a' && ch <= 'z' ? ch -= ('a' - 'A') : ch;
> + return ch >= 'a' && ch <= 'z' ? ch - ('a' - 'A') : ch;
AFFS is in fixes-only mode, I wonder how much this change is affecting
anybody, from the user perspective. I'd say not at all, W=1 build is
clean and that's something I'd be fine to fix, W=2 and W=3 warnings are
from other code.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-29 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 15:07 [PATCH] fs/affs: remove redundant assignment to ch Colin Ian King
2022-03-29 16:51 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).