Skip to content

convenient.h makes use of in_irq makro which is not available #6

@AndiKleini

Description

@AndiKleini

Hi kaiwan !

When I try to build and install the miscdrv (chapter 1) under usage of the lkm script, I receive following compilation error:

************** begin compilation error **************

miscdrv.c: In function ‘open_miscdrv’:
../../convenient.h:159:21: error: implicit declaration of function ‘in_irq’ [-Werror=implicit-function-declaration]
159 | if (in_irq() && in_softirq())
| ^~~~~~
miscdrv.c:52:9: note: in expansion of macro ‘PRINT_CTX’
52 | PRINT_CTX(); // displays process (or atomic) context info
| ^~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/home/andreas/Code/kernels/staging/scripts/Makefile.build:287: miscdrv.o] Error 1

************** end compilation error **************

In my opinion the main point is that the in_irq makro definition cannot be resolved. It seems to be no longer available in preempt.h.
My suggest would be to change in_irq to in_hardirq.
btw.: The usage of softirq is also marked as deprecated in /linux/preempt.h by a code comment.

Im running on a custom build of 6.19.0-rc1 from cloned from http://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

Thanks a lot
Andreas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions