linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, Zhi Li <lizhi01@loongson.cn>
Subject: Re: [PATCH] MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
Date: Thu, 12 May 2022 18:08:27 +0200	[thread overview]
Message-ID: <20220512160827.GA14475@alpha.franken.de> (raw)
In-Reply-To: <20220511145659.2976950-1-linux@roeck-us.net>

On Wed, May 11, 2022 at 07:56:59AM -0700, Guenter Roeck wrote:
> Calling hwmon_device_register_with_info() with NULL dev and/or chip
> information parameters is an ABI abuse and not a real conversion to
> the new API. Also, the code creates sysfs attributes _after_ creating
> the hwmon device, which is racy and unsupported to start with. On top
> of that, the removal code tries to remove the name attribute which is
> owned by the hwmon core.
> 
> Use hwmon_device_register_with_groups() to register the hwmon device
> instead.
> 
> In the future, the hwmon subsystem will reject calls to
> hwmon_device_register_with_info with NULL dev or chip/info parameters.
> Without this patch, the hwmon device will fail to register.
> 
> Fixes: f59dc5119192 ("MIPS: Loongson: Fix boot warning about hwmon_device_register()")
> Cc: Zhi Li <lizhi01@loongson.cn>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/platform/mips/cpu_hwmon.c | 127 ++++++++++--------------------
>  1 file changed, 41 insertions(+), 86 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2022-05-12 16:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 14:56 [PATCH] MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon Guenter Roeck
2022-05-12 16:08 ` Thomas Bogendoerfer [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=20220512160827.GA14475@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=chenhuacai@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lizhi01@loongson.cn \
    /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).