All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	bpf@vger.kernel.org, Slava.Dubeyko@ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 3/4] ml-lib: Implement simple testing character device driver
Date: Sat, 7 Feb 2026 16:55:14 +0100	[thread overview]
Message-ID: <2026020719-thrive-domain-f0c2@gregkh> (raw)
In-Reply-To: <20260206191136.2609767-4-slava@dubeyko.com>

On Fri, Feb 06, 2026 at 11:11:35AM -0800, Viacheslav Dubeyko wrote:
> Implement simple testing character device driver
> 
> Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>

It's hard to tell if this is just an early april-fools joke or not, but
if it's not:

> +### Character Device Operations
> +- **Open/Close**: Device can be opened and closed multiple times
> +- **Read**: Read data from a kernel buffer
> +- **Write**: Write data to a kernel buffer (1KB capacity)
> +- **Seek**: Support for lseek() operations
> +
> +### IOCTL Commands
> +- `ML_LIB_TEST_DEV_IOCRESET`: Clear the device buffer
> +- `ML_LIB_TEST_DEV_IOCGETSIZE`: Get current data size
> +- `ML_LIB_TEST_DEV_IOCSETSIZE`: Set data size
> +
> +### Sysfs Attributes
> +Located at `/sys/class/ml_lib_test/mllibdev`:
> +- `buffer_size`: Maximum buffer capacity (read-only)
> +- `data_size`: Current amount of data in buffer (read-only)
> +- `access_count`: Number of times device has been opened (read-only)
> +- `stats`: Comprehensive statistics (opens, reads, writes)

Again, this is not an acceptable use of sysfs.

> +	/* Allocate device number */
> +	ret = alloc_chrdev_region(&dev_number, 0, 1, DEVICE_NAME);

Don't burn a cdev for this, please use the misc device api.

good luck!

greg k-h

  reply	other threads:[~2026-02-07 15:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 19:11 [RFC PATCH v1 0/4] Machine Learning (ML) library in Linux kernel Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 1/4] ml-lib: Introduce Machine Learning (ML) library declarations Viacheslav Dubeyko
2026-02-07 15:52   ` Greg KH
2026-02-09 20:48     ` Viacheslav Dubeyko
2026-02-10  5:20       ` gregkh
2026-02-10 22:44         ` Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 2/4] ml-lib: Implement PoC of Machine Learning (ML) library functionality Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 3/4] ml-lib: Implement simple testing character device driver Viacheslav Dubeyko
2026-02-07 15:55   ` Greg KH [this message]
2026-02-09 20:56     ` Viacheslav Dubeyko
2026-02-10  5:21       ` greg
2026-02-06 19:11 ` [RFC PATCH v1 4/4] ml-lib: Implement simple user-space testing application Viacheslav Dubeyko
2026-02-06 22:59 ` [RFC PATCH v1 0/4] Machine Learning (ML) library in Linux kernel Jonathan Corbet
2026-02-09 20:33   ` Viacheslav Dubeyko

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=2026020719-thrive-domain-f0c2@gregkh \
    --to=greg@kroah.com \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=slava@dubeyko.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.