From: Arnd Bergmann <arnd@arndb.de>
To: Daniel Drake <dsd@gentoo.org>,
Ulrich Kunitz <kune@deine-taler.de>,
Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>
Cc: y2038@lists.linaro.org, Arnd Bergmann <arnd@arndb.de>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] zd1211rw: stop using deprecated get_seconds()
Date: Mon, 18 Jun 2018 17:11:15 +0200 [thread overview]
Message-ID: <20180618151142.1214422-2-arnd@arndb.de> (raw)
In-Reply-To: <20180618151142.1214422-1-arnd@arndb.de>
The get_seconds() function is deprecated because of the y2038 overflow.
In zd1211rw we don't even care about the absolute value, so this is
not a problem, but it's equally trivial to change to the non-deprecated
ktime_get_seconds().
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/zydas/zd1211rw/zd_chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
index 07b94eda9604..dd6a86b899eb 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
@@ -1341,7 +1341,7 @@ int zd_chip_control_leds(struct zd_chip *chip, enum led_status status)
case ZD_LED_SCANNING:
ioreqs[0].value = FW_LINK_OFF;
ioreqs[1].value = v[1] & ~other_led;
- if (get_seconds() % 3 == 0) {
+ if ((u32)ktime_get_seconds() % 3 == 0) {
ioreqs[1].value &= ~chip->link_led;
} else {
ioreqs[1].value |= chip->link_led;
--
2.9.0
next prev parent reply other threads:[~2018-06-18 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 15:11 [PATCH 1/4] cfg80211: track time using boottime Arnd Bergmann
2018-06-18 15:11 ` Arnd Bergmann [this message]
2018-06-27 16:10 ` [2/4] zd1211rw: stop using deprecated get_seconds() Kalle Valo
2018-06-18 15:11 ` [PATCH 3/4] ipw2x00: track time using boottime Arnd Bergmann
2018-06-19 10:40 ` Stanislav Yakovlev
2018-06-18 15:11 ` [PATCH 4/4] ath9k: use timespec64 for tsf_ts Arnd Bergmann
2018-06-29 11:46 ` [4/4] " Kalle Valo
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=20180618151142.1214422-2-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=dsd@gentoo.org \
--cc=kune@deine-taler.de \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=y2038@lists.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).