From: Leonid Maksymchuk <leonmaxx@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org,
acpi4asus-user@lists.sourceforge.net, chiu@endlessm.com,
yurii.pavlovskyi@gmail.com, kristian@klausen.dk,
andy@infradead.org, dvhart@infradead.org,
corentin.chary@gmail.com, Leonid Maksymchuk <leonmaxx@gmail.com>
Subject: [PATCH v2 1/3] platform/x86: asus_wmi: Fix return value of fan_boost_mode_store
Date: Mon, 4 Nov 2019 23:37:07 +0200 [thread overview]
Message-ID: <20191104213707.18170-1-leonmaxx@gmail.com> (raw)
In-Reply-To: <20191104213417.18036-1-leonmaxx@gmail.com>
Function fan_boost_mode_store should return number of bytes written
but instead it returns return value of kstrtou8 which is 0 if
conversion is succefull. This leads to infinite loop after any
write to it's SysFS entry.
Fixes: b096f626a682 ("platform/x86: asus-wmi: Switch fan boost mode")
Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com>
---
drivers/platform/x86/asus-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 821b08e..723aa4d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1718,7 +1718,7 @@ static ssize_t fan_boost_mode_store(struct device *dev,
asus->fan_boost_mode = new_mode;
fan_boost_mode_write(asus);
- return result;
+ return count;
}
// Fan boost mode: 0 - normal, 1 - overboost, 2 - silent
--
1.8.3.1
next prev parent reply other threads:[~2019-11-04 21:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 21:34 [PATCH v2 0/3] asus_wmi: Support of ASUS TUF laptops on Ryzen CPUs Leonid Maksymchuk
2019-11-04 21:37 ` Leonid Maksymchuk [this message]
2019-11-04 21:38 ` [PATCH v2 2/3] platform/x86: asus_wmi: Support fan boost mode on FX505DY/FX705DY Leonid Maksymchuk
2019-11-05 0:00 ` kbuild test robot
2019-11-06 7:04 ` Andy Shevchenko
2019-11-07 17:15 ` Andy Shevchenko
2019-11-07 18:31 ` Leonid Maksymchuk
2019-11-04 21:39 ` [PATCH v2 3/3] platform/x86: asus_wmi: Set default fan boost mode to normal Leonid Maksymchuk
2019-11-06 7:03 ` Andy Shevchenko
2019-11-06 7:21 ` [PATCH v2 0/3] asus_wmi: Support of ASUS TUF laptops on Ryzen CPUs Andy Shevchenko
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=20191104213707.18170-1-leonmaxx@gmail.com \
--to=leonmaxx@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy@infradead.org \
--cc=chiu@endlessm.com \
--cc=corentin.chary@gmail.com \
--cc=dvhart@infradead.org \
--cc=kristian@klausen.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=yurii.pavlovskyi@gmail.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).