>> +    /// See nvkm_falcon_pio_wr
>> +    fn pio_wr<F: FalconFirmware<Target = E>>(
>> +        &self,
>> +        bar: &Bar0,
>> +        fw: &F,
>> +        target_mem: FalconMem,
>> +        load_offsets: &FalconLoadTarget,
>> +        port: u8,
>> +        tag: u16,
>> +    ) -> Result {
>> +        // FIXME: There's probably a better way to create a pointer to 
>> inside the firmware
>> +        // Maybe CoherentAllocation needs to implement a method for that.
>> +        let start = unsafe { fw.start_ptr().add(load_offsets.src_start as 
>> usize) };
>> +        self.pio_wr_bytes(bar, start,
>> +            load_offsets.dst_start as u16,
>
> Lossy conversions require comments. 'as' is a lossy conversion.

In this case, a fallible operation
(`load_offsets.dst_start.try_into()?`) might even be warranted.

Reply via email to