Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-13 Thread Greg Kroah-Hartman
On Tue, Aug 13, 2019 at 09:40:14AM -0400, Joel Fernandes wrote: > On Tue, Aug 13, 2019 at 09:39:05AM -0400, Joel Fernandes wrote: > [snip] > > > > drivers/base/core.c | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/base/core.c b/drivers/base/

Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 09:39:05AM -0400, Joel Fernandes wrote: [snip] > > > drivers/base/core.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > > index 32cf83d1c744..c22271577c84 100644 > > > --- a/drivers/bas

Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-13 Thread Joel Fernandes
On Tue, Aug 13, 2019 at 08:05:40AM +0200, Greg Kroah-Hartman wrote: > On Mon, Aug 12, 2019 at 05:49:17PM -0400, Joel Fernandes (Google) wrote: > > Check if lockdep lock checking is disabled. If so, then do not define > > device_links_read_lock_held(). It is used only from places where lockdep > > c

Re: [PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-12 Thread Greg Kroah-Hartman
On Mon, Aug 12, 2019 at 05:49:17PM -0400, Joel Fernandes (Google) wrote: > Check if lockdep lock checking is disabled. If so, then do not define > device_links_read_lock_held(). It is used only from places where lockdep > checking is enabled. > > Also fix a bug where I was not checking dep_map. Pr

[PATCH v2] driver/core: Fix build error when SRCU and lockdep disabled

2019-08-12 Thread Joel Fernandes (Google)
Check if lockdep lock checking is disabled. If so, then do not define device_links_read_lock_held(). It is used only from places where lockdep checking is enabled. Also fix a bug where I was not checking dep_map. Previously, I did not test !SRCU configs so this got missed. Now it is sorted. Link: