Skip to content

Commit 538ae4f

Browse files
phip1611roypat
authored andcommitted
style: clippy and formatting fixes
Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected] Signed-off-by: Patrick Roy <[email protected]>
1 parent 3b2ec8d commit 538ae4f

File tree

4 files changed

+52
-52
lines changed

4 files changed

+52
-52
lines changed

kvm-ioctls/src/ioctls/device.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ impl DeviceFd {
101101
/// # Arguments
102102
///
103103
/// * `device_attr` - The device attribute to be get.
104-
/// Note: This argument serves as both input and output.
105-
/// When calling this function, the user should explicitly provide
106-
/// valid values for the `group` and the `attr` field of the
107-
/// `kvm_device_attr` structure, and a valid userspace address
108-
/// (i.e. the `addr` field) to access the returned device attribute
109-
/// data.
104+
/// Note: This argument serves as both input and output.
105+
/// When calling this function, the user should explicitly provide
106+
/// valid values for the `group` and the `attr` field of the
107+
/// `kvm_device_attr` structure, and a valid userspace address
108+
/// (i.e. the `addr` field) to access the returned device attribute
109+
/// data.
110110
///
111111
/// # Returns
112112
///
113113
/// * Returns the last occured `errno` wrapped in an `Err`.
114114
/// * `device_attr` - The `addr` field of the `device_attr` structure will point to
115-
/// the device attribute data.
115+
/// the device attribute data.
116116
///
117117
/// # Safety
118118
///

kvm-ioctls/src/ioctls/system.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl Kvm {
370370
/// # Arguments
371371
///
372372
/// * `num_entries` - Maximum number of CPUID entries. This function can return less than
373-
/// this when the hardware does not support so many CPUID entries.
373+
/// this when the hardware does not support so many CPUID entries.
374374
///
375375
/// Returns Error `errno::Error(libc::ENOMEM)` when the input `num_entries` is greater than
376376
/// `KVM_MAX_CPUID_ENTRIES`.
@@ -399,7 +399,7 @@ impl Kvm {
399399
/// # Arguments
400400
///
401401
/// * `num_entries` - Maximum number of CPUID entries. This function can return less than
402-
/// this when the hardware does not support so many CPUID entries.
402+
/// this when the hardware does not support so many CPUID entries.
403403
///
404404
/// Returns Error `errno::Error(libc::ENOMEM)` when the input `num_entries` is greater than
405405
/// `KVM_MAX_CPUID_ENTRIES`.
@@ -500,7 +500,7 @@ impl Kvm {
500500
/// # Arguments
501501
///
502502
/// * `msrs` - MSRs (input/output). For details check the `kvm_msrs` structure in the
503-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
503+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
504504
///
505505
/// # Example
506506
///
@@ -589,10 +589,10 @@ impl Kvm {
589589
/// # Arguments
590590
///
591591
/// * `ipa_size` - Guest VM IPA size, 32 <= ipa_size <= Host_IPA_Limit.
592-
/// The value of `Host_IPA_Limit` may be different between hardware
593-
/// implementations and can be extracted by calling `get_host_ipa_limit`.
594-
/// Possible values can be found in documentation of registers `TCR_EL2`
595-
/// and `VTCR_EL2`.
592+
/// The value of `Host_IPA_Limit` may be different between hardware
593+
/// implementations and can be extracted by calling `get_host_ipa_limit`.
594+
/// Possible values can be found in documentation of registers `TCR_EL2`
595+
/// and `VTCR_EL2`.
596596
///
597597
/// # Example
598598
///
@@ -619,7 +619,7 @@ impl Kvm {
619619
/// `KVM_GET_VCPU_MMAP_SIZE` ioctl.
620620
///
621621
/// * `vm_type` - Platform and architecture specific platform VM type. A value of 0 is the equivalent
622-
/// to using the default VM type.
622+
/// to using the default VM type.
623623
/// # Example
624624
///
625625
/// ```

kvm-ioctls/src/ioctls/vcpu.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl VcpuFd {
330330
/// # Arguments
331331
///
332332
/// * `regs` - general purpose registers. For details check the `kvm_regs` structure in the
333-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
333+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
334334
///
335335
/// # Example
336336
///
@@ -391,7 +391,7 @@ impl VcpuFd {
391391
/// # Arguments
392392
///
393393
/// * `sregs` - Special registers. For details check the `kvm_sregs` structure in the
394-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
394+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
395395
///
396396
/// # Example
397397
///
@@ -451,7 +451,7 @@ impl VcpuFd {
451451
/// # Arguments
452452
///
453453
/// * `fpu` - FPU configuration. For details check the `kvm_fpu` structure in the
454-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
454+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
455455
///
456456
/// # Example
457457
///
@@ -570,8 +570,8 @@ impl VcpuFd {
570570
/// # Arguments
571571
///
572572
/// * kvm_enable_cap - KVM capability structure. For details check the `kvm_enable_cap`
573-
/// structure in the
574-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
573+
/// structure in the
574+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
575575
///
576576
/// # Example
577577
///
@@ -646,7 +646,7 @@ impl VcpuFd {
646646
/// # Arguments
647647
///
648648
/// * `klapic` - LAPIC state. For details check the `kvm_lapic_state` structure in the
649-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
649+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
650650
/// # Example
651651
///
652652
/// ```rust
@@ -690,7 +690,7 @@ impl VcpuFd {
690690
/// # Arguments
691691
///
692692
/// * `msrs` - MSRs (input/output). For details check the `kvm_msrs` structure in the
693-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
693+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
694694
///
695695
/// # Example
696696
///
@@ -735,7 +735,7 @@ impl VcpuFd {
735735
/// # Arguments
736736
///
737737
/// * `msrs` - MSRs. For details check the `kvm_msrs` structure in the
738-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
738+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
739739
/// # Example
740740
///
741741
/// ```rust
@@ -876,7 +876,7 @@ impl VcpuFd {
876876
/// # Arguments
877877
///
878878
/// * `xsave` - A mutable reference to an [`Xsave`] instance that will be populated with the
879-
/// current vcpu's "xsave struct".
879+
/// current vcpu's "xsave struct".
880880
///
881881
/// # Safety
882882
///
@@ -1225,8 +1225,8 @@ impl VcpuFd {
12251225
/// # Arguments
12261226
///
12271227
/// * `kvi` - information about preferred CPU target type and recommended features for it.
1228-
/// For details check the `kvm_vcpu_init` structure in the
1229-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1228+
/// For details check the `kvm_vcpu_init` structure in the
1229+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
12301230
///
12311231
/// # Example
12321232
/// ```rust
@@ -1315,8 +1315,8 @@ impl VcpuFd {
13151315
/// # Arguments
13161316
///
13171317
/// * `reg_list` - list of registers (input/output). For details check the `kvm_reg_list`
1318-
/// structure in the
1319-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1318+
/// structure in the
1319+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
13201320
///
13211321
/// # Example
13221322
///
@@ -1359,8 +1359,8 @@ impl VcpuFd {
13591359
/// # Arguments
13601360
///
13611361
/// * `debug_struct` - control bitfields and debug registers, depending on the specific architecture.
1362-
/// For details check the `kvm_guest_debug` structure in the
1363-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1362+
/// For details check the `kvm_guest_debug` structure in the
1363+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
13641364
///
13651365
/// # Example
13661366
///

kvm-ioctls/src/ioctls/vm.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ impl VmFd {
6969
/// # Arguments
7070
///
7171
/// * `user_memory_region` - Guest physical memory slot. For details check the
72-
/// `kvm_userspace_memory_region` structure in the
73-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
72+
/// `kvm_userspace_memory_region` structure in the
73+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
7474
///
7575
/// # Safety
7676
///
@@ -124,8 +124,8 @@ impl VmFd {
124124
/// # Arguments
125125
///
126126
/// * `user_memory_region2` - Guest physical memory slot. For details check the
127-
/// `kvm_userspace_memory_region2` structure in the
128-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
127+
/// `kvm_userspace_memory_region2` structure in the
128+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
129129
///
130130
/// # Safety
131131
///
@@ -378,7 +378,7 @@ impl VmFd {
378378
/// # Arguments
379379
///
380380
/// * pit_config - PIT configuration. For details check the `kvm_pit_config` structure in the
381-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
381+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
382382
/// # Example
383383
///
384384
/// ```rust
@@ -550,7 +550,7 @@ impl VmFd {
550550
/// # Arguments
551551
///
552552
/// * kvm_msi - MSI message configuration. For details check the `kvm_msi` structure in the
553-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
553+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
554554
/// # Example
555555
///
556556
/// In this example, the important function signal_msi() calling into
@@ -600,10 +600,10 @@ impl VmFd {
600600
/// # Arguments
601601
///
602602
/// * kvm_irq_routing - IRQ routing configuration. Describe all routes
603-
/// associated with GSI entries. For details check
604-
/// the `kvm_irq_routing` and `kvm_irq_routing_entry`
605-
/// structures in the
606-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
603+
/// associated with GSI entries. For details check
604+
/// the `kvm_irq_routing` and `kvm_irq_routing_entry`
605+
/// structures in the
606+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
607607
/// # Example
608608
///
609609
/// ```rust
@@ -653,11 +653,11 @@ impl VmFd {
653653
/// # Arguments
654654
///
655655
/// * `fd` - `EventFd` which will be signaled. When signaling, the usual `vmexit` to userspace
656-
/// is prevented.
656+
/// is prevented.
657657
/// * `addr` - Address being written to.
658658
/// * `datamatch` - Limits signaling `fd` to only the cases where the value being written is
659-
/// equal to this parameter. The size of `datamatch` is important and it must
660-
/// match the expected size of the guest's write.
659+
/// equal to this parameter. The size of `datamatch` is important and it must
660+
/// match the expected size of the guest's write.
661661
///
662662
/// # Example
663663
///
@@ -1260,7 +1260,7 @@ impl VmFd {
12601260
/// # Arguments
12611261
///
12621262
/// * `device`: device configuration. For details check the `kvm_create_device` structure in the
1263-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1263+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
12641264
///
12651265
/// # Example
12661266
///
@@ -1323,8 +1323,8 @@ impl VmFd {
13231323
///
13241324
/// # Arguments
13251325
/// * `kvi` - CPU target configuration (out). For details check the `kvm_vcpu_init`
1326-
/// structure in the
1327-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1326+
/// structure in the
1327+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
13281328
///
13291329
/// # Example
13301330
///
@@ -1358,8 +1358,8 @@ impl VmFd {
13581358
/// # Arguments
13591359
///
13601360
/// * kvm_enable_cap - KVM capability structure. For details check the `kvm_enable_cap`
1361-
/// structure in the
1362-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1361+
/// structure in the
1362+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
13631363
///
13641364
/// # Example
13651365
///
@@ -1487,8 +1487,8 @@ impl VmFd {
14871487
/// # Arguments
14881488
///
14891489
/// * kvm_create_guest_memfd - KVM create guest memfd structure. For details check the
1490-
/// `kvm_create_guest_memfd` structure in the
1491-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1490+
/// `kvm_create_guest_memfd` structure in the
1491+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
14921492
///
14931493
/// # Example
14941494
///
@@ -1539,8 +1539,8 @@ impl VmFd {
15391539
/// # Arguments
15401540
///
15411541
/// * kvm_memory_attributes - KVM set memory attributes structure. For details check the
1542-
/// `kvm_memory_attributes` structure in the
1543-
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
1542+
/// `kvm_memory_attributes` structure in the
1543+
/// [KVM API doc](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt).
15441544
///
15451545
/// # Example
15461546
///

0 commit comments

Comments
 (0)