mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
HV:fix "Pointer param should be declared pointer to const"
Fix violations for function whose parameter can be read-only. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -22,9 +22,9 @@ static void complete_ioreq(struct vhm_request *vhm_req)
|
||||
* request having transferred to the COMPLETE state.
|
||||
*/
|
||||
static void
|
||||
emulate_pio_post(struct vcpu *vcpu, struct io_request *io_req)
|
||||
emulate_pio_post(struct vcpu *vcpu, const struct io_request *io_req)
|
||||
{
|
||||
struct pio_request *pio_req = &io_req->reqs.pio;
|
||||
const struct pio_request *pio_req = &io_req->reqs.pio;
|
||||
uint64_t mask = 0xFFFFFFFFUL >> (32UL - 8UL * pio_req->size);
|
||||
|
||||
if (pio_req->direction == REQUEST_READ) {
|
||||
@@ -68,9 +68,9 @@ void dm_emulate_pio_post(struct vcpu *vcpu)
|
||||
* either a previous call to emulate_io() returning 0 or the corresponding VHM
|
||||
* request having transferred to the COMPLETE state.
|
||||
*/
|
||||
void emulate_mmio_post(struct vcpu *vcpu, struct io_request *io_req)
|
||||
void emulate_mmio_post(struct vcpu *vcpu, const struct io_request *io_req)
|
||||
{
|
||||
struct mmio_request *mmio_req = &io_req->reqs.mmio;
|
||||
const struct mmio_request *mmio_req = &io_req->reqs.mmio;
|
||||
|
||||
if (mmio_req->direction == REQUEST_READ) {
|
||||
/* Emulate instruction and update vcpu register set */
|
||||
@@ -451,7 +451,7 @@ void setup_io_bitmap(struct vm *vm)
|
||||
}
|
||||
}
|
||||
|
||||
void register_io_emulation_handler(struct vm *vm, struct vm_io_range *range,
|
||||
void register_io_emulation_handler(struct vm *vm, const struct vm_io_range *range,
|
||||
io_read_fn_t io_read_fn_ptr,
|
||||
io_write_fn_t io_write_fn_ptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user