* [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
@ 2015-03-03 10:52 Nicholas Mc Guire
2015-03-03 14:11 ` Sergei Shtylyov
2015-03-19 3:27 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Nicholas Mc Guire @ 2015-03-03 10:52 UTC (permalink / raw)
To: David S. Miller; +Cc: Joe Perches, linux-ide, linux-kernel, Nicholas Mc Guire
Use jiffies_to_msecs for converting jiffies as it handles all of the corner
cases reliably and also helps readability. The printk format is fixed up
as jiffies_to_msecs returns unsigned int not unsigned long.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
v2: change printk format string from %d to %u as suggested by
Joe Perches <joe@perches.com>.
Note that this patch will give a checkpatch warning due to "quoted string
split across lines" but thats not related to this change.
This was only compile tested with x86_64_defconfig + CONFIG_IDE=m,
CONFIG_BLK_DEV_IDETAPE=m
Patch is against 4.0-rc1 (localversion-next is -next-20150303)
drivers/ide/ide-tape.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1793aea..d9ce376 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1793,11 +1793,11 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
tape->best_dsc_rw_freq = clamp_t(unsigned long, t, IDETAPE_DSC_RW_MIN,
IDETAPE_DSC_RW_MAX);
printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, "
- "%lums tDSC%s\n",
+ "%ums tDSC%s\n",
drive->name, tape->name, *(u16 *)&tape->caps[14],
(*(u16 *)&tape->caps[16] * 512) / tape->buffer_size,
tape->buffer_size / 1024,
- tape->best_dsc_rw_freq * 1000 / HZ,
+ jiffies_to_msecs(tape->best_dsc_rw_freq),
(drive->dev_flags & IDE_DFLAG_USING_DMA) ? ", DMA" : "");
ide_proc_register_driver(drive, tape->driver);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
2015-03-03 10:52 [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs Nicholas Mc Guire
@ 2015-03-03 14:11 ` Sergei Shtylyov
2015-03-03 14:15 ` Nicholas Mc Guire
2015-03-20 9:54 ` Geert Uytterhoeven
2015-03-19 3:27 ` David Miller
1 sibling, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2015-03-03 14:11 UTC (permalink / raw)
To: Nicholas Mc Guire, David S. Miller; +Cc: Joe Perches, linux-ide, linux-kernel
Hello.
On 3/3/2015 1:52 PM, Nicholas Mc Guire wrote:
> Use jiffies_to_msecs for converting jiffies as it handles all of the corner
> cases reliably and also helps readability. The printk format is fixed up
> as jiffies_to_msecs returns unsigned int not unsigned long.
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
> v2: change printk format string from %d to %u as suggested by
> Joe Perches <joe@perches.com>.
> Note that this patch will give a checkpatch warning due to "quoted string
> split across lines" but thats not related to this change.
> This was only compile tested with x86_64_defconfig + CONFIG_IDE=m,
> CONFIG_BLK_DEV_IDETAPE=m
> Patch is against 4.0-rc1 (localversion-next is -next-20150303)
>
> drivers/ide/ide-tape.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
The driver is called ide-tape.c, yet your subject prefix is "ide_tape:".
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
2015-03-03 14:11 ` Sergei Shtylyov
@ 2015-03-03 14:15 ` Nicholas Mc Guire
2015-03-03 14:22 ` Sergei Shtylyov
2015-03-20 9:54 ` Geert Uytterhoeven
1 sibling, 1 reply; 6+ messages in thread
From: Nicholas Mc Guire @ 2015-03-03 14:15 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Nicholas Mc Guire, David S. Miller, Joe Perches, linux-ide, linux-kernel
On Tue, 03 Mar 2015, Sergei Shtylyov wrote:
> Hello.
>
> On 3/3/2015 1:52 PM, Nicholas Mc Guire wrote:
>
>> Use jiffies_to_msecs for converting jiffies as it handles all of the corner
>> cases reliably and also helps readability. The printk format is fixed up
>> as jiffies_to_msecs returns unsigned int not unsigned long.
>
>> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
>> ---
>
>> v2: change printk format string from %d to %u as suggested by
>> Joe Perches <joe@perches.com>.
>
>> Note that this patch will give a checkpatch warning due to "quoted string
>> split across lines" but thats not related to this change.
>
>> This was only compile tested with x86_64_defconfig + CONFIG_IDE=m,
>> CONFIG_BLK_DEV_IDETAPE=m
>
>> Patch is against 4.0-rc1 (localversion-next is -next-20150303)
>>
>> drivers/ide/ide-tape.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> The driver is called ide-tape.c, yet your subject prefix is "ide_tape:".
>
that is based on the output of git log --oneline and it seems that it is
the common prefix - in fact it seem rare to use the c-file name as prefix
for patch subjects.
thx!
ofrat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
2015-03-03 14:15 ` Nicholas Mc Guire
@ 2015-03-03 14:22 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2015-03-03 14:22 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Nicholas Mc Guire, David S. Miller, Joe Perches, linux-ide, linux-kernel
On 3/3/2015 5:15 PM, Nicholas Mc Guire wrote:
>>> Use jiffies_to_msecs for converting jiffies as it handles all of the corner
>>> cases reliably and also helps readability. The printk format is fixed up
>>> as jiffies_to_msecs returns unsigned int not unsigned long.
>>> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
>>> ---
>>> v2: change printk format string from %d to %u as suggested by
>>> Joe Perches <joe@perches.com>.
>>> Note that this patch will give a checkpatch warning due to "quoted string
>>> split across lines" but thats not related to this change.
>>> This was only compile tested with x86_64_defconfig + CONFIG_IDE=m,
>>> CONFIG_BLK_DEV_IDETAPE=m
>>> Patch is against 4.0-rc1 (localversion-next is -next-20150303)
>>> drivers/ide/ide-tape.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> The driver is called ide-tape.c, yet your subject prefix is "ide_tape:".
> that is based on the output of git log --oneline and it seems that it is
> the common prefix - in fact it seem rare to use the c-file name as prefix
> for patch subjects.
Huh, what else is to be used for the prefix if not the file name?
I would really like the prefix to be changed to "ide-tape", however it's
up for DaveM, of course.
> thx!
> ofrat
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
2015-03-03 10:52 [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs Nicholas Mc Guire
2015-03-03 14:11 ` Sergei Shtylyov
@ 2015-03-19 3:27 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2015-03-19 3:27 UTC (permalink / raw)
To: hofrat; +Cc: joe, linux-ide, linux-kernel
From: Nicholas Mc Guire <hofrat@osadl.org>
Date: Tue, 3 Mar 2015 05:52:51 -0500
> Use jiffies_to_msecs for converting jiffies as it handles all of the corner
> cases reliably and also helps readability. The printk format is fixed up
> as jiffies_to_msecs returns unsigned int not unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> v2: change printk format string from %d to %u as suggested by
> Joe Perches <joe@perches.com>.
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs
2015-03-03 14:11 ` Sergei Shtylyov
2015-03-03 14:15 ` Nicholas Mc Guire
@ 2015-03-20 9:54 ` Geert Uytterhoeven
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2015-03-20 9:54 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Nicholas Mc Guire, David S. Miller, Joe Perches, linux-ide, linux-kernel
On Tue, Mar 3, 2015 at 3:11 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>> drivers/ide/ide-tape.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> The driver is called ide-tape.c, yet your subject prefix is "ide_tape:".
FWIW, modprobe considers dashes and underscores identical,
so if it's compiled as a module, it can be loaded using both
"modprobe ide-tape.ko" and "modprobe ide_tape.ko".
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-20 9:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 10:52 [PATCH v2] ide_tape: convert jiffies with jiffies_to_msecs Nicholas Mc Guire
2015-03-03 14:11 ` Sergei Shtylyov
2015-03-03 14:15 ` Nicholas Mc Guire
2015-03-03 14:22 ` Sergei Shtylyov
2015-03-20 9:54 ` Geert Uytterhoeven
2015-03-19 3:27 ` David Miller
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).