From: Markos Chandras <markos.chandras@imgtec.com> To: <linux-mips@linux-mips.org> Cc: Markos Chandras <markos.chandras@imgtec.com>, <sibyte-users@bitmover.com>, Wim Van Sebroeck <wim@iguana.be> Subject: [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Date: Tue, 18 Jun 2013 15:00:06 +0100 [thread overview] Message-ID: <1371564006-31805-1-git-send-email-markos.chandras@imgtec.com> (raw) Fixes the following linking problem: drivers/watchdog/sb_wdog.c:211: undefined reference to `__udivdi3' Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: sibyte-users@bitmover.com Cc: Wim Van Sebroeck <wim@iguana.be> --- This patch is for the upstream-sfr/mips-for-linux-next tree --- drivers/watchdog/sb_wdog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c index 25c7a3f..35b96738 100644 --- a/drivers/watchdog/sb_wdog.c +++ b/drivers/watchdog/sb_wdog.c @@ -170,6 +170,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; + u64 tmp_user_dog; unsigned long time; void __user *argp = (void __user *)arg; int __user *p = argp; @@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, * get the remaining count from the ... count register * which is 1*8 before the config register */ - ret = put_user(__raw_readq(user_dog - 8) / 1000000, p); + tmp_user_dog = __raw_readq(user_dog - 8); + do_div(tmp_user_dog, 1000000); + ret = put_user(tmp_user_dog, p); break; } return ret; -- 1.8.2.1
WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <markos.chandras@imgtec.com> To: linux-mips@linux-mips.org Cc: Markos Chandras <markos.chandras@imgtec.com>, sibyte-users@bitmover.com, Wim Van Sebroeck <wim@iguana.be> Subject: [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Date: Tue, 18 Jun 2013 15:00:06 +0100 [thread overview] Message-ID: <1371564006-31805-1-git-send-email-markos.chandras@imgtec.com> (raw) Message-ID: <20130618140006.LWD3bXjl-fD8t2wqdV0W9kBgH3qVMeld4nC1qr0ZEGI@z> (raw) Fixes the following linking problem: drivers/watchdog/sb_wdog.c:211: undefined reference to `__udivdi3' Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: sibyte-users@bitmover.com Cc: Wim Van Sebroeck <wim@iguana.be> --- This patch is for the upstream-sfr/mips-for-linux-next tree --- drivers/watchdog/sb_wdog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c index 25c7a3f..35b96738 100644 --- a/drivers/watchdog/sb_wdog.c +++ b/drivers/watchdog/sb_wdog.c @@ -170,6 +170,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; + u64 tmp_user_dog; unsigned long time; void __user *argp = (void __user *)arg; int __user *p = argp; @@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, * get the remaining count from the ... count register * which is 1*8 before the config register */ - ret = put_user(__raw_readq(user_dog - 8) / 1000000, p); + tmp_user_dog = __raw_readq(user_dog - 8); + do_div(tmp_user_dog, 1000000); + ret = put_user(tmp_user_dog, p); break; } return ret; -- 1.8.2.1
next reply other threads:[~2013-06-18 14:00 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-06-18 14:00 Markos Chandras [this message] 2013-06-18 14:00 ` [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Markos Chandras 2013-06-18 14:14 ` Ralf Baechle 2013-06-19 7:45 ` Yousong Zhou 2013-06-19 7:48 ` Yousong Zhou 2013-06-19 8:55 ` Ralf Baechle 2013-06-27 19:59 ` Wim Van Sebroeck 2013-06-27 20:09 ` Wim Van Sebroeck
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=1371564006-31805-1-git-send-email-markos.chandras@imgtec.com \ --to=markos.chandras@imgtec.com \ --cc=linux-mips@linux-mips.org \ --cc=sibyte-users@bitmover.com \ --cc=wim@iguana.be \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.