From: Nicholas Mc Guire <hofrat@osadl.org>
To: Willem Riede <osst@riede.org>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
osst-users@lists.sourceforge.net, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH] [SCSI] osst: remove double conversion of timeout
Date: Thu, 7 Jan 2016 21:10:33 +0100 [thread overview]
Message-ID: <1452197433-26086-1-git-send-email-hofrat@osadl.org> (raw)
If the time is actually in jiffies already it seems cleaner to call
schedule_timeout_interruptible() than to call msleep and covert the
timeout. In this case it will actually optimize the code a bit as
it does not need to call jiffies_to_msecs here.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
problem was found by coccinelle spatch
patch was compile tested with: x86_64_defconfig +
CONFIG_CHR_DEV_OSST=m
patch is against linux-next (localversion-next is -next-20160107)
drivers/scsi/osst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 5033223..d8e5aa9 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -760,7 +760,7 @@ static int osst_wait_ready(struct osst_tape * STp, struct osst_request ** aSRpnt
#endif
if (initial_delay > 0)
- msleep(jiffies_to_msecs(initial_delay));
+ schedule_timeout_uninterruptible(initial_delay);
memset(cmd, 0, MAX_COMMAND_SIZE);
cmd[0] = TEST_UNIT_READY;
--
2.1.4
next reply other threads:[~2016-01-07 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 20:10 Nicholas Mc Guire [this message]
2016-01-08 0:02 ` Seymour, Shane M
2016-01-08 7:31 ` Nicholas Mc Guire
2016-01-11 0:54 ` Seymour, Shane M
2016-01-12 15:10 ` Nicholas Mc Guire
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=1452197433-26086-1-git-send-email-hofrat@osadl.org \
--to=hofrat@osadl.org \
--cc=JBottomley@odin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=osst-users@lists.sourceforge.net \
--cc=osst@riede.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
all inboxes | Powered by JetHome®