gpu/cuda: Add missing stdlib include

Message ID 8e6f8751-9475-cce5-b827-646f772f64a6@astron.nl (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series gpu/cuda: Add missing stdlib include |

Checks

Context Check Description
ci/loongarch-compilation warning apply patch failure
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues
ci/iol-testing warning apply patch failure

Commit Message

John Romein Sept. 12, 2023, 5:08 p.m. UTC
  getenv needs stdlib.h to be included.

Bugzilla ID: 1133

Fixes: 24c77594e08f ("gpu/cuda: map GPU memory with GDRCopy")
Signed-off-by: John Romein <romein@astron.nl>
---
  drivers/gpu/cuda/gdrcopy.c | 2 ++
  1 file changed, 2 insertions(+)
  

Comments

Aaron Conole Sept. 13, 2023, 11:12 a.m. UTC | #1
John Romein <romein@astron.nl> writes:

> getenv needs stdlib.h to be included.
>
> Bugzilla ID: 1133
>
> Fixes: 24c77594e08f ("gpu/cuda: map GPU memory with GDRCopy")
> Signed-off-by: John Romein <romein@astron.nl>
> ---

Hi John,

Thanks so much for the contribution.  It looks like the patch got
corrupted by something.  Please check your mail client settings.  I'll
point out some of the specific characters here.  You may also need to
switch to using a gmail server or some other mail service to email the
patch.

-Aaron

>   drivers/gpu/cuda/gdrcopy.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/cuda/gdrcopy.c b/drivers/gpu/cuda/gdrcopy.c
> index 322a5dbeb2..f19ad396f1 100644
> --- a/drivers/gpu/cuda/gdrcopy.c
> +++ b/drivers/gpu/cuda/gdrcopy.c
> @@ -2,6 +2,8 @@
>    * Copyright (c) 2022 NVIDIA Corporation & Affiliates

   ^  This character looks incorrect
>    */

   ^ Same here
   
>
> +#include <stdlib.h>
> +
>   #include "common.h"

   ^ Same here

>   #ifdef DRIVERS_GPU_CUDA_GDRCOPY_H

   ^ Same here
  

Patch

diff --git a/drivers/gpu/cuda/gdrcopy.c b/drivers/gpu/cuda/gdrcopy.c
index 322a5dbeb2..f19ad396f1 100644
--- a/drivers/gpu/cuda/gdrcopy.c
+++ b/drivers/gpu/cuda/gdrcopy.c
@@ -2,6 +2,8 @@ 
   * Copyright (c) 2022 NVIDIA Corporation & Affiliates
   */

+#include <stdlib.h>
+
  #include "common.h"

  #ifdef DRIVERS_GPU_CUDA_GDRCOPY_H