Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4450261imw; Tue, 19 Jul 2022 06:53:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1syViFmKndRBX7HAgoMmHdOY95CW+N6uTubLfGZGtTiNuUijoUI6qHGcAhH0UoQCTMSgxBP X-Received: by 2002:a05:6402:4490:b0:43a:8f5a:d273 with SMTP id er16-20020a056402449000b0043a8f5ad273mr43319571edb.6.1658238819090; Tue, 19 Jul 2022 06:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238819; cv=none; d=google.com; s=arc-20160816; b=sX8FeZ4aCzJU13QgBarPbbxU0qCANwpt/gzSLwRWVc3a2PmYBgbbhOgIt5te8e4cLL xiOHLhzDkBFcuZGyhQ0gUUf4BPSzhIGAFgvaNGufDbUyQrkzV2KKQLJnGw9QSNk128Ng klS5JYJqhB5gzrAD/j7brN8NKhWRIw+e3oddCWETMFynjvCmkVhbZuJMFw8qjx2riGKK f0PUwsY5WhUeJFZhjX79zAyYgYJTm8SMU6nSCR3RPdg/CQbJb5xB8k6wGEmsnHT5w6T2 NA883O097shvt/2kwstOrxD1JakzTBcbhFE9W6/hOPKDmTTtNo5bg34Ppn3kkw3paPlx F8tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CihmHZSCaBLlhSPKyz96nefy5sCdH6A+A8fm5IxkSf0=; b=JVoPz7Z4OiwPuIkLI9EcyfMpnkB+JGFJZu0QDlJNA9YSpOfOa0OsP8vTGMyiwUJE0d HHWhAwNzUkoFvmvPY5PYUlN8nVWB74SkU1j/QnMER/C+2KV8PWQ4+gexx7hUE2Tbj+/u XjFv2T373OEDSlnCdz59QlkTcyMtbY1tIMIP1PHRZypq4RRYvwj51khB4Q0y+7dY57pV iguBkl0HcHW/aHLjSxP+8f9kg3kTchGtTUmYQO/CPw0ROjZp396lj2M3AIVqQdHOEC5w sZ8cXEl/CGEC0XZf+QtloVsgnZf6kxrP14h8LcPYgDRbT1XZQlOKyweVAXXEd4PeO9PV D70A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e9qZniKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw29-20020a1709066a1d00b0072b83ed8d42si15278956ejc.82.2022.07.19.06.53.14; Tue, 19 Jul 2022 06:53:39 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e9qZniKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240232AbiGSMbi (ORCPT + 99 others); Tue, 19 Jul 2022 08:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240642AbiGSM3s (ORCPT ); Tue, 19 Jul 2022 08:29:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0017E691F9; Tue, 19 Jul 2022 05:11:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DD62BB81B32; Tue, 19 Jul 2022 12:11:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B8E3C341CF; Tue, 19 Jul 2022 12:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232685; bh=HpRZwYpGGp11YRHRT9z7MzDiIt7YNlvkO80tr+oVew8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e9qZniKmRC3UzYZlLKzgd4Njv09lWr5yR0eY7ynWvYqcjwG2k1qQhm0rmnIbY9lqY A1+jpwdobmbHyyC91OaLSddQfZOCsUVKVQD+jxu/VmJp03a4USktFJmenaWG9q2l3u gCh9EZh9Zy4gwSmYZVxTrRFcS0IWdP+MqIWUvhRA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Serge Semin , Dmitry Osipenko , Philipp Zabel , Sasha Levin Subject: [PATCH 5.15 030/167] reset: Fix devm bulk optional exclusive control getter Date: Tue, 19 Jul 2022 13:52:42 +0200 Message-Id: <20220719114659.674929709@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114656.750574879@linuxfoundation.org> References: <20220719114656.750574879@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Serge Semin [ Upstream commit a57f68ddc8865d59a19783080cc52fb4a11dc209 ] 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 Reviewed-by: Dmitry Osipenko Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20220624141853.7417-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Sasha Levin --- 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 db0e6115a2f6..7bb583737528 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -711,7 +711,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); } /** -- 2.35.1