From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartosz Golaszewski Subject: Re: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning Date: Sun, 18 Sep 2016 21:45:01 +0200 Message-ID: References: <1474041765-17818-1-git-send-email-bgolaszewski@baylibre.com> <20160916172621.GA1426@katana> <20160916175842.GD1426@katana> <587cdb60-d7fe-3ab2-b635-02c5072e102e@axentia.se> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-io0-f175.google.com ([209.85.223.175]:34656 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758277AbcIRTpC (ORCPT ); Sun, 18 Sep 2016 15:45:02 -0400 Received: by mail-io0-f175.google.com with SMTP id q92so74278350ioi.1 for ; Sun, 18 Sep 2016 12:45:02 -0700 (PDT) In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Peter Rosin Cc: Wolfram Sang , Linus Walleij , Alexandre Courbot , Andy Shevchenko , Vignesh R , Yong Li , Geert Uytterhoeven , Peter Zijlstra , Ingo Molnar , linux-i2c , linux-gpio , LKML 2016-09-18 21:43 GMT+02:00 Bartosz Golaszewski : > 2016-09-18 10:52 GMT+02:00 Peter Rosin : >> On 2016-09-16 19:58, Wolfram Sang wrote: >>> >>> Same here. And if it prevents us from false positive lockdep reports, I >>> am all for fixing it. >> >> Except it doesn't, when I think some more about it... >> >> If you have two gpio-expanders on the same depth but on different i2c >> branches you still end up with a splat if one is used to control a mux >> to reach the other. >> >> The only way to solve it for good, that I see, is to have every instance >> of the gpio-expander mutex in its own class. That might lead to many >> lockdep classes but then again, how many gpio expanders could there be >> in a system? A dozen or two seems extreme, so maybe that is the correct >> approach anyway? > > Wouldn't it be enough to have a separate class for every base (as in: > not having any parent adapters) i2c adapter? > Eeek -ESENTTOOEARLY Of course not - since we could have two branches deeper on the tree with the same problem. Nevermind my last e-mail. Best regards, Bartosz Golaszewski