Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp537270pxb; Tue, 19 Oct 2021 08:00:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0XpiuOXNJfLcoo2WsUUTtKhy3H1rVnXt39kwXwfYWxEjUp9+dItPGyFNJY6udi7YegI4P X-Received: by 2002:a05:6402:d69:: with SMTP id ec41mr16357845edb.180.1634655626186; Tue, 19 Oct 2021 08:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634655626; cv=none; d=google.com; s=arc-20160816; b=VvqIGek13eeydektF69loJbzAS1Lf0gunscHxuttdh6T34JPTn5zuFxi+SrOfOoQP3 fwxBOlLjnoi9W27xQN1F+KBV00vy0MpK8PU8QB8Sbmqtu0iX6OIK57JQzwPA9AfpAsTS ec8O0U5l3fZ/8ZcoX7HlkFmvr34gG79PS+cq4s2bUA1U2zK+Jswa9yXjE54hxElisXwp AI2COhQS+NEAcqYUsPN5MTgkudL/x7hc8nxbL220+R3XZRHMVaDTOqL+Ja2nS87RVcmX YEtAm1ilW8K0ropiW+U66LaPKQX2R4Vv7LHfgpz1Qbp8ogtKLZYeGMlo2nUC8IKZSd2H iMrQ== 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=jVtJ+jWtoyifMEkXi2ijdTEVKJmm5rBLCAV/XYMHwdQ=; b=kdO3GNzpjTphNBDWFcsINHlaRj0uXXtH2koezr9HHAPZVEPPHIs4giYnfCSLVUMGzE egD0sETbYKLHGdcMZwcVG7Md2eAiJ+XZgFyHBqvxHFMTTvGqAP25Pb0bxP3U8e8bsBgi jEaI/o0I9dZo6G3QpJ8bfyh/9nGG1HrleYLJN6FgOy5Q2tx6+aZFo1fBTqQjyEyIR8ZR fDtxlRnJ/8u8THXY7epmMEh/xpvpJ/ypaEv+9ZK1dGjW1aVc1br5LJ4AKvm1uAOQQ/yn IkXLuSYSeTnZSTnLpia7gEfolmFGsQ+HS5y630uhpfFu4Z+9GkBa93jeo/JD/TSMkMdB xBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IgzpJ/qF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z66si23617365ede.301.2021.10.19.08.00.01; Tue, 19 Oct 2021 08:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IgzpJ/qF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbhJSO7b (ORCPT + 99 others); Tue, 19 Oct 2021 10:59:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37865 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231226AbhJSO7a (ORCPT ); Tue, 19 Oct 2021 10:59:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634655437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jVtJ+jWtoyifMEkXi2ijdTEVKJmm5rBLCAV/XYMHwdQ=; b=IgzpJ/qFRYMN5/XYQudUsAj+wO38P7PsduyVPR64PSSsvhk7iOqXB/l/2774stiJsRtv7h +l+u3XTKEZj+ASzWeKR3e68O2UDYL+b94UM2qhlLN3f2cc3B3TZXVu5SbZeEVmvsGijZ+R u3OgKj3ftAVFZJrwl9UWL7sD9QHAUNw= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-76-fDzYEZJ9NaaO4oLF23Mkfw-1; Tue, 19 Oct 2021 10:57:16 -0400 X-MC-Unique: fDzYEZJ9NaaO4oLF23Mkfw-1 Received: by mail-ed1-f69.google.com with SMTP id v9-20020a50d849000000b003dcb31eabaaso157291edj.13 for ; Tue, 19 Oct 2021 07:57:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=jVtJ+jWtoyifMEkXi2ijdTEVKJmm5rBLCAV/XYMHwdQ=; b=KXegtKnkI10aiCm+ByoLQfU6hFlyOeWKInWMesrfnSojea+ZIX7zt2HdDP4lAb84kB RFEfC/NRnfGC7VbZlmDhLjPFe/A+W2MqLof4+YIaIpaeTwcNExC9jy0HIYZlAlOMXf09 eqnAvzk9hsIFQChOzZF2K9ZrkJs2mazuQ8e5KBJSKP0jjQiHseFllc+qp0Ucd3Z0AFXC lgK4/IXyJfhRzwbQsMp385Xw2PHpKGqcuo45zXW5shcTfi0OEcOiM8Y8rWqknW+PyA0L 9QlAuyAjzqItIAyqCPX6YZkfrCvxLASC7DMfhf8b3hq8W45wNsdYELrmSQROt+Dsuiai E/rA== X-Gm-Message-State: AOAM533tYw27+mXsUZ6Qp2lJBiDbCnr8OeySfFtSH3zRhqkItJMw4OuC /2RLUIxTf5ILPxQsHYYy8ceMAI7Y4x6h+HgU0rpl5lWYJNCIzdLH7ZTyRmj0x4FP0VwcfZEfeII cEF4OOi/KUJ7e+dfnROYOAElO X-Received: by 2002:a05:6402:c11:: with SMTP id co17mr12026208edb.36.1634655434885; Tue, 19 Oct 2021 07:57:14 -0700 (PDT) X-Received: by 2002:a05:6402:c11:: with SMTP id co17mr12026181edb.36.1634655434753; Tue, 19 Oct 2021 07:57:14 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:1054:9d19:e0f0:8214? (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id z4sm10407243ejw.46.2021.10.19.07.57.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 07:57:14 -0700 (PDT) Message-ID: <5f767384-a458-3b8f-6111-45e09b77af41@redhat.com> Date: Tue, 19 Oct 2021 16:57:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v2 6/7] platform: x86: ideapad-laptop: Use ACPI_COMPANION() directly Content-Language: en-US To: "Rafael J. Wysocki" , Linux ACPI Cc: LKML , Ike Panhc , platform-driver-x86@vger.kernel.org References: <4369779.LvFx2qVVIh@kreacher> <1727796.VLH7GnMWUR@kreacher> <8000884.T7Z3S40VBb@kreacher> From: Hans de Goede In-Reply-To: <8000884.T7Z3S40VBb@kreacher> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/13/21 18:13, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION() > macro and the ACPI handle produced by the former comes from the > ACPI device object produced by the latter, so it is way more > straightforward to evaluate the latter directly instead of passing > the handle produced by the former to acpi_bus_get_device(). > > Modify ideapad_acpi_add() accordingly (no intentional functional > impact). > > Signed-off-by: Rafael J. Wysocki Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > > v1 -> v2: > * Resend with a different From and S-o-b address. No other changes. > > --- > drivers/platform/x86/ideapad-laptop.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > Index: linux-pm/drivers/platform/x86/ideapad-laptop.c > =================================================================== > --- linux-pm.orig/drivers/platform/x86/ideapad-laptop.c > +++ linux-pm/drivers/platform/x86/ideapad-laptop.c > @@ -1534,17 +1534,13 @@ static void ideapad_check_features(struc > > static int ideapad_acpi_add(struct platform_device *pdev) > { > + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); > struct ideapad_private *priv; > - struct acpi_device *adev; > acpi_status status; > unsigned long cfg; > int err, i; > > - err = acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev); > - if (err) > - return -ENODEV; > - > - if (eval_int(adev->handle, "_CFG", &cfg)) > + if (!adev || eval_int(adev->handle, "_CFG", &cfg)) > return -ENODEV; > > priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > > >