grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
@ 2015-05-28 17:57 Paul Menzel
  2015-05-28 18:03 ` [PATCH 2/2] disk/ahci.c: Wrap too long line Paul Menzel
  2015-06-02 16:45 ` [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Menzel @ 2015-05-28 17:57 UTC (permalink / raw
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

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(-)

diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
index 7f75724..0825998 100644
--- a/grub-core/disk/ahci.c
+++ b/grub-core/disk/ahci.c
@@ -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));
-- 
2.1.4

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] disk/ahci.c: Wrap too long line
  2015-05-28 17:57 [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
@ 2015-05-28 18:03 ` Paul Menzel
  2015-05-31  6:28   ` Andrei Borzenkov
  2015-06-02 16:43   ` [PATCH 2/2] disk/ahci.c: Wrap too long line Vladimir 'φ-coder/phcoder' Serbinenko
  2015-06-02 16:45 ` [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 2 replies; 7+ messages in thread
From: Paul Menzel @ 2015-05-28 18:03 UTC (permalink / raw
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

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(-)

diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
index 0825998..fa7aa88 100644
--- a/grub-core/disk/ahci.c
+++ b/grub-core/disk/ahci.c
@@ -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));
-- 
2.1.4

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] disk/ahci.c: Wrap too long line
  2015-05-28 18:03 ` [PATCH 2/2] disk/ahci.c: Wrap too long line Paul Menzel
@ 2015-05-31  6:28   ` Andrei Borzenkov
  2015-06-07  9:04     ` [PATCH v2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
  2015-06-02 16:43   ` [PATCH 2/2] disk/ahci.c: Wrap too long line Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 1 reply; 7+ messages in thread
From: Andrei Borzenkov @ 2015-05-31  6:28 UTC (permalink / raw
  To: Paul Menzel; +Cc: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

Could you merge two patches?

В Thu, 28 May 2015 20:03:38 +0200
Paul Menzel <paulepanter@users.sourceforge.net> пишет:

> 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(-)
> 
> diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
> index 0825998..fa7aa88 100644
> --- a/grub-core/disk/ahci.c
> +++ b/grub-core/disk/ahci.c
> @@ -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));


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] disk/ahci.c: Wrap too long line
  2015-05-28 18:03 ` [PATCH 2/2] disk/ahci.c: Wrap too long line Paul Menzel
  2015-05-31  6:28   ` Andrei Borzenkov
@ 2015-06-02 16:43   ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 0 replies; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-06-02 16:43 UTC (permalink / raw
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

Please 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.
On 28.05.2015 20:03, Paul Menzel wrote:
> 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(-)
> 
> diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
> index 0825998..fa7aa88 100644
> --- a/grub-core/disk/ahci.c
> +++ b/grub-core/disk/ahci.c
> @@ -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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
  2015-05-28 17:57 [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
  2015-05-28 18:03 ` [PATCH 2/2] disk/ahci.c: Wrap too long line Paul Menzel
@ 2015-06-02 16:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 0 replies; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-06-02 16:45 UTC (permalink / raw
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

On 28.05.2015 19:57, Paul Menzel wrote:
> 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.
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.
> ---
>  grub-core/disk/ahci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
> index 7f75724..0825998 100644
> --- a/grub-core/disk/ahci.c
> +++ b/grub-core/disk/ahci.c
> @@ -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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
  2015-05-31  6:28   ` Andrei Borzenkov
@ 2015-06-07  9:04     ` Paul Menzel
  2015-06-12  6:44       ` Andrei Borzenkov
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2015-06-07  9:04 UTC (permalink / raw
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

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(-)

diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
index 7f75724..fa7aa88 100644
--- a/grub-core/disk/ahci.c
+++ b/grub-core/disk/ahci.c
@@ -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));
-- 
2.1.4


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
  2015-06-07  9:04     ` [PATCH v2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
@ 2015-06-12  6:44       ` Andrei Borzenkov
  0 siblings, 0 replies; 7+ messages in thread
From: Andrei Borzenkov @ 2015-06-12  6:44 UTC (permalink / raw
  To: Paul Menzel; +Cc: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

В Sun, 07 Jun 2015 11:04:57 +0200
Paul Menzel <paulepanter@users.sourceforge.net> пишет:

> 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.
> 

applied.

>  grub-core/disk/ahci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
> index 7f75724..fa7aa88 100644
> --- a/grub-core/disk/ahci.c
> +++ b/grub-core/disk/ahci.c
> @@ -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));


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-12  6:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 17:57 [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
2015-05-28 18:03 ` [PATCH 2/2] disk/ahci.c: Wrap too long line Paul Menzel
2015-05-31  6:28   ` Andrei Borzenkov
2015-06-07  9:04     ` [PATCH v2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Paul Menzel
2015-06-12  6:44       ` Andrei Borzenkov
2015-06-02 16:43   ` [PATCH 2/2] disk/ahci.c: Wrap too long line Vladimir 'φ-coder/phcoder' Serbinenko
2015-06-02 16:45 ` [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).