On Thu, Feb 01, 2018 at 10:28:13AM +0200, Nikolay Borisov wrote:
> >>> @@ -3175,7 +3184,8 @@ static int check_extent_data_backref(struct
> >>> btrfs_fs_info *fs_info,
> >>>               btrfs_header_owner(leaf) != root_id)
> >>>               goto next;
> >>>           btrfs_item_key_to_cpu(leaf, &key, slot);
> >>> -        if (key.objectid != objectid || key.type !=
> >>> BTRFS_EXTENT_DATA_KEY)
> >>> +        if (key.objectid != objectid || key.type !=
> >>> +            BTRFS_EXTENT_DATA_KEY)
> >> if (key.objectid != objectid ||
> >>     key.type != BTRFS_EXTENT_DATA_KEY)
> >> is more better.
> >> Other changes are nice.
> > 
> > I also thought about that, but that leaves too much space in previous line.
> > 
> > Not sure what should be the best practice here.
> 
> Su's suggestion is more readable so I'd say go with it

I slightly disagree with checkpatch about the 80 cols limit in case the
the ; or closing ) is on 80 or even 81 as long as the code becomes
readable. I've grepped for the condition and there are both one line and
2 line (split after ||), so it's IMO both acceptable.

If it's formatted as

if (key.objectid != objectid ||
    key.type != BTRFS_EXTENT_DATA_KEY)

it's ok.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to