Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp538067rdb; Fri, 6 Oct 2023 10:32:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzPzukOu4kAcLwQ9AmwZMSzFZSJRGLAj0eJLoU2MnHLuH/4/ftnj3hA0W6cq7hB6ThvQta X-Received: by 2002:a05:6a20:8e12:b0:161:28dd:c09d with SMTP id y18-20020a056a208e1200b0016128ddc09dmr10775747pzj.15.1696613522350; Fri, 06 Oct 2023 10:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696613522; cv=none; d=google.com; s=arc-20160816; b=DMOT7RxA4k5ctq4usXyLFuNMUWfj0ROKbYl3MXzWYoXKR2JF6mFwkL0Yy6EuYikAIk RK/W5+IUfxsvpTCxsUOWwu3U+pW3HlFnSCmArYtTHECN2Y8C7r3oBlWriuKs12WgeHRo 6lZWDJvfpuoqhKsU4593xb9OgJ24DCj7abhlA3lt4n0WMdE6PUg9HQOLtytdy1V8sWJo WMOVxZutwepYarPTTg67g+khOtomirjzY+yYyNycF+VjXfyUZjjthkiH2TnWf+hKt6sV SUIR0uDR0CI2zQ1+7SFC8KQ5gw/7Mlq4RLDgVkIPviQiWegESG8hRbhJ1S4j2UXLruto QlAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qNJWO++6XhI0ygJOnM9n0oN6/LOXnUQY6wyrdY+k3Ms=; fh=mLwpXbRC66JNOEw8jncRnJ6BTHfhXYIQRe4j+M4FwDE=; b=ZVpvdi/DSBH33ItFuBp/ATHvMwDFc9AhkIPHn38OfJ/tetEOLBxyOLLgnFdpz7NI6J XI2KfAITX9khtx0A/wO9acsfKmM781bcZ118tNFZuLKcOLPdgK8MXoXXFNL5zBRSmP+u 72NADUCcJxscg5iQAPBPY1jWfVZ9QoRe3rD/VRXb2nG7dNy6ot+p+VZ+ZEtWybxYnQCO oYF59olbQYSMfnxn4uj3llKu+en4GbWH52LU0vQNCNfbb8p7kKrMfHkaSo07b9bqTmrE rtpFdgI6xNiclIy+JnfN5TnV708gvIVH4taI2gudAaPVFuKZoB/nCB8Ri20PnN+adhUe L6ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aFn+45By; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ep4-20020a17090ae64400b002791817ea73si6413503pjb.83.2023.10.06.10.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 10:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aFn+45By; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B5DFC83287B5; Fri, 6 Oct 2023 10:31:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233105AbjJFRbk (ORCPT + 99 others); Fri, 6 Oct 2023 13:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233069AbjJFRbd (ORCPT ); Fri, 6 Oct 2023 13:31:33 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FAD4DE; Fri, 6 Oct 2023 10:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696613491; x=1728149491; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lbaG7NRajF8nHEz9svf8w2+E2KSzNWQz4W3JznGdv6w=; b=aFn+45By1JwJZX3eL4SdVokPPlE0Yh8+ZEZWkqv5nko5RIJnbdm/b+yk TueIBMniu4vppv18TbT88CChJ1Ejwf+BaaDuhhUzjJSS8J4Qs4GvadUI2 kTdAxu62JW/22+udDR/WbsUr77UqalqGQJDLr30ZRalBlL+A/YtMY6BC+ 2i/hY9/hNDcwrrEos7S59eYTF0d6U2rWCDGgcEb9nFd8WTlNFa4tZ3zHf wWfFXzkt6NOyBoYJxs7MTj5j+NFiM6UosgcLwGj7Wvlj46Mnfxy4gHoiA qAFuzyO3fTi+mElpbCLZu0nURxSaSGXADgoWyVcm8lXy8ALnXG1XD2Ca5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="387676845" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="387676845" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 10:31:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="745937598" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="745937598" Received: from powerlab.fi.intel.com ([10.237.71.25]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 10:31:27 -0700 From: Michal Wilczynski To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev Cc: rafael.j.wysocki@intel.com, andriy.shevchenko@intel.com, lenb@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, Michal Wilczynski , Andy Shevchenko Subject: [PATCH v2 6/6] ACPI: NFIT: Remove redundant call to to_acpi_dev() Date: Fri, 6 Oct 2023 20:30:55 +0300 Message-ID: <20231006173055.2938160-7-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231006173055.2938160-1-michal.wilczynski@intel.com> References: <20231006173055.2938160-1-michal.wilczynski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 10:31:58 -0700 (PDT) X-Spam-Level: ** In acpi_nfit_ctl() ACPI handle is extracted using to_acpi_dev() function and accessing handle field in ACPI device. After transformation from ACPI driver to platform driver this is not optimal anymore. To get a handle it's enough to just use ACPI_HANDLE() macro to extract the handle. Suggested-by: Andy Shevchenko Signed-off-by: Michal Wilczynski --- drivers/acpi/nfit/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index fb0bc16fa186..3d254b2cf2e7 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -475,8 +475,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, guid = to_nfit_uuid(nfit_mem->family); handle = adev->handle; } else { - struct acpi_device *adev = to_acpi_dev(acpi_desc); - cmd_name = nvdimm_bus_cmd_name(cmd); cmd_mask = nd_desc->cmd_mask; if (cmd == ND_CMD_CALL && call_pkg->nd_family) { @@ -493,7 +491,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, guid = to_nfit_uuid(NFIT_DEV_BUS); } desc = nd_cmd_bus_desc(cmd); - handle = adev->handle; + handle = ACPI_HANDLE(dev); dimm_name = "bus"; } -- 2.41.0