From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yy23m-0004LL-7B for mharc-grub-devel@gnu.org; Thu, 28 May 2015 13:57:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy23j-0004Ks-JI for grub-devel@gnu.org; Thu, 28 May 2015 13:57:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy23f-00022E-Ir for grub-devel@gnu.org; Thu, 28 May 2015 13:57:35 -0400 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:54251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy23f-000220-D5 for grub-devel@gnu.org; Thu, 28 May 2015 13:57:31 -0400 Received: from p5de4146c.dip0.t-ipconnect.de ([93.228.20.108] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Yy23f-0003EP-Gk for grub-devel@gnu.org; Thu, 28 May 2015 17:57:31 +0000 Message-ID: <1432835841.3378.47.camel@users.sourceforge.net> Subject: [PATCH 1/2] disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON` From: Paul Menzel To: grub-devel@gnu.org Date: Thu, 28 May 2015 19:57:21 +0200 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-mEIskvS388Jl3ZmAyFZp" X-Mailer: Evolution 3.12.12-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:100:7463::3 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 17:57:36 -0000 --=-mEIskvS388Jl3ZmAyFZp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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); =20 adevs[i]->hba->ports[adevs[i]->port].command - =3D (adevs[i]->hba->ports[adevs[i]->port].command & 0x0fffffff) | (1 <<= 28) | 2 | 4; + =3D (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; =20 /* struct grub_disk_ata_pass_through_parms parms2; grub_memset (&parms2, 0, sizeof (parms2)); --=20 2.1.4 --=-mEIskvS388Jl3ZmAyFZp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlVnVwkACgkQPX1aK2wOHVhAdwCePCu7P2t/OFWGVPR9wPVGA5mH hOAAn1kBqpZdTCmC5xunzIpmkpUOnFQe =kMc5 -----END PGP SIGNATURE----- --=-mEIskvS388Jl3ZmAyFZp--