Re: [Intel-gfx] [PATCH v5 1/2] module: update dependencies at try_module_get()

2022-05-09 Thread Mauro Carvalho Chehab
Em Thu, 5 May 2022 23:35:29 +0200 Andi Shyti escreveu: > Hi Mauro, > > [...] > > > +static int ref_module_dependency(struct module *mod, struct module *this) > > +{ > > + int ret; > > + > > + if (!this || !this->name) > > + return -EINVAL; > > + > > + if (mod == this) > > +

Re: [Intel-gfx] [PATCH v5 1/2] module: update dependencies at try_module_get()

2022-05-05 Thread Andi Shyti
Hi Mauro, [...] > +static int ref_module_dependency(struct module *mod, struct module *this) > +{ > + int ret; > + > + if (!this || !this->name) > + return -EINVAL; > + > + if (mod == this) > + return 0; > + > + mutex_lock(_mutex); > + > + ret =

Re: [Intel-gfx] [PATCH v5 1/2] module: update dependencies at try_module_get()

2022-05-03 Thread Christophe Leroy
Le 30/04/2022 à 22:04, Mauro Carvalho Chehab a écrit : > Sometimes, device drivers are bound into each other via try_module_get(), > making such references invisible when looking at /proc/modules or lsmod. > > Add a function to allow setting up module references for such > cases, and call it

[Intel-gfx] [PATCH v5 1/2] module: update dependencies at try_module_get()

2022-04-30 Thread Mauro Carvalho Chehab
Sometimes, device drivers are bound into each other via try_module_get(), making such references invisible when looking at /proc/modules or lsmod. Add a function to allow setting up module references for such cases, and call it when try_module_get() is used. Reviewed-by: Dan Williams