Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4540660rdb; Tue, 12 Dec 2023 02:27:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjC9r2M/nbY3zX87k+wQpV7sNEJFzwc6zAJgr+1zDBlHTAnjgyBFUHBI+tr2Wyqq1R6PGE X-Received: by 2002:a05:6870:b155:b0:1f5:cd12:260f with SMTP id a21-20020a056870b15500b001f5cd12260fmr8658766oal.26.1702376836793; Tue, 12 Dec 2023 02:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702376836; cv=none; d=google.com; s=arc-20160816; b=Ok+JqnFzCYVx6IW9QAVAd6WzBnMfn2usLnheKtoKZmBRIhBwMMq2Yyqz/AOfoaZ2TO L2MI6cP9zUlZnQiWnWD90QfB1d4fjVVNIQSQlGB2U395ypkbBq9N1OwYRIth+FrYv3nj XSaOsXG5vh8DoQMu0huRsRG7k/rOOMoJqeRjerYjQpujcfFf+SSwHnW/q2Ub+1LZ9d2t SUCnxAVICi7GZDZZhPXsGLQ95v1DH+t+SSVmqLsvnt4QZGyHntz1cg+y0OLiXbsyL3Pa vbeFuw8EgNoVC8z+Zlc8ADTj2Htp5XjwM74Yn9v9jZlqTdDfvRPStIVAOS9jP5fyopWD Vohw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=bP7c/myD+U4XEosySZ6ztiiSArLX1tL4AePUf2cD73I=; fh=LBoYCTwcnc4aGCO1Ky9m5KD26cM4ZwLGFt7YdcTzbHo=; b=mA1LOlHCXD7qy6ak9L5GntiqCqwkNMv0fZzJyYzz/wifXsiC/bV/3rJBEjmRuOtJpI QoBl2KXBxMxaK5ZzoszUqL2PpM9LDFzKTqMpSLOCA6fU4h2NgTdl3TUgZnYh8jOMFTDj NHgF3xoQA6Z8FmofzR+J6rdMX0iOP3lprUe1529kBhPTswt7cGlom8VdLuGwHr4jrRMZ Mmdr9BveGjeYW69AFyTe2rFbRajBluXIBkJdU+1/3Y6RNr7t45EFlkMIIvwaQinR1TMM 0SyqSKeXb0UVfHMlgm4VdSUAr4OE8d0s0fxK3gZcu8Ai6gH3rT/TVfGP+TU9Rs1Bl0kh Ue1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hl21sWeX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 126-20020a630084000000b005c64505cbc2si7611702pga.19.2023.12.12.02.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hl21sWeX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A7E5B806CC1A; Tue, 12 Dec 2023 02:27:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjLLK1E (ORCPT + 99 others); Tue, 12 Dec 2023 05:27:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjLLK1D (ORCPT ); Tue, 12 Dec 2023 05:27:03 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C74A5AB for ; Tue, 12 Dec 2023 02:27:08 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c3fe6c1b5so26458275e9.2 for ; Tue, 12 Dec 2023 02:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702376827; x=1702981627; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bP7c/myD+U4XEosySZ6ztiiSArLX1tL4AePUf2cD73I=; b=Hl21sWeXLsTM9tMfGNr58XTHsV1QSIURVh4TslOeOkWqoOu/cY9PeC1DNzUWT8KkDf JZwN17YYUUY2VlDUISj16JVYWWWoFhiDLzc0svcpGMSAFy8vs9K4UYWZv+UylkqLRHby oUPUflbG23zsnk10o5J+nTH5422i8D9SIbS/w0AhMvv9KbJVqshB8bX4jeb46CVsxYrs GGtTLRmaWEwytOgxLfGNBcJc1eSZssAQ3NiVy5Cfd93nwIqUWmjykNp/DT8y1zfnkhdF BPF4S/aCKY6tu1PKgAR+It2VHu/RvPcbvnZFNakSWt0CWB568suGU+8soTL9wZ9+PM38 XdbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702376827; x=1702981627; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bP7c/myD+U4XEosySZ6ztiiSArLX1tL4AePUf2cD73I=; b=IarVdcuGNnndHmMWHCHy/HeXYgtT2/2CWzppCSp+lW2I5W9ZAVhEzxjdHGFhM0kget NU+kU6XmWpe9els61ZGkUpXEUeJghqVbuwuuZB+hmhkU/XVSxqsA3wEGQkB4oX+NlgHx Yax7CQj28w7SPVDka64oP0gy6L3eZcDnoBjF7MlZk35Ac+F24EXbxmZai4kfD81e3xxp xgsMQ3T6fhAyyyrkZ8FHvL/0b2B3T5BCWkLbcokSZS2yF+DvNnJ0BdSq+yfoQeGUzUT7 4OlZMsod0xbedgTwem88NIrddZHObuuFrwD31KdxI10mSH7EYzOLYg4sddXy5X5Hht0E UEKQ== X-Gm-Message-State: AOJu0YyAdG72xkaMmjniaLV55tShyefWffA94nr5uJwNETNifQKTYtC0 AqfJ5SKl3q1WIMXSxLdLmTupxwZyGY35VWZQQGk= X-Received: by 2002:a05:600c:45cd:b0:40c:271a:e7f7 with SMTP id s13-20020a05600c45cd00b0040c271ae7f7mr2646620wmo.145.1702376827190; Tue, 12 Dec 2023 02:27:07 -0800 (PST) Received: from ?IPV6:2a05:6e02:1041:c10:c49e:e1a5:3210:b8c0? ([2a05:6e02:1041:c10:c49e:e1a5:3210:b8c0]) by smtp.googlemail.com with ESMTPSA id b1-20020a05600c4e0100b00405959469afsm16189200wmq.3.2023.12.12.02.27.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Dec 2023 02:27:06 -0800 (PST) Message-ID: <9d8e3701-1259-479d-98eb-46398655f1ac@linaro.org> Date: Tue, 12 Dec 2023 11:27:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/3] thermal: Drop redundant and confusing device_is_registered() checks Content-Language: en-US To: "Rafael J. Wysocki" , Linux PM Cc: Srinivas Pandruvada , Zhang Rui , Linux ACPI , LKML , Lukasz Luba References: <1880915.tdWV9SEqCh@kreacher> <8315317.T7Z3S40VBb@kreacher> From: Daniel Lezcano In-Reply-To: <8315317.T7Z3S40VBb@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:27:15 -0800 (PST) On 08/12/2023 20:19, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Multiple places in the thermal subsystem (most importantly, sysfs > attribute callback functions) check if the given thermal zone device is > still registered in order to return early in case the device_del() in > thermal_zone_device_unregister() has run already. > > However, after thermal_zone_device_unregister() has been made wait for > all of the zone-related activity to complete before returning, it is > not necessary to do that any more, because all of the code holding a > reference to the thermal zone device object will be waited for even if > it does not do anything special to enforce this. > > Accordingly, drop all of the device_is_registered() checks that are now > redundant and get rid of the zone locking that is not necessary any more > after dropping them. > > Signed-off-by: Rafael J. Wysocki > --- Acked-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog