mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Amir Ali Tadayyon <a.tadayyon12@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: (Subject) [PATCH] misc: add simple hello world driver
Date: Sun, 4 Oct 2026 08:25:42 +0200	[thread overview]
Message-ID: <2026100411-splotchy-dividers-039f@gregkh> (raw)
In-Reply-To: <CAPWuoRHO13=CQh7D_+AircPfj=CnmrRiX89Nh_TCUEH=yFkx1A@mail.gmail.com>

On Sat, Oct 03, 2026 at 09:11:49PM +0330, Amir Ali Tadayyon wrote:
> Add a minimal misc driver that prints a message to the kernel log
> on load and unload. This serves as a starting point for new
> contributors to understand the module init/exit flow.
> 
> Signed-off-by: Amir Ali <a.tadayyon12@gmail.com>
> ---
>  drivers/misc/Kconfig        |  7 +++++++
>  drivers/misc/Makefile       |  1 +
>  drivers/misc/hello_driver.c | 32 ++++++++++++++++++++++++++++++++
>  3 files changed, 40 insertions(+)
>  create mode 100644 drivers/misc/hello_driver.c
> 
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index 1234567..89abcde 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -1,3 +1,10 @@
>  # SPDX-License-Identifier: GPL-2.0-only
> +config HELLO_DRIVER
> + tristate "Hello world driver"
> + help
> +   A simple hello world driver that prints a message
> +   on load and unload.
> +
> +   If unsure, say N.
> +
>  config IBM_ASM
>   tristate "IBM ASM device"
> diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
> index 1234567..89abcde 100644
> --- a/drivers/misc/Makefile
> +++ b/drivers/misc/Makefile
> @@ -1,3 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0
> +obj-$(CONFIG_HELLO_DRIVER) += hello_driver.o
>  obj-$(CONFIG_IBM_ASM) += ibmasm/
>  obj-$(CONFIG_AD525X_DPOT) += ad525x_dpot.o
> diff --git a/drivers/misc/hello_driver.c b/drivers/misc/hello_driver.c
> new file mode 100644
> index 0000000..1234567
> --- /dev/null
> +++ b/drivers/misc/hello_driver.c
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * hello_driver.c - A simple hello world driver
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Amir Ali <a.tadayyon12@gmail.com>");
> +MODULE_DESCRIPTION("A simple hello world driver");
> +
> +static int __init hello_init(void)
> +{
> + pr_info("Hello, Linux kernel!\n");
> + return 0;
> +}
> +
> +static void __exit hello_exit(void)
> +{
> + pr_info("Goodbye, Linux kernel!\n");
> +}
> +
> +module_init(hello_init);
> +module_exit(hello_exit);

Did you really mean to send this?

Also, the patch is corrupted and can't be applied :(

           reply	other threads:[~2026-10-04  6:25 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAPWuoRHO13=CQh7D_+AircPfj=CnmrRiX89Nh_TCUEH=yFkx1A@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026100411-splotchy-dividers-039f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=a.tadayyon12@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®