From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Z1WW9-0007Mu-Bz for mharc-grub-devel@gnu.org; Sun, 07 Jun 2015 05:05:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1WW7-0007MR-Gp for grub-devel@gnu.org; Sun, 07 Jun 2015 05:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1WW1-0007TF-9i for grub-devel@gnu.org; Sun, 07 Jun 2015 05:05:19 -0400 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:50368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1WW1-0007Nr-31 for grub-devel@gnu.org; Sun, 07 Jun 2015 05:05:13 -0400 Received: from p5b337e35.dip0.t-ipconnect.de ([91.51.126.53] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Z1WVv-0004nX-7K for grub-devel@gnu.org; Sun, 07 Jun 2015 09:05:07 +0000 Message-ID: <1433667897.3192.6.camel@users.sourceforge.net> Subject: [PATCH v2] 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: Sun, 07 Jun 2015 11:04:57 +0200 In-Reply-To: <20150531092821.501b70d0@opensuse.site> References: <1432835841.3378.47.camel@users.sourceforge.net> <1432836218.3378.50.camel@users.sourceforge.net> <20150531092821.501b70d0@opensuse.site> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-+lCP0DpS+wyqCBuhAogQ" X-Mailer: Evolution 3.12.11-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: Sun, 07 Jun 2015 09:05:20 -0000 --=-+lCP0DpS+wyqCBuhAogQ 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. 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); =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 --=-+lCP0DpS+wyqCBuhAogQ 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 iEYEABECAAYFAlV0CUEACgkQPX1aK2wOHVhQXACdFAYYXFHqX7B/xPU2vUQrBWRB NFUAniQCiEf/UsqRVLm+bTE3bWUYrn07 =43TQ -----END PGP SIGNATURE----- --=-+lCP0DpS+wyqCBuhAogQ--