HV: treewide: fix violations of coding guideline C-FN-06

The coding guideline rule C-FN-06 requires that 'a parameter passed by
value to a function shall not be modified directly'. This patch rewrites
two functions which does modify its parameters today.

This patch has no semantic impact.

Tracked-On: #6776
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Junjie Mao
2021-10-29 10:42:27 +08:00
committed by wenlingz
parent d4055d6157
commit fba343bd05
2 changed files with 4 additions and 4 deletions

View File

@@ -494,8 +494,7 @@ static void write_cfg_header(struct pci_vdev *vdev,
* even this PCI device has no INTx, so emulate INTx Line Register as writable.
*/
if (offset == PCIR_INTERRUPT_LINE) {
val &= 0xfU;
pci_vdev_write_vcfg(vdev, offset, bytes, val);
pci_vdev_write_vcfg(vdev, offset, bytes, (val & 0xfU));
}
}