* [PATCH 1/1] fault-inject: Include linux/types.h by default.
@ 2023-08-16 13:47 Himal Prasad Ghimiray
2023-12-18 13:45 ` Rodrigo Vivi
2023-12-18 17:55 ` Lucas De Marchi
0 siblings, 2 replies; 3+ messages in thread
From: Himal Prasad Ghimiray @ 2023-08-16 13:47 UTC (permalink / raw)
Cc: Himal Prasad Ghimiray, Lucas De Marchi, Rodrigo Vivi,
Badal Nilawar, Akinobu Mita, Jason Gunthorpe, Jens Axboe,
Qi Zheng, linux-kernel
Functions should_fail_alloc_page, should_failslab, and __should_failslab
are declared irrespective of CONFIG_FAULT_INJECTION. These functions use
bool and gfp_t types, which are treated as unknown when
CONFIG_FAULT_INJECTION is disabled because the inclusion of linux/types.h
is missing.
Fixes: 6ff1cb355e62 ("[PATCH] fault-injection capabilities infrastructure")
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
include/linux/fault-inject.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index 481abf530b3c..f83ab2b6cd08 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -2,9 +2,10 @@
#ifndef _LINUX_FAULT_INJECT_H
#define _LINUX_FAULT_INJECT_H
+#include <linux/types.h>
+
#ifdef CONFIG_FAULT_INJECTION
-#include <linux/types.h>
#include <linux/debugfs.h>
#include <linux/configfs.h>
#include <linux/ratelimit.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] fault-inject: Include linux/types.h by default.
2023-08-16 13:47 [PATCH 1/1] fault-inject: Include linux/types.h by default Himal Prasad Ghimiray
@ 2023-12-18 13:45 ` Rodrigo Vivi
2023-12-18 17:55 ` Lucas De Marchi
1 sibling, 0 replies; 3+ messages in thread
From: Rodrigo Vivi @ 2023-12-18 13:45 UTC (permalink / raw)
To: Himal Prasad Ghimiray
Cc: Lucas De Marchi, Rodrigo Vivi, Badal Nilawar, Akinobu Mita,
Jason Gunthorpe, Jens Axboe, Qi Zheng, linux-kernel
On Wed, Aug 16, 2023 at 07:17:48PM +0530, Himal Prasad Ghimiray wrote:
> Functions should_fail_alloc_page, should_failslab, and __should_failslab
> are declared irrespective of CONFIG_FAULT_INJECTION. These functions use
> bool and gfp_t types, which are treated as unknown when
> CONFIG_FAULT_INJECTION is disabled because the inclusion of linux/types.h
> is missing.
>
> Fixes: 6ff1cb355e62 ("[PATCH] fault-injection capabilities infrastructure")
gentle ping on this one. we'd like to be able to include fault-inject.c
without adding extra includes that should be taken care by the
fault-inject.h itself.
>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Cc: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Qi Zheng <zhengqi.arch@bytedance.com>
> Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> include/linux/fault-inject.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
> index 481abf530b3c..f83ab2b6cd08 100644
> --- a/include/linux/fault-inject.h
> +++ b/include/linux/fault-inject.h
> @@ -2,9 +2,10 @@
> #ifndef _LINUX_FAULT_INJECT_H
> #define _LINUX_FAULT_INJECT_H
>
> +#include <linux/types.h>
> +
> #ifdef CONFIG_FAULT_INJECTION
>
> -#include <linux/types.h>
> #include <linux/debugfs.h>
> #include <linux/configfs.h>
> #include <linux/ratelimit.h>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] fault-inject: Include linux/types.h by default.
2023-08-16 13:47 [PATCH 1/1] fault-inject: Include linux/types.h by default Himal Prasad Ghimiray
2023-12-18 13:45 ` Rodrigo Vivi
@ 2023-12-18 17:55 ` Lucas De Marchi
1 sibling, 0 replies; 3+ messages in thread
From: Lucas De Marchi @ 2023-12-18 17:55 UTC (permalink / raw)
To: Himal Prasad Ghimiray
Cc: Rodrigo Vivi, Badal Nilawar, Akinobu Mita, Jason Gunthorpe,
Jens Axboe, Qi Zheng, linux-kernel, Andrew Morton
+Andrew
On Wed, Aug 16, 2023 at 07:17:48PM +0530, Himal Prasad Ghimiray wrote:
>Functions should_fail_alloc_page, should_failslab, and __should_failslab
>are declared irrespective of CONFIG_FAULT_INJECTION. These functions use
>bool and gfp_t types, which are treated as unknown when
>CONFIG_FAULT_INJECTION is disabled because the inclusion of linux/types.h
>is missing.
>
>Fixes: 6ff1cb355e62 ("[PATCH] fault-injection capabilities infrastructure")
>
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>Cc: Badal Nilawar <badal.nilawar@intel.com>
>Cc: Akinobu Mita <akinobu.mita@gmail.com>
>Cc: Jason Gunthorpe <jgg@ziepe.ca>
>Cc: Jens Axboe <axboe@kernel.dk>
>Cc: Qi Zheng <zhengqi.arch@bytedance.com>
>Cc: linux-kernel@vger.kernel.org
>Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Andrew, could we take this through our drm-xe-next branch going to
drm-next if this looks good to you?
thanks
Lucas De Marchi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-18 17:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 13:47 [PATCH 1/1] fault-inject: Include linux/types.h by default Himal Prasad Ghimiray
2023-12-18 13:45 ` Rodrigo Vivi
2023-12-18 17:55 ` Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox