diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-06-25 21:07:32 +0900 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-09-07 10:16:55 +0900 |
commit | 5bb52d926598a018b1510fd6684dcbaed31d57f2 (patch) | |
tree | 4848941543bc90b6aa2052f76bb1d305a3bfd155 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | |
parent | a16951510fae8fa9b934673404c4fc990d124ccd (diff) |
ata: libata: Improve __ata_qc_complete()
The function __ata_qc_complete() is always called with a qc that already
has been dereferenced and so is guaranteed to be non-NULL (as otherwise
the kernel would have crashed). So remove the warning for a NULL qc as
it is useless.
Furthermore, the qc passed to __ata_qc_complete() must always be marked
as active with the ATA_QCFLAG_ACTIVE flag. If that is not the case, in
addition to the existing warning, return early so that we do not attempt
to complete an invalid qc.
Finally, fix the comment related to clearing the qc active flag as that
operation applies to all devices, not just ATAPI ones.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h')
0 files changed, 0 insertions, 0 deletions