[Qemu-devel] [PATCH v2 09/20] e1000e: use local path for local headers

Michael S. Tsirkin posted 20 patches 7 years, 5 months ago
[Qemu-devel] [PATCH v2 09/20] e1000e: use local path for local headers
Posted by Michael S. Tsirkin 7 years, 5 months ago
When pulling in headers that are in the same directory as C file (as
opposed to one in include/), we should use its relative path, without a
directory.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/net/e1000e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 16a9417..cda8d48 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -41,7 +41,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 
-#include "hw/net/e1000_regs.h"
+#include "e1000_regs.h"
 
 #include "e1000x_common.h"
 #include "e1000e_core.h"
-- 
MST


Re: [Qemu-devel] [PATCH v2 09/20] e1000e: use local path for local headers
Posted by Philippe Mathieu-Daudé 7 years, 5 months ago
On 05/25/2018 01:47 PM, Michael S. Tsirkin wrote:
> When pulling in headers that are in the same directory as C file (as
> opposed to one in include/), we should use its relative path, without a
> directory.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  hw/net/e1000e.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
> index 16a9417..cda8d48 100644
> --- a/hw/net/e1000e.c
> +++ b/hw/net/e1000e.c
> @@ -41,7 +41,7 @@
>  #include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
>  
> -#include "hw/net/e1000_regs.h"
> +#include "e1000_regs.h"
>  

Can you remove this extra newline while here?

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>  #include "e1000x_common.h"
>  #include "e1000e_core.h"
>