* [PATCH -next] ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it
@ 2022-09-27 14:11 Shang XiaoJing
2022-09-29 6:12 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Shang XiaoJing @ 2022-09-27 14:11 UTC (permalink / raw)
To: perex, tiwai, alsa-devel; +Cc: shangxiaojing
Use DIV_ROUND_UP() instead of open-coding it, which intents and makes
it more clear what is going on for the casual reviewer.
The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use
DIV_ROUND_UP() instead of open-coding it").
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
---
sound/isa/sb/emu8000_pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
index f8d90a1e989b..c8afc4347c54 100644
--- a/sound/isa/sb/emu8000_pcm.c
+++ b/sound/isa/sb/emu8000_pcm.c
@@ -236,7 +236,7 @@ static int emu8k_pcm_open(struct snd_pcm_substream *subs)
/* use timer to update periods.. (specified in msec) */
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
- (1000000 + HZ - 1) / HZ, UINT_MAX);
+ DIV_ROUND_UP(1000000, HZ), UINT_MAX);
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it
2022-09-27 14:11 [PATCH -next] ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it Shang XiaoJing
@ 2022-09-29 6:12 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-09-29 6:12 UTC (permalink / raw)
To: Shang XiaoJing; +Cc: alsa-devel, tiwai
On Tue, 27 Sep 2022 16:11:10 +0200,
Shang XiaoJing wrote:
>
> Use DIV_ROUND_UP() instead of open-coding it, which intents and makes
> it more clear what is going on for the casual reviewer.
>
> The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use
> DIV_ROUND_UP() instead of open-coding it").
>
> Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-29 6:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 14:11 [PATCH -next] ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it Shang XiaoJing
2022-09-29 6:12 ` Takashi Iwai
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).