Re: [PATCH 1/5] KVM: selftests: Generalize check_clocksource() from kvm_clock_test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 09, 2024, Vitaly Kuznetsov wrote:
> +bool sys_clocksource_is_tsc(void)
> +{
> +	char *clk_name = sys_get_cur_clocksource();
> +	bool ret = false;
> +
> +	if (!strcmp(clk_name, "tsc\n"))
> +		ret = true;

This can more simply be:

	bool ret = !strcmp(clk_name, "tsc\n");

and then

	bool ret = !strcmp(clk_name, "tsc\n") ||
		   !strcmp(clk_name, "hyperv_clocksource_tsc_page\n");

when the Hyper-V variant comes along.  I'll fixup when applying unless you
violently disagree.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux