Prefer strscpy over strcpy

2023-09-30 Thread Jonathan Bergh
hi there So this is a question about the common checkpatch warning I am sure (most) people have seen when runing checkpatch.pl over kernel code. In this particular example "driver_name": * In: vme_fake.c: static const char driver_name[] = "vme_fake": will always fit into

Re: ktypes vs. devices classes (struct class)

2023-09-30 Thread Richard
Hi, I appreciate your answer, thank you for your time. 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? I've looked at the definitions in include/linux and thought a bit about the semantics. struct

Re: ktypes vs. devices classes (struct class)

2023-09-30 Thread Greg KH
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