From: Artem Bityutskiy <dedekind1@gmail.com>
To: Tanya Brokhman <tlinder@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
linux-mtd@lists.infradead.org,
Richard Weinberger <richard@nod.at>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v2] mtd: ubi: Extend UBI layer debug/messaging capabilities
Date: Fri, 03 Oct 2014 18:27:15 +0300 [thread overview]
Message-ID: <1412350035.3795.101.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1412089998-18978-1-git-send-email-tlinder@codeaurora.org>
Yes, I guess a single patch is indeed OK. I have few nit-picks, though.
On Tue, 2014-09-30 at 18:13 +0300, Tanya Brokhman wrote:
> - ubi_err("'ubi_io_read_ec_hdr()' returned unknown code %d", err);
> + ubi_err(ubi,
> + "'ubi_io_read_ec_hdr()' returned unknown code %d", err);
> return -EINVAL;
I think it is fine if the line is long in these cases, let's keep the
message on the same line, this split does not contribute to better
readability, quite the opposite, in my opinion.
One line:
ubi_err(ubi, "long line")
Multiple lines:
ubi_err(ubi, "long line,
parameters)
> - ubi_msg("\"delete\" compatible internal volume %d:%d found, will remove it",
> + ubi_msg(ubi,
> + "\"delete\" compatible internal volume %d:%d found, will remove it",
> vol_id, lnum);
Ditto.
> - ubi_msg("read-only compatible internal volume %d:%d found, switch to read-only mode",
> + ubi_msg(ubi,
> + "read-only compatible internal volume %d:%d found, switch to read-only mode",
> vol_id, lnum);
Ditto. And so on, in many places.
> - ubi_err("bad compat %d", vidh->compat);
> + ubi_err(ubi,
> + "bad compat %d", vidh->compat);
And for consistency, places like this would be:
ubi_err(ubi, bad compat %d",
vidh->compat);
> if (av->used_ebs != be32_to_cpu(vidh->used_ebs)) {
> - ubi_err("bad used_ebs %d", av->used_ebs);
> + ubi_err(ubi,
> + "bad used_ebs %d", av->used_ebs);
Ditto for all the similar cases.
> - ubi_msg("volume %d (\"%s\") re-sized from %d to %d LEBs", vol_id,
> + ubi_msg(ubi, "volume %d (\"%s\") re-sized from %d to %d LEBs",
> + vol_id,
> vol->name, old_reserved_pebs, vol->reserved_pebs);
Please, in cases like this, try to pack more arguments to the second
line, and move those which do not fit there to the third line. So this
would be like:
ubi_msg(ubi, "volume %d (\"%s\") re-sized from %d to %d LEBs",
vol_id, vol->name, old_reserved_pebs,
vol->reserved_pebs);
next prev parent reply other threads:[~2014-10-03 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 15:13 [PATCH v2] mtd: ubi: Extend UBI layer debug/messaging capabilities Tanya Brokhman
2014-10-03 15:27 ` Artem Bityutskiy [this message]
2014-10-03 15:50 ` Rafał Miłecki
2014-10-03 16:19 ` Artem Bityutskiy
2014-10-03 16:31 ` Rafał Miłecki
2014-10-06 7:55 ` Ricard Wanderlof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412350035.3795.101.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tlinder@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox