From: Hayes Wang <hayeswang@realtek.com>
To: Oliver Neukum <oneukum@suse.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [RFC] r8152: pass through needs to be singular
Date: Mon, 8 Aug 2022 07:04:20 +0000 [thread overview]
Message-ID: <ee294e719e7b40acbc760eed8f781ba4@realtek.com> (raw)
In-Reply-To: <0c27917c-572a-7e70-3512-9357fabb458a@suse.com>
Oliver Neukum <oneukum@suse.com>
> Sent: Thursday, August 4, 2022 4:58 PM
[...]
> >> + if (!holder_of_pass_through) {
> >> + ret = -EBUSY;
> >> + goto failout;
> >> + }
> >
> > Excuse me. I have one question.
> > When is the holder_of_pass_through set?
> > The default value of holder_of_pass_through is NULL, so
> > it seems the holder_of_pass_through would never be set.
>
>
> Hi,
>
> here in vendor_mac_passthru_addr_read()
I mean that holder_of_pass_through is NULL, so you set ret = -EBUSY and goto failout.
However, holder_of_pass_through is set only if ret == 0. That is,
holder_of_pass_through = tp would never occur, because ret is equal -EBUSY.
The default value of holder_of_pass_through is NULL, so it has no chance to be set.
Right?
Best Regards,
Hayes
> >> amacout:
> >> kfree(obj);
> >> +failout:
> >> + if (!ret)
> >> + holder_of_pass_through = tp;
> >> + mutex_unlock(&pass_through_lock);
> >> return ret;
> >> }
next prev parent reply other threads:[~2022-08-08 7:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 19:18 [RFC] r8152: pass through needs to be singular Oliver Neukum
2022-07-28 22:11 ` Andrew Lunn
2022-08-02 10:52 ` Oliver Neukum
2022-08-02 13:31 ` Andrew Lunn
2022-08-04 9:24 ` Oliver Neukum
2022-08-04 13:24 ` Andrew Lunn
2022-08-04 13:29 ` Oliver Neukum
2022-08-04 14:31 ` Andrew Lunn
2022-08-03 3:48 ` Hayes Wang
2022-08-04 8:57 ` Oliver Neukum
2022-08-08 7:04 ` Hayes Wang [this message]
2022-08-23 7:53 ` Oliver Neukum
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=ee294e719e7b40acbc760eed8f781ba4@realtek.com \
--to=hayeswang@realtek.com \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.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).