On 03/28/2018 03:16 AM, David Sterba wrote:
On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote:
+       if (err) {
+               if (err == -EINVAL)
+                       pr_err("BTRFS error (device %pg): "\
+                               "unsupported checksum algorithm",
+                               fs_devices->latest_bdev);

I don't think strings should be idented. I.e the correct thing here
should be to have only fs_devices->latest_bdev on a new line, even if
the string goes above the char limit of 80. In any case the \ is not
needed due to gcc's support for string literal concatenation:

pr_err("BTRFS error (device %pg): "
        "unsupported checksum algorithm",
        fs_devices->latest_bdev)

should work equally well. But as I said I don't think this is even
needed. Let's wait and see what David says.

The strings should not be split, because we want to be able to grep the
sources for the error messages. If the string does not fit 80 chars
per line, then it can be moved to the next line and un-indented to the
left. Plenty of examples.

 I understand reason behind string should not be split, but I
 thought here will be an exception, as if you want to search
 for the string you will still use "unsupported checksum algorithm"
 which is still in one line.
 About the grep not able to find the string which are split,
 I look at it as fixing the wrong end of the problem. That is Grep
 end problem being fixes at the c code end. Anyway as its kind of
 linux general guidlines, I shall fix my patch.

Thanks, Anand
--
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