[PATCH v1 1/1] process: export symbols for fork/exit tracing functions

gregkh at linuxfoundation.org gregkh at linuxfoundation.org
Tue Jun 13 02:18:04 PDT 2023


On Tue, Jun 13, 2023 at 09:12:38AM +0000, Wei-chin Tsai (蔡維晉) wrote:
> On Mon, 2023-06-12 at 18:37 +0200, Greg Kroah-Hartman wrote:
> >  	 
> > External email : Please do not click links or open attachments until
> > you have verified the sender or the content.
> >  On Mon, Jun 12, 2023 at 11:15:41PM +0800, jim.tsai wrote:
> > > +static void class_create_release(struct class *cls)
> > > +{
> > > +/*do nothing because the mbraink class is not from malloc*/
> > > +}
> > 
> > Then the code is totally broken and wrong :(
> > 
> > Please just use the misc device api instead, it is much simpler and
> > doesn't have these types of errors.
> > 
> > thanks,
> > 
> > greg k-h
> 
> 
> Sorry, I did not really get the point from above comments because It
> works well for me for the mbraink_main.c and no compiler errors or
> runtime errors?

Think about why the kernel is trying to check if you have a release
function or not.  Would an "empty" function be the same thing?

That check was added to tell you that your design is wrong and needs to
be fixed, do NOT just try to paper over warnings from the kernel as
someone spent the time to try to be nice and tell you that the code is
incorrect :)

Anyway, almost all of these (if not all), can just go away if you move
to  use the miscdevice api instead.

Also, please don't send HTML email, the mailing lists reject it :(

thanks,

greg k-h



More information about the linux-arm-kernel mailing list