disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
PATCH 1/2 disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
Date: Thu, 28 May 2015 19:14:19 +0200
Instead of hard coding 2 and 4 use the macros defined already at the top of the file.
--- grub-core/disk/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/disk/ahci.c +1 -1
@@ -552,7 +552,7 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |2 |4 ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2));
Signature · 1 line
2.1.4
PATCH 2/2 disk/ahci.c: Wrap too long line
Date: Thu, 28 May 2015 19:50:51 +0200
Using the macros the line is too long, so wrap it.
--- grub-core/disk/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
grub-core/disk/ahci.c +3 -1
@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) + |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP + |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2));
Signature · 1 line
2.1.4
Re: [PATCH 2/2] disk/ahci.c: Wrap too long line
Could you merge two patches?
В Thu, 28 May 2015 20:03:38 +0200
Paul Menzel <[email protected]> пишет:
Quoted 22 lines
Date: Thu, 28 May 2015 19:50:51 +0200
Using the macros the line is too long, so wrap it.
--- grub-core/disk/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)grub-core/disk/ahci.c +3
-1@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) + |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP + |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2));
PATCH v2 1/1 disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
Date: Thu, 28 May 2015 19:14:19 +0200
Instead of hard coding 2 and 4 use the macros defined already at the top of the file. As a consequence, wrap the now too long line.
---
v2: Merge both patches.
grub-core/disk/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
grub-core/disk/ahci.c +3 -1
@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |2 |4 ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) + |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP + |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2));
Signature · 1 line
2.1.4
Andrei Borzenkov
AppliedВ Sun, 07 Jun 2015 11:04:57 +0200
Paul Menzel <[email protected]> пишет:
Quoted 7 lines
Date: Thu, 28 May 2015 19:14:19 +0200
Instead of hard coding
2and4use the macros defined already at the top of the file. As a consequence, wrap the now too long line.
---
v2: Merge both patches.
applied.
Quoted 18 lines
grub-core/disk/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)grub-core/disk/ahci.c +3
-1@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |2 |4 ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) + |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP + |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2));
Re: [PATCH 2/2] disk/ahci.c: Wrap too long line
In reply to Paul MenzelPlease avoid sending patches to fix formatting of single lines. It's too cumbersome. If you care about such issues (I don't), let the file go through indent and proofread the result.
Quoted 30 lines · Paul Menzel
Date: Thu, 28 May 2015 19:50:51 +0200
Using the macros the line is too long, so wrap it.
--- grub-core/disk/ahci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)grub-core/disk/ahci.c +3
-1@@ -552,7 +552,9 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) + |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP + |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2)); _______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 4 lines · Paul Menzel
Date: Thu, 28 May 2015 19:14:19 +0200
Instead of hard coding
2and4use the macros defined already at the top of the file.
Splitting this and next patch makes absolutely no sense. If your changes makes formatting of the changes line ugly, change formatting in the same time unless it pollutes the view too much.
Quoted 25 lines
--- grub-core/disk/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)grub-core/disk/ahci.c +1
-1@@ -552,7 +552,7 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].sata_error); adevs[i]->hba->ports[adevs[i]->port].command - = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |2 |4 ; + = (adevs[i]->hba->ports[adevs[i]->port].command &0x0fffffff ) | (1 <<28 ) |GRUB_AHCI_HBA_PORT_CMD_SPIN_UP |GRUB_AHCI_HBA_PORT_CMD_POWER_ON ;/* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2)); _______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel