From: Randy Dunlap <rdunlap@infradead.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Randy Dunlap <rdunlap@infradead.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-pm@vger.kernel.org
Subject: [PATCH] cpufreq: sc520_freq: add 'fallthrough' to one case
Date: Mon, 3 May 2021 09:18:40 -0700 [thread overview]
Message-ID: <20210503161840.26771-1-rdunlap@infradead.org> (raw)
Quieten an implicit-fallthrough warning in sc520_freq.c:
../drivers/cpufreq/sc520_freq.c: In function 'sc520_freq_get_cpu_frequency':
../include/linux/printk.h:343:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
../drivers/cpufreq/sc520_freq.c:43:3: note: in expansion of macro 'pr_err'
pr_err("error: cpuctl register has unexpected value %02x\n",
../drivers/cpufreq/sc520_freq.c:45:2: note: here
case 0x01:
Fixes: bf6fc9fd2d848 ("[CPUFREQ] AMD Elan SC520 cpufreq driver.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
---
Found in linux-next but applies to mainline.
drivers/cpufreq/sc520_freq.c | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20210503.orig/drivers/cpufreq/sc520_freq.c
+++ linux-next-20210503/drivers/cpufreq/sc520_freq.c
@@ -42,6 +42,7 @@ static unsigned int sc520_freq_get_cpu_f
default:
pr_err("error: cpuctl register has unexpected value %02x\n",
clockspeed_reg);
+ fallthrough;
case 0x01:
return 100000;
case 0x02:
next reply other threads:[~2021-05-03 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 16:18 Randy Dunlap [this message]
2021-05-04 6:22 ` [PATCH] cpufreq: sc520_freq: add 'fallthrough' to one case Viresh Kumar
2021-05-18 22:19 ` Randy Dunlap
2021-05-21 16:53 ` Rafael J. Wysocki
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=20210503161840.26771-1-rdunlap@infradead.org \
--to=rdunlap@infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).