From: Greg KH <greg@kroah.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
linux-kernel@vger.kernel.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-api@vger.kernel.org, f.fainelli@gmail.com
Subject: Re: [PATCH v5] MIPS: Expose prid and globalnumber to sysfs
Date: Fri, 7 Oct 2022 18:43:56 +0200 [thread overview]
Message-ID: <Y0BXTP4ur6bxrpim@kroah.com> (raw)
In-Reply-To: <b3886864-5c54-4524-8e30-b6701553b615@app.fastmail.com>
On Fri, Oct 07, 2022 at 05:37:34PM +0100, Jiaxun Yang wrote:
>
>
> 在2022年10月7日十月 下午3:52,Greg KH写道:
> [...]
> >> +
> >> +static int cpuregs_cpu_offline(unsigned int cpu)
> >> +{
> >> + struct device *dev;
> >> + struct cpureg *reg = per_cpu(cpuregs, cpu);
> >> +
> >> + dev = get_cpu_device(cpu);
> >> + if (!dev || !reg)
> >> + return -ENODEV;
> >> + if (reg->kobj.parent) {
> >
> > Why are you looking at the parent of a kobject? Why not just always
> > remove the kobject if you have a reference to it now? How does the
> > parent matter?
>
> Another dummy copy from Arm64 code... kobject_put should be enough here?
Why would it not be enough?
next prev parent reply other threads:[~2022-10-07 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 14:12 [PATCH v5] MIPS: Expose prid and globalnumber to sysfs Jiaxun Yang
2022-10-07 14:52 ` Greg KH
2022-10-07 16:37 ` Jiaxun Yang
2022-10-07 16:43 ` Greg KH [this message]
2022-10-08 7:43 ` kernel test robot
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=Y0BXTP4ur6bxrpim@kroah.com \
--to=greg@kroah.com \
--cc=f.fainelli@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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