From: Dan Carpenter <dan.carpenter@oracle.com>
To: carlo@caione.org
Cc: linux-watchdog@vger.kernel.org
Subject: re: ARM: meson: add watchdog driver
Date: Thu, 9 Oct 2014 15:08:38 +0300 [thread overview]
Message-ID: <20141009120838.GA12751@mwanda> (raw)
Hello Carlo Caione,
The patch 2b0523c42849: "ARM: meson: add watchdog driver" from Sep
20, 2014, leads to the following static checker warning:
drivers/watchdog/meson_wdt.c:54 meson_restart_handle()
warn: was hexadecimal intended '100'
drivers/watchdog/meson_wdt.c
51 static int meson_restart_handle(struct notifier_block *this, unsigned long mode,
52 void *cmd)
53 {
54 u32 tc_reboot = MESON_WDT_DC_RESET | MESON_WDT_TC_EN | 100;
^^^
Is it supposed to be 0x100 here? Anyway, magic numbers are bad so this
should be changed probably.
55 struct meson_wdt_dev *meson_wdt = container_of(this,
56 struct meson_wdt_dev,
57 restart_handler);
58
59 while (1) {
60 writel(tc_reboot, meson_wdt->wdt_base + MESON_WDT_TC);
61 mdelay(5);
62 }
63
64 return NOTIFY_DONE;
65 }
regards,
dan carpenter
next reply other threads:[~2014-10-09 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 12:08 Dan Carpenter [this message]
2014-10-09 12:13 ` ARM: meson: add watchdog driver Carlo Caione
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=20141009120838.GA12751@mwanda \
--to=dan.carpenter@oracle.com \
--cc=carlo@caione.org \
--cc=linux-watchdog@vger.kernel.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