Message ID | ZHVLLpTHRvifOIHP@flip-desktop (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: tests: fix formatting in btrfs-tests | expand |
On Mon, May 29, 2023 at 06:02:38PM -0700, Phillip Duncan wrote: > checkpatch.pl had a couple of formatting suggestions: > - #38: Don't use multiple blank lines > - #42: Missing a blank line after declarations > - #282: Alignment should match open parenthesis > > Fixed these format suggestions, checkpatch.pl is a little cleaner now. Please don't send such patches, or at least not to btrfs. A more elaborate answer: https://btrfs.readthedocs.io/en/latest/dev/Developer-s-FAQ.html#how-not-to-start
On Tue, May 30, 2023 at 08:54:11PM +0200, David Sterba wrote: > On Mon, May 29, 2023 at 06:02:38PM -0700, Phillip Duncan wrote: > > checkpatch.pl had a couple of formatting suggestions: > > - #38: Don't use multiple blank lines > > - #42: Missing a blank line after declarations > > - #282: Alignment should match open parenthesis > > > > Fixed these format suggestions, checkpatch.pl is a little cleaner now. > > Please don't send such patches, or at least not to btrfs. A more > elaborate answer: > > https://btrfs.readthedocs.io/en/latest/dev/Developer-s-FAQ.html#how-not-to-start Thank you for taking the time to respond, I appreciate the direction for where to start.
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index ca09cf9afce8..1653456560c2 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -35,10 +35,10 @@ static const struct super_operations btrfs_test_super_ops = { .destroy_inode = btrfs_test_destroy_inode, }; - static int btrfs_test_init_fs_context(struct fs_context *fc) { struct pseudo_fs_context *ctx = init_pseudo(fc, BTRFS_TEST_MAGIC); + if (!ctx) return -ENOMEM; ctx->ops = &btrfs_test_super_ops; @@ -278,8 +278,7 @@ int btrfs_run_sanity_tests(void) ret = btrfs_test_free_space_cache(sectorsize, nodesize); if (ret) goto out; - ret = btrfs_test_extent_buffer_operations(sectorsize, - nodesize); + ret = btrfs_test_extent_buffer_operations(sectorsize, nodesize); if (ret) goto out; ret = btrfs_test_extent_io(sectorsize, nodesize);
checkpatch.pl had a couple of formatting suggestions: - #38: Don't use multiple blank lines - #42: Missing a blank line after declarations - #282: Alignment should match open parenthesis Fixed these format suggestions, checkpatch.pl is a little cleaner now. Signed-off-by: Phillip Duncan <turtlekernelsanders@gmail.com> --- fs/btrfs/tests/btrfs-tests.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)