* [PATCH v2] ext4: inode: Delete braces for single statements
@ 2024-10-14 14:06 Nicolas Bretz
2024-10-18 0:19 ` Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Bretz @ 2024-10-14 14:06 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Nicolas Bretz
checkpatch.pl warnings - braces are not necessary
Removed trailing whitespaces introduced in v1
Signed-off-by: Nicolas Bretz <bretznic@gmail.com>
---
fs/ext4/inode.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 03c2253005f0..1c1c1ccc8a0c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -440,11 +440,11 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
* could be converted.
*/
down_read(&EXT4_I(inode)->i_data_sem);
- if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
+ if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
retval = ext4_ext_map_blocks(handle, inode, map, 0);
- } else {
+ else
retval = ext4_ind_map_blocks(handle, inode, map, 0);
- }
+
up_read((&EXT4_I(inode)->i_data_sem));
/*
@@ -453,7 +453,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
*/
if (es_map->m_lblk != map->m_lblk ||
es_map->m_flags != map->m_flags ||
- es_map->m_pblk != map->m_pblk) {
+ es_map->m_pblk != map->m_pblk)
printk("ES cache assertion failed for inode: %lu "
"es_cached ex [%d/%d/%llu/%x] != "
"found ex [%d/%d/%llu/%x] retval %d flags %x\n",
@@ -461,7 +461,6 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
es_map->m_pblk, es_map->m_flags, map->m_lblk,
map->m_len, map->m_pblk, map->m_flags,
retval, flags);
- }
}
#endif /* ES_AGGRESSIVE_TEST */
@@ -547,11 +546,11 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
* file system block.
*/
down_read(&EXT4_I(inode)->i_data_sem);
- if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
+ if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
retval = ext4_ext_map_blocks(handle, inode, map, 0);
- } else {
+ else
retval = ext4_ind_map_blocks(handle, inode, map, 0);
- }
+
if (retval > 0) {
unsigned int status;
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ext4: inode: Delete braces for single statements
2024-10-14 14:06 [PATCH v2] ext4: inode: Delete braces for single statements Nicolas Bretz
@ 2024-10-18 0:19 ` Theodore Ts'o
2024-10-18 0:50 ` Nicolas Bretz
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2024-10-18 0:19 UTC (permalink / raw)
To: Nicolas Bretz; +Cc: linux-ext4
On Mon, Oct 14, 2024 at 07:06:54AM -0700, Nicolas Bretz wrote:
> checkpatch.pl warnings - braces are not necessary
>
> Signed-off-by: Nicolas Bretz <bretznic@gmail.com>
The checkpatch.pl script is meant to check *patches*, and in general,
in the ext4 subsystem (as with many other subststems) patches which
only fix checkpatch.pl file are discouraged, since it can introduce
potential patch conflicts when cherrypicking fixes, or in the course
of other people doing other development.
Granted, dealing with the patch conflicts aren't that hard, but the
cost/benefit ratio isn't worth it. For kernel newbies who are looking
for practice submitting patches, cleaning up checkpatch warnings in
the staging subsystem are fine, but in general, it's best to not send
cleanup-only patches to other parts of the system.
Of course, if you're modifying that part of the code in question,
that's a perfect time to clean it up while you're at it.
> Removed trailing whitespaces introduced in v1
In the future, please put changes between the v1 and v2 patches after
the three hyphens (by where the summary of how many lines were added
or removed in each file). That way the description of changes between
earlier versions aren't preserved forever in the git commit
description, since they aren't really useful once they've landed in
the git.
Thanks,
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext4: inode: Delete braces for single statements
2024-10-18 0:19 ` Theodore Ts'o
@ 2024-10-18 0:50 ` Nicolas Bretz
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Bretz @ 2024-10-18 0:50 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-ext4
On Thu, Oct 17, 2024 at 5:19 PM Theodore Ts'o <tytso@mit.edu> wrote:
>
> On Mon, Oct 14, 2024 at 07:06:54AM -0700, Nicolas Bretz wrote:
> > checkpatch.pl warnings - braces are not necessary
> >
> > Signed-off-by: Nicolas Bretz <bretznic@gmail.com>
>
> The checkpatch.pl script is meant to check *patches*, and in general,
> in the ext4 subsystem (as with many other subststems) patches which
> only fix checkpatch.pl file are discouraged, since it can introduce
> potential patch conflicts when cherrypicking fixes, or in the course
> of other people doing other development.
>
> Granted, dealing with the patch conflicts aren't that hard, but the
> cost/benefit ratio isn't worth it. For kernel newbies who are looking
> for practice submitting patches, cleaning up checkpatch warnings in
> the staging subsystem are fine, but in general, it's best to not send
> cleanup-only patches to other parts of the system.
>
> Of course, if you're modifying that part of the code in question,
> that's a perfect time to clean it up while you're at it.
>
> > Removed trailing whitespaces introduced in v1
>
> In the future, please put changes between the v1 and v2 patches after
> the three hyphens (by where the summary of how many lines were added
> or removed in each file). That way the description of changes between
> earlier versions aren't preserved forever in the git commit
> description, since they aren't really useful once they've landed in
> the git.
>
> Thanks,
>
> - Ted
Noted, I appreciate the input.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-18 0:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 14:06 [PATCH v2] ext4: inode: Delete braces for single statements Nicolas Bretz
2024-10-18 0:19 ` Theodore Ts'o
2024-10-18 0:50 ` Nicolas Bretz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox