disk/ahci.c: remove conditional operator for endtime
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).
Signed-off-by Leo Sandoval <[email protected]>
--- grub-core/disk/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/disk/ahci.c +1 -1
@@ -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
Quoted 5 lines · Leo Sandoval
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).
Signed-off-by Leo Sandoval <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel