From b61306795b53647e8d1d4279417df1e1fe0f4b86 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 4 Oct 2017 15:09:51 -0700 Subject: gpu: nvgpu: Add nvgpu/errno.h Add an header file to explicitly include the -E* error messages. Useful for header files with static inlines that return error messages. In actual C code normally enough Linux/QNX headers bleed in to get the error messages but header files with sparse includes do not have this luxury. Change-Id: I4833c7a6003578b9792bbf6b14cce3bd0adfec22 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1573307 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/include/nvgpu/errno.h | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/errno.h (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/include/nvgpu/errno.h b/drivers/gpu/nvgpu/include/nvgpu/errno.h new file mode 100644 index 00000000..12ba118e --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/errno.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef __NVGPU_ERRNO_H__ +#define __NVGPU_ERRNO_H__ + +/* + * Explicit include to get all the -E* error messages. Useful for header files + * with static inlines that return error messages. In actual C code normally + * enough Linux/QNX headers bleed in to get the error messages but header files + * with sparse includes do not have this luxury. + */ + +#ifdef __KERNEL__ +#include +#endif + +/* + * TODO: add else path above for QNX. + */ + +#endif -- cgit v1.2.2