Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp601341iol; Thu, 9 Jun 2022 09:52:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHvgdcC27lErembjBEUO9Vvq7o9SJbmdajmVz388E+nzVvhGi9dKdWaiKTli+YAq3zUDQT X-Received: by 2002:a63:62c7:0:b0:401:abdb:1be8 with SMTP id w190-20020a6362c7000000b00401abdb1be8mr1585457pgb.204.1654793533676; Thu, 09 Jun 2022 09:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654793533; cv=none; d=google.com; s=arc-20160816; b=uI8AZp878TCXcE23eVslniLc0qHv4RKNaiK7/oxsWUEsq2NcKO6OIe+dy/I41yAidF omrVXH1DKxZ8/IvcWejDg7/kWRse0Pm2Onpsoz1/Ofax5exS0+rCAacDyGWdrBRBlwIX ec/gJnFhs9LvRZl4kIeZ0ORjHwN7Ch+YLvQ8uW5a/an24z66m0461aHg14ym30Kvcy8H MxChFe/6yLfOxlQkU6fbTk46vbJ7SJUGKX05Oftsb5ml/zSzzZlJP9Hp8C/IycdEILrh TvsNJ7jfv6WM9a2y6dnKaXiPvPIMSs2d9k8oAx5i7/kD2CJSqWfFnj0MDwJcbcmkNBxc Lq9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=mvtAx+cq822U1n+fiU6/l7+rvDRHb6xJ+jG+fs2wJOc=; b=bqqNlB/J+kbwbkyrUux1DLa6DfovTJ5fO58Wsta4cezgJr4IhQIOPqyT+xeNB4LUt1 EfpsCGUqwB6hm5+gmO+2QoOLLworun4NJ37uhG5ik/Darfl/OjCN8FuOWH9XqKcvSYfw x+NhSdKcknrRBaohysZCbsSVUcI9PruQQSrPODfLj391DZScPFVtHxqGTj5YZBLLCP98 Uu/CUZhDepeYT5pIN9PLoj4xwZ6VoJq90E/81ucWH34cHcscYRQIs0YklobhE4oY1iSM zEQkKsC6KsaqEZLnOOnbM7Pl6nVxF60EDpZPeCLYof+anEiXgn1NsMKGALQPNGSgBcMQ Se8Q== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq6-20020a17090b380600b001e589a828a1si33462118pjb.75.2022.06.09.09.51.59; Thu, 09 Jun 2022 09:52:13 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344660AbiFIP4k (ORCPT + 99 others); Thu, 9 Jun 2022 11:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234872AbiFIP4i (ORCPT ); Thu, 9 Jun 2022 11:56:38 -0400 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929B249F14; Thu, 9 Jun 2022 08:56:37 -0700 (PDT) Received: by mail-yb1-f176.google.com with SMTP id r82so42435079ybc.13; Thu, 09 Jun 2022 08:56:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mvtAx+cq822U1n+fiU6/l7+rvDRHb6xJ+jG+fs2wJOc=; b=2Of0x5SSXOoSTjaQucNrJdcx8eEEZnOX/FIr3bZ3q1T8XCj/mcqoXDspgOv9JB+oJV AKjhqCWvRt0DHc+c2bw7O/GeCRmyUibIcjgfOl9WBEZUW/VNa/J63XaDj8cHXHxQp5Zx vQO7G09YzaN3/S4AN8BHRpfsDymAvTHvdCcx/JKV+P5j1nkGgHIV0k9NlER3bAFYeZgH N4zKPfTDK7srXyanY0sbz0ibjPh4Bl5rci4gqSnWeA3BmXDiUFY6m27HjzmM640l137U bI86K2ljHv66yqAkLNduxpEQyYCI8ot6uFl4IfxhQrXAdiUKKjCRi4bZHba6FPyPzZKt 84Rg== X-Gm-Message-State: AOAM532sAv5ADLGf2TjK0I5gYjNSZbafRKMgJDPW67DUgQTcYpRxX6Mh PJgdcLKN8AHhyEDMwWMecpdBplVLQuTUoCicwxE= X-Received: by 2002:a25:84ca:0:b0:65c:b5a4:3d0a with SMTP id x10-20020a2584ca000000b0065cb5a43d0amr40226725ybm.137.1654790196789; Thu, 09 Jun 2022 08:56:36 -0700 (PDT) MIME-Version: 1.0 References: <1843211.tdWV9SEqCh@kreacher> <44750652.fMDQidcC6G@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 9 Jun 2022 17:56:25 +0200 Message-ID: Subject: Re: [PATCH v1 12/16] platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child() To: Andy Shevchenko Cc: "Rafael J. Wysocki" , Linux ACPI , LKML , Linux PM , Mika Westerberg , Hans de Goede , Sakari Ailus , Henrique de Moraes Holschuh , Mark Gross , ibm-acpi-devel@lists.sourceforge.net, Platform Driver Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, Jun 9, 2022 at 5:49 PM Andy Shevchenko wrote: > > On Thu, Jun 09, 2022 at 04:09:45PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Instead of walking the list of children of an ACPI device directly, > > use acpi_dev_for_each_child() to carry out an action for all of > > the given ACPI device's children. > > ... > > > + rc = acpi_dev_for_each_child(device, tpacpi_evaluate_bcl, NULL); > > + if (rc > 0) > > + return rc; > > > > + return 0; > > It can be simply 'return acpi_dev_for_each_child();', no? It can. > AFAICS the caller is prepared for negative returns. It will not return negative though unless the ACPI tables are horribly broken.