Re: [Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-21 Thread Paolo Bonzini
On 21/03/2016 17:02, rutu.shah...@gmail.com wrote: > > Hi, > This patch replaces get_ticks_per_sec() calls to NANOSECONDS_PER_SECOND. > Also, as there are no callers, get_ticks_per_sec() has been removed. > Replacement imporves readability and understandability of code. > > Example given by P

[Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-21 Thread rutu . shah . 26
From: Rutuja Shah Hi, This patch replaces get_ticks_per_sec() calls to NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec() has been removed. Replacement imporves readability and understandability of code. Example given by Paolo Bonzini, timer_mod(fdctrl->result_timer,

Re: [Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-21 Thread Christian Borntraeger
On 03/20/2016 07:31 PM, rutu.shah...@gmail.com wrote: > From: Rutuja Shah Can you add the patch description (with examples of why this is the right thing to do) here and not in the cover letter? > > Signed-off-by: Rutuja Shah > > --- > audio/audio.c | 3 +-- > audio/noaudio.c

Re: [Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-20 Thread rutuja shah
On Mon, Mar 21, 2016 at 12:01 AM, wrote: Hi, Some lines seem to have been skipped some how. This patch replaces get_ticks_per_sec() calls to NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec() has been removed. Replacement imporves readability and understandability of code.

[Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-20 Thread rutu . shah . 26
From: Rutuja Shah Signed-off-by: Rutuja Shah --- audio/audio.c | 3 +-- audio/noaudio.c | 8 audio/spiceaudio.c| 4 ++-- audio/wavaudio.c | 2 +- backends/baum.c | 2 +- block/qed.c | 2 +- cpus.c

[Qemu-devel] [PATCH v2] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

2016-03-20 Thread rutu . shah . 26
Example given by Paolo Bonzini, timer_mod(fdctrl->result_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50)); NANOSECONDS_PER_SECOND makes it obvious that the timer will expire in 1/50th of a second. --- audio/audio.c | 3 +-- audio/noaudio.c