From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.reverze.net ([82.161.88.7] helo=fsm.reverze.net) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW9dx-0005PC-GE for barebox@lists.infradead.org; Fri, 04 Apr 2014 19:19:14 +0000 Message-ID: <533EF7A2.90007@reverze.net> Date: Fri, 04 Apr 2014 20:19:14 +0200 From: Michel Stam MIME-Version: 1.0 References: <1396634987-3730-1-git-send-email-michel@reverze.net> <1396634987-3730-2-git-send-email-michel@reverze.net> <1396638728.615551432@f156.i.mail.ru> In-Reply-To: <1396638728.615551432@f156.i.mail.ru> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0676452134264733290==" Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCHv2 2/3] x86: Add support for IDE on the legacy I/O ports To: Alexander Shiyan Cc: barebox@lists.infradead.org This is a cryptographically signed message in MIME format. --===============0676452134264733290== Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms090801080207010000000803" This is a cryptographically signed message in MIME format. --------------ms090801080207010000000803 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I prefer to #ifdef out whatever code is not in use. That includes header = files, as some don't play nice. In this way, one can be certain that code that is not used will not be=20 compiled either, and as such will not cause needless errors either. It=20 also clearly indicates why this particular piece of code is there, in=20 this case the #include. For platform_ide.h maybe not strictly necessary, but call it a habit. While working on this bit of code I got some errors if the BIOS IDE=20 support was not included, so I decided to fix it by ifdef-ing out=20 unnecessary code. On 04/04/2014 09:12 PM, Alexander Shiyan wrote: > Fri, 4 Apr 2014 20:09:46 +0200 =D0=BE=D1=82 michel@reverze.net: >> From: Michel Stam >> >> --- >> arch/x86/boards/x86_generic/generic_pc.c | 73 ++++++++++++++++++++= +++ >> drivers/ata/ide-sff.c | 94 ++++++++++++++++++++= ++++----- >> drivers/ata/intf_platform_ide.c | 33 +++++++++- >> include/ata_drive.h | 1 + >> 4 files changed, 180 insertions(+), 21 deletions(-) >> >> diff --git a/arch/x86/boards/x86_generic/generic_pc.c b/arch/x86/board= s/x86_generic/generic_pc.c >> index 74a7224..895b88d 100644 >> --- a/arch/x86/boards/x86_generic/generic_pc.c >> +++ b/arch/x86/boards/x86_generic/generic_pc.c >> @@ -27,6 +27,10 @@ >> #include >> #include >> =20 >> +#ifdef CONFIG_DISK_INTF_PLATFORM_IDE >> +#include >> +#endif > Uhh, do you really need to #ifdef this? > > --- > --------------ms090801080207010000000803 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIMmzCC BjQwggQcoAMCAQICAR4wDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UEBhMCSUwxFjAUBgNVBAoT DVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNp Z25pbmcxKTAnBgNVBAMTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA3 MTAyNDIxMDE1NVoXDTE3MTAyNDIxMDE1NVowgYwxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1T dGFydENvbSBMdGQuMSswKQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZpY2F0ZSBTaWdu aW5nMTgwNgYDVQQDEy9TdGFydENvbSBDbGFzcyAxIFByaW1hcnkgSW50ZXJtZWRpYXRlIENs aWVudCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcJg8zOLdgasSmkLhOr lr6KMoOMpohBllVHrdRvEg/q6r8jR+EK75xCGhR8ToREoqe7zM9/UnC6TS2y9U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lDCBjDELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKzApBgNV BAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxODA2BgNVBAMTL1N0YXJ0 Q29tIENsYXNzIDEgUHJpbWFyeSBJbnRlcm1lZGlhdGUgQ2xpZW50IENBAgMJaQ4wgacGCyqG SIb3DQEJEAILMYGXoIGUMIGMMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzE4MDYGA1UE AxMvU3RhcnRDb20gQ2xhc3MgMSBQcmltYXJ5IEludGVybWVkaWF0ZSBDbGllbnQgQ0ECAwlp DjANBgkqhkiG9w0BAQEFAASCAQBD7YYvym73/qE1J7OUdN/NQFq9oUWrhkGCb7yo4mzHCIE1 8kFYj9hStaBsG3edKnEryA834Dn8bqDcDbA9DqgkiWXafW3MHDGqq1UNZNJJzBzf8oMmJXs0 +bjdi0my2IV+eu07PNpiiPhL63FJM4kB+dazkpsVM9UYFqnsU9ndjRPD4gqJExoq8gYwpkgt v71DOHky0+zdpx7zxywAaxQLx7FGzIGntyjLfPv9VLzE/a5FkKmbKzPWBv99QyzpaDgyk3q/ GeAZ6jkKSBB9gqXZ/4AfkuiSEpO2oIaOaSzncldHTZeHNYvZEVtL+LUuiv3qVHbTs367GiAC RpevBdqVAAAAAAAA --------------ms090801080207010000000803-- --===============0676452134264733290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============0676452134264733290==--