Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp59241lql; Fri, 12 Apr 2024 03:51:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwpqRyTO1LBEQgqg+e3J5jqnLkW456FqL6BKpjfmQTMBENZhEPPNDLpz2ow/JPCvETq3lIPI2mRTU11kClCSj0Fw+tx9ejjKY3fjHeAg== X-Google-Smtp-Source: AGHT+IGEsCKHi3f6u0nh0qz6ZOw8sdUxhZa/4P6lOf+us1ItsqxBoXcFJM0uE2hRrg3DHDvYjs3P X-Received: by 2002:a05:6a00:1915:b0:6e8:f708:4b09 with SMTP id y21-20020a056a00191500b006e8f7084b09mr2721059pfi.15.1712919113220; Fri, 12 Apr 2024 03:51:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712919113; cv=pass; d=google.com; s=arc-20160816; b=PtkKQDVgTQPrWEHwtsvuIfYdHX92E5ig/zlJcwRqYnhOrRNbTEmZZSYdq7AC/3/lyQ vZI+5Ji0fm7pS8+PI6I9t1yaHCe3JY4VrvWhpr8YeOlwVV+YrVnYEyw7rpxMJW41oOyd PHJpY55PyEiIjcxLFco/oGXe/fEHbIWB6BE8LLFj5JOxHQ5XPcNdJChdScjObWXz3c13 47nRofhP++MMG59HNxatcmkA+IgK4fZZHvJfFR2q7ePyzBhI/+AmaDTWQbV1NYvoPPl3 NrrnR8FTMLFRV+UmOWMbuLsIJ1LljzYh01JMb7ZWYASfqSgJIC9G4qaUlkujn7fdpQ96 d8rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=x9dyIX2GIRxyxtjQgoTbfebK6wI7hUKbyAEauzQCGs4=; fh=nC9T2ELm62IxDXeKR2JnjtNl82C+RrLoruLzzaNWiEU=; b=d0QFANe9qe/wbyLrOLKllHjQjajbIdTwGfmvO1N3R5nb4aoIUYM6rlOoWrTAYEiDIH YIqph2KJMBOotrRsIlpf645DI4lTyTmEzRVzzU33gRFB4luZoipYOX7PAUUlzd4iBnY0 XdH8ST8utW9XCSjL++CRJWFDUSX4JSO3X0JK3hB+QMLRilDXpRJvRBcFHokXZOSbmFDZ b7wyWjkuxbZlQqeTxl9BJEil3PhdCYoQQXK69cYVpmjIg0Yl/efBd6kt39iYoTVzBsJU RAavi5HH7q1879JTGLIfCG9jw8fwJ3/9udfPX6QvbW6vG1E8bMa9j/HhPubEw1KXbwdf cG5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2ptgfOs; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-142519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p39-20020a056a000a2700b006ed189a99f1si3266360pfh.345.2024.04.12.03.51.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 03:51:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2ptgfOs; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-142519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D47AE289C09 for ; Fri, 12 Apr 2024 10:42:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9013A446DC; Fri, 12 Apr 2024 10:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="I2ptgfOs" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 277863CF79 for ; Fri, 12 Apr 2024 10:42:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712918547; cv=none; b=iaE+hGsoxQydd9xpTBsHjKWPj+czcjDnNYu/a8hvEqBc4WET4b+7RISviw0VcaBsZHvyyFDKa3/f3Es30q/d5kLEGwjgf7rgkcGjG5gTHXxW0CGWB1aZLb7phX31yGMY/ANpEZu3rc/BnYTXm+QS87rxhIaVDEI9kUkAh81KNf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712918547; c=relaxed/simple; bh=0H0hMWcNgkbz+OoHU/6BAy/ktYGB04j8mn1Ne/MmgnY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MxWoqcgZ+5eTqf6mquWI2ZYdbITbF9GDSPBjDs8Ld6yO7g96f1QN56kDDZuq6wdsHZRqg1DGnQ7doZtJ0vNwH7sEEVseyHnAAHRddb4k2Cp09VeHCtZlzo+FZ+xKVSn4FSn9BVxiJRE2RgSZqkNoLG74XIaqLso9JW0VJtRvmxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=I2ptgfOs; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-516d1c8dc79so1001240e87.1 for ; Fri, 12 Apr 2024 03:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712918544; x=1713523344; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x9dyIX2GIRxyxtjQgoTbfebK6wI7hUKbyAEauzQCGs4=; b=I2ptgfOsjYS4NpoENOH4c08wdBXsmZ0wngsRYoDitmcqYRPX36XvY3GpEnNm5Yhyrb tREzMYLGVY7Ok35+s6b1ofFaHWkN9UnJLdcY1D97JCJIzGvQf4I0h59OT9Qns08MsdD+ tAnBO2/mzlZ6C+0Uacs7TA66WDFVZ4SXnkOLoj3DfkTqyu50jD2cHwzPE6QobmYVRJuy E9mg/U83eCj8soZSDLhdr16deZ6X7kwS1F+w4vRuywnf0Mn7L7qby/u4VenJI0XfBjBT hrrpC+qzuDoxnDZC6rcdW7oLqYHo2RDljVnpeakiE6K5e37OBLiOMEkUoKZ6tDb2Tc/3 l6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712918544; x=1713523344; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x9dyIX2GIRxyxtjQgoTbfebK6wI7hUKbyAEauzQCGs4=; b=uaf8tpdjFsBauI3wUjh2sE3FzCP/fOtpnmmQ28UZGrG8B0RZO+5DTp+ld/opu7SO9L BJ/9bFIUdypxilkI0WQqjwqBCiatxueAl+Zwd75kuEjElKvikT/mZXjV8MN7f63ylVKH rTYqWAxmYykrf2450MohPF4EavACWxVbVhHiCjIOpTs/+YfeVn5B14iNY5lYNftAjEUX l/rKD+JBUKVtiLUcqCDZrTyOZuGtXBdJA1mWG1mQ9xzLJjRF8NaiaX+/+H1yu8CwoAnW UDuGcPM+8sJdsgDM7bybY1Ukwf90rr+YUqAm5sLHi1I4wtgIKROLs9FohOWDBrgEbHzA DjJw== X-Forwarded-Encrypted: i=1; AJvYcCUpv2doVWdNciINg5uwGks5C/tfQfRp0F0Kea62ZxMG4IZNwZCFZSZxcvXpvUl+7jLkuRtm3XNNdD3Lwme1g65I9+quFacEihscFIO1 X-Gm-Message-State: AOJu0YyVfLG2Z/rKMQAaYe8d1Lu+ojDII1ROEMpk4fQfb5lKP7xdhdfB rje9BczKVH+v6c0/mt6IZo5kTge1gbAEq4a6EraJIygkqcDOyTxtLh2VShZSX7Chdffji6dwnhT k X-Received: by 2002:ac2:5982:0:b0:515:af1f:5bab with SMTP id w2-20020ac25982000000b00515af1f5babmr1431306lfn.40.1712918544283; Fri, 12 Apr 2024 03:42:24 -0700 (PDT) Received: from uffe-tuxpro14.. (h-178-174-189-39.A498.priv.bahnhof.se. [178.174.189.39]) by smtp.gmail.com with ESMTPSA id v10-20020a05651203aa00b005135f60f486sm493689lfp.112.2024.04.12.03.42.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 03:42:23 -0700 (PDT) From: Ulf Hansson To: Ulf Hansson , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Nikunj Kela , Prasad Sodagudi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] pmdomain: core: Don't clear suspended_count at genpd_prepare() Date: Fri, 12 Apr 2024 12:42:08 +0200 Message-Id: <20240412104208.74361-2-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240412104208.74361-1-ulf.hansson@linaro.org> References: <20240412104208.74361-1-ulf.hansson@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There is no longer any need to clear genpd->suspended_count in genpd_prepare(), as it should be correctly incremented and decremented for all cases. In fact, if the counter isn't correctly managed we would be hiding a problem that we shouldn't. Therefore, let's not clear it. Signed-off-by: Ulf Hansson --- drivers/pmdomain/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 903ea0c193e1..342779464c0d 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -1255,10 +1255,7 @@ static int genpd_prepare(struct device *dev) return -EINVAL; genpd_lock(genpd); - - if (genpd->prepared_count++ == 0) - genpd->suspended_count = 0; - + genpd->prepared_count++; genpd_unlock(genpd); ret = pm_generic_prepare(dev); -- 2.34.1