From: Krzysztof Kozlowski <krzk@kernel.org>
To: Yan Zhen <yanzhen@vivo.com>,
rashanmu@gmail.com, mchehab@kernel.org,
Andi Shyti <andi.shyti@kernel.org>, Wolfram Sang <wsa@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
opensource.kernel@vivo.com
Subject: Re: [PATCH v1] i2c: max2175: Simplify with dev_err_probe()
Date: Fri, 30 Aug 2024 20:31:59 +0200 [thread overview]
Message-ID: <f3388c4c-52f7-49f8-8a30-08665856637d@kernel.org> (raw)
In-Reply-To: <20240828094521.978220-1-yanzhen@vivo.com>
On 28/08/2024 11:45, Yan Zhen wrote:
> Switch to use dev_err_probe() to simplify the error path and
> unify a message template.
>
> Using this helper is totally fine even if err is known to never
> be -EPROBE_DEFER.
>
> The benefit compared to a normal dev_err() is the standardized format
> of the error code, it being emitted symbolically and the fact that
> the error code is returned which allows more compact error paths.
>
> Signed-off-by: Yan Zhen <yanzhen@vivo.com>
> ---
> drivers/media/i2c/max2175.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/max2175.c b/drivers/media/i2c/max2175.c
> index bf02ca23a284..700a70a6cee3 100644
> --- a/drivers/media/i2c/max2175.c
> +++ b/drivers/media/i2c/max2175.c
> @@ -1299,9 +1299,8 @@ static int max2175_probe(struct i2c_client *client)
> ret = max2175_refout_load_to_bits(client, refout_load,
> &refout_bits);
> if (ret) {
> - dev_err(&client->dev, "invalid refout_load %u\n",
> - refout_load);
Another example, one of many from @vivo.com, where you touch one line
and leave everything else not modified.
Are you going to send 5 different patches - one per each line? You
generate tremendous amount of work for reviewers to handle this.
Since ~2 weeks there is tremendous amount of trivial patches coming from
vivo.com. I identified at least 6 buggy, where the contributor did not
understand the code. Not sure about intention, but I advise extra
carefulness when dealing with these "trivial" improvements (because we
tend to apply things which look trivial).
Best regards,
Krzysztof
prev parent reply other threads:[~2024-08-30 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 9:45 Yan Zhen
2024-08-30 18:31 ` Krzysztof Kozlowski [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=f3388c4c-52f7-49f8-8a30-08665856637d@kernel.org \
--to=krzk@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=rashanmu@gmail.com \
--cc=wsa@kernel.org \
--cc=yanzhen@vivo.com \
/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
all inboxes | Powered by JetHome®