Skip to content

Commit

Permalink
Add fixes for warnings
Browse files Browse the repository at this point in the history
Acknowledge that memcpy doesn't take a volatile pointer,
this is ok because memcpy doesn't mess around with the memory
  • Loading branch information
thesilvanator authored and 29jm committed Jul 10, 2022
1 parent 9455d05 commit c893918
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/src/devices/sata.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool sata_identify_device(sata_device_t* dev) {
cmd.command = ATA_CMD_IDENTIFY_DEV;

// move command to
memcpy(tbl,&cmd,sizeof(cmd));
memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd));

// issue command
port->ci = 0x01;
Expand Down Expand Up @@ -246,7 +246,7 @@ bool sata_read_device(sata_device_t* dev, uint32_t block_num_l, uint16_t block_n
cmd.lba5 = (block_num_h >> 8) & 0xFF;

// move command to table
memcpy(tbl,&cmd,sizeof(cmd));
memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd));

// issue command
port->ci = 0x01;
Expand Down Expand Up @@ -297,7 +297,7 @@ bool sata_write_device(sata_device_t* dev, uint32_t block_num_l, uint16_t block_
memcpy(dev->data_base_virt, buf, SATA_BLOCK_SIZE);

// move command to table
memcpy(tbl,&cmd,sizeof(cmd));
memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd));

// issue command
port->ci = 0x01;
Expand Down

0 comments on commit c893918

Please sign in to comment.