summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/vbios
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/vbios')
-rw-r--r--drivers/gpu/nvgpu/common/vbios/bios.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/vbios/bios.c b/drivers/gpu/nvgpu/common/vbios/bios.c
index fc82c2e9..4e851b39 100644
--- a/drivers/gpu/nvgpu/common/vbios/bios.c
+++ b/drivers/gpu/nvgpu/common/vbios/bios.c
@@ -291,7 +291,7 @@ int nvgpu_bios_parse_rom(struct gk20a *g)
291 bool found = false; 291 bool found = false;
292 unsigned int i; 292 unsigned int i;
293 293
294 while (!last) { 294 while (last == 0) {
295 struct pci_exp_rom *pci_rom; 295 struct pci_exp_rom *pci_rom;
296 struct pci_data_struct *pci_data; 296 struct pci_data_struct *pci_data;
297 struct pci_ext_data_struct *pci_ext_data; 297 struct pci_ext_data_struct *pci_ext_data;
@@ -790,7 +790,7 @@ s8 nvgpu_bios_read_s8(struct gk20a *g, u32 offset)
790{ 790{
791 u32 val; 791 u32 val;
792 val = __nvgpu_bios_readbyte(g, offset); 792 val = __nvgpu_bios_readbyte(g, offset);
793 val = val & 0x80U ? (val | ~0xffU) : val; 793 val = ((val & 0x80U) != 0U) ? (val | ~0xffU) : val;
794 794
795 return (s8) val; 795 return (s8) val;
796} 796}
@@ -827,7 +827,7 @@ static void nvgpu_bios_init_xmemsel_zm_nv_reg_array(struct gk20a *g, bool *condi
827 827
828 strap = gk20a_readl(g, gc6_sci_strap_r()) & 0xfU; 828 strap = gk20a_readl(g, gc6_sci_strap_r()) & 0xfU;
829 829
830 index = g->bios.mem_strap_xlat_tbl_ptr ? 830 index = (g->bios.mem_strap_xlat_tbl_ptr != 0U) ?
831 nvgpu_bios_read_u8(g, g->bios.mem_strap_xlat_tbl_ptr + 831 nvgpu_bios_read_u8(g, g->bios.mem_strap_xlat_tbl_ptr +
832 strap) : strap; 832 strap) : strap;
833 833