Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp623734iol; Thu, 9 Jun 2022 10:17:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZydsH9LiIALug0OFwUy9BlhCOhq/c1w7ht7GN35dwQb8d8TCKS6aV+LYAA9cUyP81AKBQ X-Received: by 2002:a17:903:24f:b0:15c:e3b8:a640 with SMTP id j15-20020a170903024f00b0015ce3b8a640mr40429107plh.5.1654795041610; Thu, 09 Jun 2022 10:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654795041; cv=none; d=google.com; s=arc-20160816; b=dGISu267drCQcMY+fyGJ9lemoa/Bpm1wgkQq2bxyN4TJWL9madW0KQey/73JXHZ980 64x8WxICqnlXhp1MAm1dXG7SHLuPFIYkcvNm9bcvF6c94ROYRcceAMwzzYoiQBZpCZb9 j7nvKC7PqqCR2/6hPXc8iCnWnnWR3AB5P3SuHf0Pr+t2fqyQaiv3SmRjr5IqO9RKLsWb IHA09PXNBHSoJjVDbKa/wkbj2Lai4AdWYDjS/YK6E4nzV/2Gy9sLaAnF4Ejsqppa8P1y QNvvIsHH2cnygAwrremlCFr0CCJ2ADAs4Xq0422Clqwww8Zd/P/LH7gSIn229KWuNtcm fcIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jx/TwefoXQ/P2czfik3anoWZuldTa67uM6sNoDUC1eo=; b=RTInYmxN/T1Q95n6VkYgG5UzmWDjiNp71IryVJK1XE+WhbJvtwKnXXMSVGdVZv3E56 ld2nWEy2ZGzbJNfpULHJbVJA9tFMOWaWbOymHtz8N0114cOLN+Nf1SFo/T0MUtmWTgEX iCcxU4/7yYEFPENig67XUqhY2y3ZAi6eEDaG+wlW6hKsv+t9P2JWKsGP23Iz66JNZwTz zoxvjzGi0oj8V1g3i7dRZsa8rfng0I0/5nK8D2aEqFg2UwhDEpjcj5jed1WQz0p6lClb P1vYmDMH8VkcAi8BbdpitOQPvICEQkxn75slFckfDsr7PDLTNP0EVVNsBlo5MJ+yo4KK 5m/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JAZZ2keX; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a056a00190100b005108171fe28si33433190pfi.162.2022.06.09.10.17.08; Thu, 09 Jun 2022 10:17:21 -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=@intel.com header.s=Intel header.b=JAZZ2keX; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343925AbiFIPts (ORCPT + 99 others); Thu, 9 Jun 2022 11:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236467AbiFIPtp (ORCPT ); Thu, 9 Jun 2022 11:49:45 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C486FA1A; Thu, 9 Jun 2022 08:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654789784; x=1686325784; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zVJ9nUrab+QmY+GSG1HNCt4wr+crK76F+ZOhFnD2E0w=; b=JAZZ2keXx9EXVhm/xq9bfTMk21fwcVbo+56gcXyxng7u+0n2sWdwm3y9 LNzEv/r/5KtYy1D7Vd1rKc9xLFoqJvT7r4/4GZe8QxoNQrT0mo0cWBZ0z DY3xDROgytjr9NEpeYA94OBMLi6I6v9JT9aeFR+iBA8nd3DSYi1gqsULP zZywsTNu97NXEI/1bcznOStDmQfCSWA1alyXigTHuxLuEsUzyaPNjzhft FL78kMUZmCL/CcZnfeiodiAJ0Eah9HsP5UH0hqBU1IIXtFGFs4U3Fg3uy EZzil9iKkVovASTUnn5t6tXBzr5sWPQAji+zIQ84FOKWq2LeyRf7IKcUg Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="341399797" X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="341399797" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 08:48:28 -0700 X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="724492128" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 08:48:25 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nzKOU-000Y0J-OW; Thu, 09 Jun 2022 18:48:22 +0300 Date: Thu, 9 Jun 2022 18:48:22 +0300 From: Andy Shevchenko To: "Rafael J. Wysocki" Cc: 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-x86@vger.kernel.org Subject: Re: [PATCH v1 12/16] platform/x86/thinkpad_acpi: Use acpi_dev_for_each_child() Message-ID: References: <1843211.tdWV9SEqCh@kreacher> <44750652.fMDQidcC6G@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44750652.fMDQidcC6G@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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? AFAICS the caller is prepared for negative returns. -- With Best Regards, Andy Shevchenko