From: Dan Carpenter <error27@gmail.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: bhanumaiya@chromium.org, chrome-platform@lists.linux.dev
Subject: Re: [bug report] platform/chrome: cros_ec_uart: Add transport layer
Date: Tue, 10 Jan 2023 08:16:48 +0300 [thread overview]
Message-ID: <Y7z0wGhf1AuJ9XKl@kadam> (raw)
In-Reply-To: <Y7zapHKnXRbK2c5v@google.com>
On Tue, Jan 10, 2023 at 11:25:24AM +0800, Tzung-Bi Shih wrote:
> > 175 if (host_response->data_len > ec_msg->insize) {
> > 176 dev_err(ec_dev->dev, "Resp too long (%d bytes, expected %d)\n",
> > 177 host_response->data_len, ec_msg->insize);
> > 178 ret = -ENOSPC;
> >
> >
> > ret = -EINVAL; (Unless you are discussing harddrives).
>
> It looks like platform/chrome used the error number for a while for the
> case:
>
> $ grep -R ENOSPC drivers/platform/chrome/
> drivers/platform/chrome/cros_ec_lpc.c: ret = -ENOSPC;
> drivers/platform/chrome/cros_ec_i2c.c: ret = -ENOSPC;
> drivers/platform/chrome/cros_ec_uart.c: ret = -ENOSPC;
> drivers/platform/chrome/cros_ec_ishtp.c: return -ENOSPC;
> drivers/platform/chrome/cros_ec_spi.c: ret = -ENOSPC;
>
> I wouldn't feel bother if we keep using the error number. Otherwise, we
> should change all of them.
I don't really care about this code, but generally don't let consistency
hold you back from being correct. If 99 are wrong and 1 is correct
that's at least better than 100 wrong and none correct.
regards,
dan carpenter
prev parent reply other threads:[~2023-01-10 5:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 8:54 [bug report] platform/chrome: cros_ec_uart: Add transport layer Dan Carpenter
2023-01-10 3:25 ` Tzung-Bi Shih
2023-01-10 5:16 ` Dan Carpenter [this message]
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=Y7z0wGhf1AuJ9XKl@kadam \
--to=error27@gmail.com \
--cc=bhanumaiya@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=tzungbi@kernel.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