Skip to content

Commit

Permalink
kern: Run v fmt -w .
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Aug 20, 2024
1 parent 47e2a16 commit ea4ccba
Show file tree
Hide file tree
Showing 27 changed files with 838 additions and 896 deletions.
4 changes: 2 additions & 2 deletions kernel/modules/block/partition/partition.v
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int {

mut partition := &Partition{
device_offset: u64(partition_entry.starting_lba * parent_device.stat.blksize)
sector_cnt: partition_entry.last_lba - partition_entry.starting_lba
sector_cnt: partition_entry.last_lba - partition_entry.starting_lba
parent_device: unsafe { parent_device }
}

Expand Down Expand Up @@ -184,7 +184,7 @@ pub fn scan_partitions(mut parent_device resource.Resource, prefix string) int {

mut partition := &Partition{
device_offset: u64(partition_entry.starting_lba * parent_device.stat.blksize)
sector_cnt: partition_entry.sector_cnt
sector_cnt: partition_entry.sector_cnt
parent_device: unsafe { parent_device }
}

Expand Down
2 changes: 1 addition & 1 deletion kernel/modules/dev/ahci/ahci.v
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ pub fn (mut c AHCIController) initialise(pci_device &pci.PCIDevice) int {

mut device := &AHCIDevice{
parent_controller: unsafe { c }
regs: port
regs: port
}

device.initialise() or {
Expand Down
26 changes: 13 additions & 13 deletions kernel/modules/dev/ata/ata.v
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@ fn init_ata_drive(port_index int, mut pci_device pci.PCIDevice) ?&ATADrive {
bar4 &= 0xfffffffc
}
mut dev := &ATADrive{
is_master: port_index % 2 != 0
data_port: port
error_port: port + 1
is_master: port_index % 2 != 0
data_port: port
error_port: port + 1
sector_count_port: port + 2
lba_low_port: port + 3
lba_mid_port: port + 4
lba_hi_port: port + 5
device_port: port + 6
cmd_port: port + 7
bar4: bar4
bmr_command: bar4
bmr_status: bar4 + 2
bmr_prdt: bar4 + 4
prdt: &PRDT(unsafe { nil })
lba_low_port: port + 3
lba_mid_port: port + 4
lba_hi_port: port + 5
device_port: port + 6
cmd_port: port + 7
bar4: bar4
bmr_command: bar4
bmr_status: bar4 + 2
bmr_prdt: bar4 + 4
prdt: &PRDT(unsafe { nil })
// To be filled later.
prdt_phys: 0
// To be filled later.
Expand Down
88 changes: 44 additions & 44 deletions kernel/modules/dev/fbdev/simple/simple.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pub mut:

__global (
simplefb_driver = api.FramebufferDriver{
name: 'simplefb'
init: simple_init
name: 'simplefb'
init: simple_init
register_device: unsafe { nil }
}
simplefb_initialized = false
Expand All @@ -47,53 +47,53 @@ fn simple_init() {

fn do_register(config &SimpleFBConfig) {
info := api.FramebufferInfo{
base: voidptr(config.physical_address)
size: config.stride * config.height
base: voidptr(config.physical_address)
size: config.stride * config.height
driver: &simplefb_driver
fixed: api.FBFixScreenInfo{
id: [16]u8{}
smem_start: 0
smem_len: config.stride * config.height
@type: api.fb_type_packed_pixels
type_aux: 0
visual: api.fb_visual_truecolor
xpanstep: 0
ypanstep: 0
ywrapstep: 0
fixed: api.FBFixScreenInfo{
id: [16]u8{}
smem_start: 0
smem_len: config.stride * config.height
@type: api.fb_type_packed_pixels
type_aux: 0
visual: api.fb_visual_truecolor
xpanstep: 0
ypanstep: 0
ywrapstep: 0
line_length: config.stride
mmio_start: 0
mmio_len: 0
accel: 0
mmio_start: 0
mmio_len: 0
accel: 0
}
variable: api.FBVarScreenInfo{
xres: config.width
yres: config.height
xres_virtual: config.width
yres_virtual: config.height
xoffset: 0
yoffset: 0
xres: config.width
yres: config.height
xres_virtual: config.width
yres_virtual: config.height
xoffset: 0
yoffset: 0
bits_per_pixel: config.bits_per_pixel
grayscale: 0
red: config.red
green: config.green
blue: config.blue
transp: config.transp
nonstd: 0
activate: api.fb_activate_now
height: 0
width: 0
accel_flags: 0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: api.fb_vmode_noninterlaced
rotate: 0
reserved: [4]u32{}
grayscale: 0
red: config.red
green: config.green
blue: config.blue
transp: config.transp
nonstd: 0
activate: api.fb_activate_now
height: 0
width: 0
accel_flags: 0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: api.fb_vmode_noninterlaced
rotate: 0
reserved: [4]u32{}
}
}

Expand Down
Loading

0 comments on commit ea4ccba

Please sign in to comment.