Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp536294pxb; Tue, 19 Oct 2021 07:59:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnpCaD1gYJDpQIXowzBiGMLsJlqmAMT3WbXsDlDrgiljFKW+HTFsJJNxAdC/MCK9+2Gwaq X-Received: by 2002:a17:906:5e52:: with SMTP id b18mr40236489eju.560.1634655569983; Tue, 19 Oct 2021 07:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634655569; cv=none; d=google.com; s=arc-20160816; b=s9ix4LzsS8PTjwP9Oq6XqOFMB+BcpaT4gNidKi4kmdexOfOYGzivyAd5d/8UkQMNzp XQ9q42/K1+gik6N9Sz1arLfY5f9Lg9fYQP7kunTF69zhxE2a3vMvbzj9ts00h3T1UzI2 ZK7Qk643yyemzJ42UMNf8svmyuQoZqEUsg3YMrua2XTjCV1iTniz2YNpzty97f5TzC1j JW0/q9j8jBH+PUusJcppemZwrI+9myGMRGWhCevIgQYqywaIAGCMW03Ze2rDzZFmKu2Y X2eOviHfWnyxIu2nGGpMe93UKkm6rUJbBiVc5oov5Jo/AItuGAYqjF6j7yuS9fSYlyB0 LWBQ== 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=S+NrsU0gaObw7QSCSHFIz2Urcvc9T1qjARe37K5Lbog=; b=xFv2w602s6InGjkl+sjzpNzLruaxDVs1DPWjASW3EDriUtauldOA35b4FPViKq0pLY ZlzZIKPArRHdSafTwc+EAPwPd+frCMDN91o1/EjJPF12v9jAiTcViQax33gseCOvbbSl cuZ+vOSiBXsPbYZXrKThyu7daC3ivs0/DluSHme0V+kLJzsjOoMMr7yJJXkMU7gEuTg0 +fFVU6JAakvz/b8c9f6Qt7ciDT8pMYnyTy0IGFRan2jv48Be9CPzERJDyg6FfBJP6dRv io8i/tECUFqDhZpjBsN+GPhvQCE3tE71+VBXol2IGwXaaCEeInZccWkp7ZMbYWfAsnn4 0Mqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bi5Kl/kG"; 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 f15si39601120edd.584.2021.10.19.07.59.06; Tue, 19 Oct 2021 07:59:29 -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="bi5Kl/kG"; 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 S232083AbhJSO7S (ORCPT + 99 others); Tue, 19 Oct 2021 10:59:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47403 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhJSO7Q (ORCPT ); Tue, 19 Oct 2021 10:59:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634655423; 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=S+NrsU0gaObw7QSCSHFIz2Urcvc9T1qjARe37K5Lbog=; b=bi5Kl/kGi0pOjVbP70ZfKuQf2l0jCVvyeW+uRYo4KC51TkBqwnDn3Lf4fPGk7lncUOwAh9 p5ka6PYd/1Xgat6B26QNtyGoEj6Uo/cxS2fZk2p194QxUiUB8JXZFjKuv+8E+VV+Szi+Ai TOWWCTNvPMNDVSzX20Y4BDPDn4MoC4k= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-511-7sRdj4iZOciX69ALArtn_g-1; Tue, 19 Oct 2021 10:57:02 -0400 X-MC-Unique: 7sRdj4iZOciX69ALArtn_g-1 Received: by mail-ed1-f70.google.com with SMTP id r25-20020a05640216d900b003dca3501ab4so1416070edx.15 for ; Tue, 19 Oct 2021 07:57:01 -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=S+NrsU0gaObw7QSCSHFIz2Urcvc9T1qjARe37K5Lbog=; b=5bFjkCTyyxe63h4ApBJ56/QWYPPYvLgTIPXsY8ef6XdgL31zp3d9+n3h/nNPRzzOrn qWVuuvT3WA+TokoarowgZq3R2cTmNsP7CjL9s169MIuiLdBsk9iHvIKqbKXi4zxWZoRs YwBvToLcRWBQTQBGRrKMSuGUHabhcI0PKkWbQ/c5bEM16lcTOklyLi4opBFb5U4AVmEh UXEXl9pn9OUjki1s3mZgD6itkWMVWxnRRZ5PUZn5sIENXSvbNE0ZREJaXCyZHiIyNTyK t5G97RM6zh2bLnVLEgEFenWWBlfjBkaay/cZ/SSIzqq9O05tjIX56zTPIZhPn/uAHqG3 z9ZQ== X-Gm-Message-State: AOAM530CJmlYYSRiVHfDxx5Rl/rgsuZEdwXCYhpRr70+hedJ6fkoyJ7z jc9i8NR9FLJf8ixspjaJafYxX8B4jgwAiQQHBMTITbH51F6Lzf0gxrzjcqV09OaYENsr+aA9wjb dDkJC4ptXHTwRIVnjXeQsBaGk X-Received: by 2002:a50:da45:: with SMTP id a5mr25578155edk.306.1634655420733; Tue, 19 Oct 2021 07:57:00 -0700 (PDT) X-Received: by 2002:a50:da45:: with SMTP id a5mr25578125edk.306.1634655420533; Tue, 19 Oct 2021 07:57:00 -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 z4sm10406983ejw.46.2021.10.19.07.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 07:57:00 -0700 (PDT) Message-ID: <9878301f-0080-7063-8a34-926b2d63524d@redhat.com> Date: Tue, 19 Oct 2021 16:56:59 +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 v3 5/7] surface: surface3_power: Drop redundant acpi_bus_get_device() call Content-Language: en-US To: "Rafael J. Wysocki" , Linux ACPI , Maximilian Luz Cc: LKML , Mark Gross , platform-driver-x86@vger.kernel.org References: <4369779.LvFx2qVVIh@kreacher> <3089655.5fSG56mABF@kreacher> <2503491.Lt9SDvczpP@kreacher> <3160001.aeNJFYEL58@kreacher> From: Hans de Goede In-Reply-To: <3160001.aeNJFYEL58@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:12, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If the ACPI companion of a given device is not present, the result > of the ACPI_HANDLE() evaluation for it will be NULL, so calling > acpi_bus_get_device() on ACPI_HANDLE() result in order to validate > it is redundant. > > Drop the redundant acpi_bus_get_device() call from mshw0011_notify() > along with a local variable related to it. > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki > Reviewed-by: Maximilian Luz 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 > --- > > v2 -> v3: > * Resend with a different From and S-o-b address and with R-by from > Maximilian. No other changes. > > --- > drivers/platform/surface/surface3_power.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > Index: linux-pm/drivers/platform/surface/surface3_power.c > =================================================================== > --- linux-pm.orig/drivers/platform/surface/surface3_power.c > +++ linux-pm/drivers/platform/surface/surface3_power.c > @@ -159,12 +159,11 @@ mshw0011_notify(struct mshw0011_data *cd > unsigned int *ret_value) > { > union acpi_object *obj; > - struct acpi_device *adev; > acpi_handle handle; > unsigned int i; > > handle = ACPI_HANDLE(&cdata->adp1->dev); > - if (!handle || acpi_bus_get_device(handle, &adev)) > + if (!handle) > return -ENODEV; > > obj = acpi_evaluate_dsm_typed(handle, &mshw0011_guid, arg1, arg2, NULL, > > >