mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
ANDROID: fix wakeup reason findings
The 0-day test bot found three minor issues in the wakeup_reason
enhancements patch, including two undeclared functions that should have
been static, an allegedly uninitialized pointer (which is actually set
in the line immediately prior to cppcheck's complaint), and a type
mismatch when printing timespec64 fields on a 32-bit build.
These changes address those findings.
Fixes: 189ced91cd ("ANDROID: power: wakeup_reason: wake reason
enhancements")
Bug: 153727431
Reported-by: kbuild test robot <lkp@intel.com>
Change-Id: I9194f85d0ca7921461866b73dc24e1783b1da6c6
Signed-off-by: Kelly Rossmoyer <krossmo@google.com>
This commit is contained in:
parent
5e9e19c783
commit
386d490592
1 changed files with 8 additions and 5 deletions
|
|
@ -108,7 +108,7 @@ static void delete_list(struct list_head *head)
|
|||
|
||||
static bool add_sibling_node_sorted(struct list_head *head, int irq)
|
||||
{
|
||||
struct wakeup_irq_node *n;
|
||||
struct wakeup_irq_node *n = NULL;
|
||||
struct list_head *predecessor = head;
|
||||
|
||||
if (unlikely(WARN_ON(!head)))
|
||||
|
|
@ -213,7 +213,8 @@ void log_threaded_irq_wakeup_reason(int irq, int parent_irq)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(log_threaded_irq_wakeup_reason);
|
||||
|
||||
void __log_abort_or_abnormal_wake(bool abort, const char *fmt, va_list args)
|
||||
static void __log_abort_or_abnormal_wake(bool abort, const char *fmt,
|
||||
va_list args)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
|
|
@ -351,8 +352,10 @@ static ssize_t last_suspend_time_show(struct kobject *kobj,
|
|||
|
||||
/* Export suspend_resume_time and sleep_time in pair here. */
|
||||
return sprintf(buf, "%llu.%09lu %llu.%09lu\n",
|
||||
suspend_resume_time.tv_sec, suspend_resume_time.tv_nsec,
|
||||
sleep_time.tv_sec, sleep_time.tv_nsec);
|
||||
(unsigned long long)suspend_resume_time.tv_sec,
|
||||
suspend_resume_time.tv_nsec,
|
||||
(unsigned long long)sleep_time.tv_sec,
|
||||
sleep_time.tv_nsec);
|
||||
}
|
||||
|
||||
static struct kobj_attribute resume_reason = __ATTR_RO(last_resume_reason);
|
||||
|
|
@ -396,7 +399,7 @@ static struct notifier_block wakeup_reason_pm_notifier_block = {
|
|||
.notifier_call = wakeup_reason_pm_event,
|
||||
};
|
||||
|
||||
int __init wakeup_reason_init(void)
|
||||
static int __init wakeup_reason_init(void)
|
||||
{
|
||||
if (register_pm_notifier(&wakeup_reason_pm_notifier_block)) {
|
||||
pr_warn("[%s] failed to register PM notifier\n", __func__);
|
||||
|
|
|
|||
Loading…
Reference in a new issue