[PATCH 4/4] HID: intel-ish-hid: Use secs_to_jiffies() instead of msecs_to_jiffies(sec * MSEC_PER_SEC)

Chen Changcheng <[email protected]>
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use the standard secs_to_jiffies() helper instead of open-coding
the conversion from seconds via msecs_to_jiffies(). This is more
efficient and improves code readability.

Detected by Coccinelle:
./intel-ish-hid/ishtp/ishtp-dev.h:272:25-28: WARNING opportunity for secs_to_jiffies()

Signed-off-by: Chen Changcheng <[email protected]>
---
 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h b/drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
index 4b0596eadf1c..9457c30b1507 100644
--- a/drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
+++ b/drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
@@ -269,7 +269,7 @@ struct ishtp_device {
 
 static inline unsigned long ishtp_secs_to_jiffies(unsigned long sec)
 {
-	return msecs_to_jiffies(sec * MSEC_PER_SEC);
+	return secs_to_jiffies(sec);
 }
 
 /*
-- 
2.25.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.