From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: zhaoxiao <zhaoxiao@uniontech.com>,
thierry.reding@gmail.com, lee.jones@linaro.org
Cc: u.kleine-koenig@pengutronix.de,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: samsung: Simplify using devm_pwmchip_add()
Date: Wed, 1 Sep 2021 11:42:22 +0200 [thread overview]
Message-ID: <e4d04494-8c49-b1c5-c0f4-165fc59f516a@canonical.com> (raw)
In-Reply-To: <612f43cc.1c69fb81.205fc.d94bSMTPIN_ADDED_BROKEN@mx.google.com>
On 01/09/2021 11:11, zhaoxiao wrote:
> Thanks for your advices, This patch is modified with reference to the
> patch that has been submitted,example:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=66a03c4fd9e95e192c574811a1f4ea8f62992358
>
The patch there looks correct, but you cannot apply one code pattern to
entirely different code and hope it works.
You reference a patch in a driver not using drvdata and having only
pwmchip_remove() in its remove() callback.
Now you apply it to other drivers and:
1. Remove drvdata even though it is used,
2. Delete additional code from remove() callback.
Especially the point (2) is a proof that you don't understand the
fundamental Linux driver model, so please do not convert code into
devm-like() before learning it.
Best regards,
Krzysztof
prev parent reply other threads:[~2021-09-01 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210901054230.29678-1-zhaoxiao@uniontech.com>
2021-09-01 8:56 ` [PATCH] pwm: samsung: Simplify using devm_pwmchip_add() Krzysztof Kozlowski
[not found] ` <612f43cc.1c69fb81.205fc.d94bSMTPIN_ADDED_BROKEN@mx.google.com>
2021-09-01 9:42 ` 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=e4d04494-8c49-b1c5-c0f4-165fc59f516a@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=zhaoxiao@uniontech.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;
as well as URLs for NNTP newsgroup(s).