lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] lkdtm: do not depend on CONFIG_BLOCK
On Fri, Nov 09, 2018 at 07:05:51AM +0000, Christophe Leroy wrote:
> Most parts of lkdtm don't require CONFIG_BLOCK.
>
> This patch limits dependency to CONFIG_BLOCK in order to give embedded
> platforms which don't select CONFIG_BLOCK the opportunity to use LKDTM.
>
> Fixes: fddd9cf82c9f ("make LKDTM depend on BLOCK")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> drivers/misc/lkdtm/core.c | 7 ++++++-
> lib/Kconfig.debug | 1 -
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
> index 2837dc77478e..bc76756b7eda 100644
> --- a/drivers/misc/lkdtm/core.c
> +++ b/drivers/misc/lkdtm/core.c
> @@ -40,9 +40,12 @@
> #include <linux/interrupt.h>
> #include <linux/hrtimer.h>
> #include <linux/slab.h>
> -#include <scsi/scsi_cmnd.h>
> #include <linux/debugfs.h>
>
> +#ifdef CONFIG_BLOCK
> +#include <scsi/scsi_cmnd.h>
> +#endif

Why would this config option be needed to be checked just to be able to
include a .h file?

And shouldn't you be depending on SCSI instead?

> +
> #ifdef CONFIG_IDE
> #include <linux/ide.h>
> #endif
> @@ -101,7 +104,9 @@ static struct crashpoint crashpoints[] = {
> CRASHPOINT("FS_DEVRW", "ll_rw_block"),
> CRASHPOINT("MEM_SWAPOUT", "shrink_inactive_list"),
> CRASHPOINT("TIMERADD", "hrtimer_start"),
> +# ifdef CONFIG_BLOCK
> CRASHPOINT("SCSI_DISPATCH_CMD", "scsi_dispatch_cmd"),
> +# endif

Again, scsi?

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-11-27 08:44    [W:0.069 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site