public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Richard <richard_siegfried@systemli.org>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: ktypes vs. devices classes (struct class)
Date: Sat, 30 Sep 2023 08:30:31 +0200	[thread overview]
Message-ID: <2023093017-overdraft-umbrella-9ad9@gregkh> (raw)
In-Reply-To: <9644b2e3-acaf-c26b-0ec2-9a6c9cb23977@systemli.org>

On Sat, Sep 30, 2023 at 02:12:41AM +0200, Richard wrote:
> Hi all,
> 
> Why do we have ktypes (struct kobj_type) AND device classes (struct class)?

Because they are two totally different things.

> Don't they serve the same purpose (more or less) and it would be simpler,
> clearer and more KISS to only have one? Is this a historically grown thing
> or by design?

Look closer.  Tell me what "struct class" is for vs. what "struct
kobj_type" is for and see if they both could be used for the same thing?

When we implemented them, we didn't think so but maybe something has
changed to now allow this?  If so, great, please send us patches to do
so!

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2023-09-30  6:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30  0:12 ktypes vs. devices classes (struct class) Richard
2023-09-30  6:30 ` Greg KH [this message]
2023-09-30 18:17   ` Richard
2023-10-01  9:50     ` Greg KH
2023-10-01 10:28       ` Greg KH
2023-10-01 21:22         ` Richard
2023-10-01 21:15       ` Richard
2023-10-02  9:00         ` Greg KH

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=2023093017-overdraft-umbrella-9ad9@gregkh \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=richard_siegfried@systemli.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