Skip to contentSkip to conversation

disk/ahci.c: remove conditional operator for endtime

PATCH In review Leo Sandoval 2 participants 2 messages Jan 22, 2025 – Feb 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disk/ahci.c: remove conditional operator for endtime

The conditional makes no sense when the two possible expressions have the same value, so remove it (perhaps the compiler does it for us but better to remove it).

---
 grub-core/disk/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/disk/ahci.c +1 -1
index e7b5dc5f2..b247161b9 100644
@@ -1038,7 +1038,7 @@ grub_ahci_readwrite_real (struct grub_ahci_device *dev,
   grub_dprintf ("ahci", "AHCI tfd = %x\n",
 		dev->hba->ports[dev->port].task_file_data);
 
-  endtime = grub_get_time_ms () + (spinup ? 20000 : 20000);
+  endtime = grub_get_time_ms () + 20000;
   while ((dev->hba->ports[dev->port].command_issue & 1))
     if (grub_get_time_ms () > endtime ||
 	(dev->hba->ports[dev->port].intstatus & GRUB_AHCI_HBA_PORT_IS_FATAL_MASK))
Signature · 7 lines
2.47.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel