Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp632850iog; Wed, 29 Jun 2022 07:15:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u+enzkB8QdhlneXEEusf1/XnBQXmkXSbgL6kswCJiWtDSVe9k85Z3xpJxft7agexeYDSfB X-Received: by 2002:a63:1047:0:b0:40d:7553:d897 with SMTP id 7-20020a631047000000b0040d7553d897mr3073676pgq.485.1656512106775; Wed, 29 Jun 2022 07:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656512106; cv=none; d=google.com; s=arc-20160816; b=Y9qCGdMA1RXihfTjQtSrO3shSJyhEFGhxXXGBQ/5TrAjkV3PmmJ8N4gVy08PAQCy+x ccLUQoLxpgd2TZqUn4QB86aLW8R0e/a1irVMRI91YQQ7Mga+seCYWP0YNrTNF6c7iFTV U58sR3Ln5d6PfrRsSosUtsIADHo4XPQHCFg5LI23t+HeKqm+oxsBOHAnw4jKftUmFYOV QJOhyJG94+QjEaGLZM8sk5FxkmDBzCPj0Sj+smGCQGPfyu7xd3VLMmtbexBp48XZ/jeY qZYrMkzm5wDv0lVeKacTUc588mWtAIWt22qhhiNKgefYlVepLEms/sBE0cGm8e0uAGWb KYYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=3FaiLWPGN/9fHsfjet5qN/6DVzjweDgG5uMZATpcsHc=; b=BBgdX+jRxH3MBlb7NR+2Eudecxh6OarrzhvIipcCQKqcSnIDeAjDPbDHRm5VN87+6q ec7dp9dKpBqbW4eXOkY5PezEye6KqM6ga70ijpq/LzFEvjCQTXz/l4EVfzYBDo0LZh9y 6eH5btvjArjWDkUsIpGgprf7I3Bw+zilLySHFUhJInXPNjlioniaW+xUEGVaoyYFA1ua UBwPuXQ1MR/zW3GYLLr4g7I1JP5gzmP1WtkCTcrCvX5Obf69BxLF4AS8R14RSzlCrjUI ttJM/ujJAz2/kn9AcN4E1KPRPqUOtqq4e1MXAh/CuAeu8xO6MKR53iVp+Pe7Mu4tGSij Jl7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a639349000000b0040c0b20e2fasi23516280pgm.699.2022.06.29.07.14.52; Wed, 29 Jun 2022 07:15:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbiF2OC7 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Jun 2022 10:02:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbiF2OC5 (ORCPT ); Wed, 29 Jun 2022 10:02:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D9C23156 for ; Wed, 29 Jun 2022 07:02:56 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o6YHG-0002O8-QV; Wed, 29 Jun 2022 16:02:46 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o6YHA-003PQA-9a; Wed, 29 Jun 2022 16:02:43 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1o6YHD-0009tN-4w; Wed, 29 Jun 2022 16:02:43 +0200 Message-ID: Subject: Re: [PATCH RESEND v5 1/8] reset: Fix devm bulk optional exclusive control getter From: Philipp Zabel To: Serge Semin , Stephen Boyd , Michael Turquette , Dmitry Osipenko , Mark Brown Cc: Serge Semin , Alexey Malahov , Pavel Parkhomenko , Thomas Bogendoerfer , linux-clk@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 29 Jun 2022 16:02:43 +0200 In-Reply-To: <20220624141853.7417-2-Sergey.Semin@baikalelectronics.ru> References: <20220624141853.7417-1-Sergey.Semin@baikalelectronics.ru> <20220624141853.7417-2-Sergey.Semin@baikalelectronics.ru> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Serge, On Fr, 2022-06-24 at 17:18 +0300, Serge Semin wrote: > Most likely due to copy-paste mistake the device managed version of the > denoted reset control getter has been implemented with invalid semantic, > which can be immediately spotted by having "WARN_ON(shared && acquired)" > warning in the system log as soon as the method is called. Anyway let's > fix it by altering the boolean arguments passed to the > __devm_reset_control_bulk_get() method from > - shared = true, optional = false, acquired = true > to > + shared = false, optional = true, acquired = true > That's what they were supposed to be in the first place (see the non-devm > version of the same method: reset_control_bulk_get_optional_exclusive()). > > Fixes: 48d71395896d ("reset: Add reset_control_bulk API") > Signed-off-by: Serge Semin > > --- > > Changelog v4: > - This is a new patch added on v4 lap of the series. > --- >  include/linux/reset.h | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/reset.h b/include/linux/reset.h > index 8a21b5756c3e..514ddf003efc 100644 > --- a/include/linux/reset.h > +++ b/include/linux/reset.h > @@ -731,7 +731,7 @@ static inline int __must_check >  devm_reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs, >   struct reset_control_bulk_data *rstcs) >  { > - return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, true, false, true); > + return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, false, true, true); >  } You are right, thank you. I'll take this as a sign that the internal functions should probably switch from collecting ever more boolean arguments to a flags parameter, similar to enum gpiod_flags. I'll pick this up separately into the reset/fixes branch. regards Philipp