Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3002481rdb; Mon, 4 Dec 2023 13:44:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGigJ6ym1ea2Axf9URFz7Qx3HxVJGwBTaa7fKvowOtouWAfly1kpfP/BFYQpN39f6yGQb46 X-Received: by 2002:a17:902:74c1:b0:1d0:c41b:1d1c with SMTP id f1-20020a17090274c100b001d0c41b1d1cmr152323plt.10.1701726274516; Mon, 04 Dec 2023 13:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701726274; cv=none; d=google.com; s=arc-20160816; b=fajxle8YnBJRuSu6seOMpIUopiqanALtnQYoMeoWSCGy0mXhRBLlX4y9XDctLLFZgy 3Rwg6ax5A8mJrxwDCkBLXKOON6qbU6o9hkW4nNz11Wh/+kzaM4gUEsKEgB4UbVO8K6+e oucsWT2ouACXn3YCXBtGnkCQr1/IE//fkcj0adJcK6M1S2Wafk2L1gvDh7q85S83tONY rIZdf3kWbN3+NakYqIy8HsWzdpVpw+v/S4nSKFL1dxjyTaOvWbVwrUrpHyQ+J2oDM2Mk /NtlNFh5hFanR3QdWHcdwvLGzrhB3xOBp1iQzRJFnSFwwux2JZ5mL2wQ8yABDfKmj9Gx QFfw== 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=b/w7gPHBXMUYQxVBMSHxKa0iPfJI5g4576m+rQXIaxU=; fh=vkDKdfGXFuI9s/qN8/VQCC9zLwzBlmoSN7d6ISaXfHc=; b=f5fZ/rNvbHqWo6u5ViVgmftMp1o6//aPwFeaoyhtg9Lcpt/K3+MEgXLGghODyQylwK yJnMQN2L6cYCcmcyTqD09wmPPZCsmaMXgQhGClCMJQNRgUJ8lY5C2Z5oeOvIa4mBqdgu 6lVMsNxFRKDmgm4Y+3SWg7xErvsjNPzRqDxEtvcjsNun5qzatFMX1rGyvQgDok7/TI+0 FTWiZdamLlDNtaFjCbYLw34SHzwT/pui6N8Kr0b+vFbYrbjixDb6HoI4irzHZkp+Hg2J vCSKUsPTN76DedFnKPC+HgH88CPEgeK/riMBmGvJ6XfhBsus8UX9COvBZey2jqQ7LhF8 Z1ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eb4RTXfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id k15-20020a170902c40f00b001d07186a161si4572850plk.9.2023.12.04.13.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 13:44:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eb4RTXfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 78715807E44E; Mon, 4 Dec 2023 13:44:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230334AbjLDVoQ (ORCPT + 99 others); Mon, 4 Dec 2023 16:44:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbjLDVoP (ORCPT ); Mon, 4 Dec 2023 16:44:15 -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 4487CBB for ; Mon, 4 Dec 2023 13:44:21 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40838915cecso50820295e9.2 for ; Mon, 04 Dec 2023 13:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701726260; x=1702331060; 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=b/w7gPHBXMUYQxVBMSHxKa0iPfJI5g4576m+rQXIaxU=; b=eb4RTXfBW1an/e8yMemL/ZcqN+819U5zfNQ2NEgqY8AkHye+vOThFh+BGzwkC/42uC 0Zmir7SXyeUJGiGJr4v9oKgmRLvEeN7gzHv8XifRAx9bhkHJaVpMMOjL1KWaTph1s02B G5VWasdh+61OrBC7rhF4VQmw14lelG8kzkcdyq7I1iZLUnjY8gNeDTTw4dS4my6KHw5l r8UQILmnmtPwwlbZ+j3IvSinQiWQXYP/PtovOMOh6tRibI3kqNp5MPfRxBwrjwkB1UbF C6A6m8MSIYGEifIfCLpC6e46m1nDCwPPf/YFbtUUihlhNhF9yA41Jo5uZcJCV7mZker9 FIKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701726260; x=1702331060; 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=b/w7gPHBXMUYQxVBMSHxKa0iPfJI5g4576m+rQXIaxU=; b=raaaNS2Tj3ah4A6GA4hi8kAdY4VcUbXNRJ1d8OEWGipgb57reUfdZ1HXggjmSs3BXz vhAwV/gFPG3/i2zaYBO6ZLIV1a4R+htb0Dj0/ewMRn6uVhV442SloAbFnXzrB69Moc5R c+Ngxh6MJC5pcJevsG+jr1v483AkxyCKlaZOVim0ufjeF3eamZwcFZJ1olJIzz2ZGb5+ G1cB1PAUNgihAA30Yt9VzR5jwP+loUAV3mZVuQtPz6Zlo4aebDOSRLyTDSNhKvLd9mUm keZRBRJ2lkdf9WA0Le5VPj8SNduIEjPawyNj7a5p9uILhNH9UK1bxgKW5D2YIZUowa7I V5mA== X-Gm-Message-State: AOJu0Yy8SSmkXCzumOjCtp1oYkKl8qokD58D1wKRwpHwAWSxadb4/TF5 c8L/Xl/5wRjG44R61dd8YGjEtz2yASbRLMaihBo= X-Received: by 2002:a05:600c:46c7:b0:40b:5e21:e26c with SMTP id q7-20020a05600c46c700b0040b5e21e26cmr2816769wmo.89.1701726259620; Mon, 04 Dec 2023 13:44:19 -0800 (PST) Received: from ?IPV6:2a05:6e02:1041:c10:bbf5:3c34:edc0:c796? ([2a05:6e02:1041:c10:bbf5:3c34:edc0:c796]) by smtp.googlemail.com with ESMTPSA id s8-20020a05600c45c800b00405c7591b09sm16579322wmo.35.2023.12.04.13.44.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Dec 2023 13:44:19 -0800 (PST) Message-ID: <9750e644-8939-4ea2-a2fb-d2c7d7fbb264@linaro.org> Date: Mon, 4 Dec 2023 22:44:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] thermal: sysfs: Rework the handling of trip point updates Content-Language: en-US To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Lukasz Luba , Linux PM , LKML , Srinivas Pandruvada , Zhang Rui References: <12338384.O9o76ZdvQC@kreacher> <4883151.31r3eYUQgx@kreacher> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 13:44:31 -0800 (PST) On 04/12/2023 18:47, Rafael J. Wysocki wrote: [ ... ] >>> +static int check_thermal_zone_and_trip_id(struct device *dev, >>> + struct thermal_zone_device *tz, >>> + int trip_id) >>> +{ >>> + if (!device_is_registered(dev)) >>> + return -ENODEV; >>> + >>> + if (trip_id < 0 || trip_id >= tz->num_trips) >>> + return -EINVAL; >> >> I'm not sure if this check is useful. The function is called from >> trip_point_*_store() which is providing the trip id from the file name >> parsing which is in turn built from an existing trip id. There is no >> reason the trip id is going to be wrong. > > I can drop the check just fine. > > Do you have any other comments on this patch? No, the rest LGTM -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog