From: Krzysztof Kozlowski <krzk@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] w1: matrox: Remove some deadcode in matrox_w1_remove()
Date: Sun, 24 Aug 2025 18:56:14 +0200 [thread overview]
Message-ID: <4c9660b2-879a-4bc1-adeb-9056da364ae7@kernel.org> (raw)
In-Reply-To: <458641ad2d7a7adf30a03e70038304f0e6a81ff4.1755770484.git.christophe.jaillet@wanadoo.fr>
On 21/08/2025 12:02, Christophe JAILLET wrote:
> The .remove function can only be called if the .probe() succeeds. So there
> is no need to keep track of a successful probe in 'found'.
>
> Simplify code accordingly.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only
> ---
> drivers/w1/masters/matrox_w1.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
> index 2852cd2dc67c..146fa7c6e74e 100644
> --- a/drivers/w1/masters/matrox_w1.c
> +++ b/drivers/w1/masters/matrox_w1.c
> @@ -47,7 +47,6 @@ struct matrox_device {
>
> unsigned long phys_addr;
> void __iomem *virt_addr;
> - unsigned long found;
>
> struct w1_bus_master *bus_master;
> };
> @@ -158,8 +157,6 @@ static int matrox_w1_probe(struct pci_dev *pdev, const struct pci_device_id *ent
>
> pci_set_drvdata(pdev, dev);
>
> - dev->found = 1;
What wonderful code was this... Good catch, I'll apply it soon.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-24 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 10:02 Christophe JAILLET
2025-08-24 16:56 ` Krzysztof Kozlowski [this message]
2025-08-31 12:14 ` Krzysztof Kozlowski
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=4c9660b2-879a-4bc1-adeb-9056da364ae7@kernel.org \
--to=krzk@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®