Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1530997rdb; Mon, 2 Oct 2023 12:26:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGncVDqkEcbhfRpOza+pWxFlZs9BWMMgREvak5BXlovxfj31KyLEziwU3LwjtGloTvkQLbX X-Received: by 2002:a05:6a20:13c6:b0:162:5ccf:d365 with SMTP id ho6-20020a056a2013c600b001625ccfd365mr9318596pzc.60.1696274785983; Mon, 02 Oct 2023 12:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696274785; cv=none; d=google.com; s=arc-20160816; b=UmzTwuLizV0lJ11SOrovhrMCVE1wvCs8YTR0cNSU/73k8ZnnuI/poIbu4WXygCjIet 2F+tYSM7popEIVV8wV+VU1fvZiE2Re5tPcbrgPUk1fbREKzk7GvYldiLm8LSimWtt5R+ k78kI7IbuLZNmZC6gko1k69V0LDCxwyjZSHrhc4SUw2czX2jPZHRL3ygdUGYGICYbXUd EpgTe3gDBoc4qg5wIcwfQ24tFmimgd76yfytyPcK2fUMjKBEImEWFvpGvJxkihogPyUp 7OJbL4I8hHtw2jURv/6DfFhrb/L3MH90J7LAdwC6UCK3l4JpjpZwhWcvW5DDmDPUkz24 O4nw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=BnAeEn5MOXiLvr0Fz57cZ3GFXBqc1n7qJJgmpXLecgA=; fh=oYaSBiRL6Lcw6uzUgAesxOPBaNJ73Wuyf9a9oWzzd/U=; b=pqg8bwg9inbjU8i0SkS/SNnFuUVPZ1s9xT7J5KjnhpnaBJezrVCq5VRwaiQDKbngcJ xXcJPs8IT/di/IaxgUW8M5vdrJ6VGjrQCb7OTFKymhE0P+qXB3OVXtUgdHjGqyUsOWhb hzm5Wm4Q1tswc5PoQcHorTHJH2IFcC8yqfHoO2MkS/qHS8XvKLF681n1vqugsjNfRSSi 1EJT/8GUQYkB7kXp8LbNM072FiONhvJgLQwH/VQm/6hHj3TIDZQn/x5HPgcYtEQ+0ZPh t8CpdWGqBGjApX/8nFPnJWNMHCHrcGBxrVKgpmPy9uafaEi0vIib3pOf3qhlSDh8fi7x oGYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IFkqQjFc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q6-20020a17090311c600b001c589ba4a04si29032316plh.24.2023.10.02.12.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 12:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IFkqQjFc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 235AE80C0A69; Mon, 2 Oct 2023 06:51:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237519AbjJBNvN (ORCPT + 99 others); Mon, 2 Oct 2023 09:51:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237500AbjJBNvL (ORCPT ); Mon, 2 Oct 2023 09:51:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 738C7B7; Mon, 2 Oct 2023 06:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696254668; x=1727790668; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Il1UW3rc7f2ltP/ooMOqPyLygbgye98+W7fo5U+PUjI=; b=IFkqQjFc4EUT+RZh6aYIu06O1+nXNNfmTQLHsBoMK5S3M5AavCLSTdXq 4Ga8bbdUES9PEWdYkfUOCH4aFMw8+VbpW03/GcLLk0noQq3JrCuw2kd9n wgor6OJS0UebW8hy2L7MysnqS7UAiewivzafdX1u4CSxMkySbpL/M+mNa A9YReknAxKbxjcmSwMz4jTF/SscioTVstSH+72Wl0FtsXQikbKDCPiGfn gz91q96yKQMoQ/s23jiKB9lf0RnSpuNSqznu0fdDdsaT+Y7HCiX0R9pMT w2Y+uW80p9hXnCpbC7/pP0GjJDv19b3DWiyypcsRR67VZcCAvfQvRlJrx Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="382552082" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="382552082" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 06:51:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="874361739" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="874361739" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 02 Oct 2023 06:51:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B07D81A7; Mon, 2 Oct 2023 16:51:04 +0300 (EEST) From: Andy Shevchenko To: Ulf Hansson , Adrian Hunter , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/1] mmc: sdhci-pci: Switch to use acpi_evaluate_dsm_typed() Date: Mon, 2 Oct 2023 16:51:03 +0300 Message-Id: <20231002135103.2602847-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 06:51:15 -0700 (PDT) The acpi_evaluate_dsm_typed() provides a way to check the type of the object evaluated by _DSM call. Use it instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-pci-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 7c14feb5db77..025b31aa712c 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -483,11 +483,12 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev, int err = 0; size_t len; - obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL); + obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL, + ACPI_TYPE_BUFFER); if (!obj) return -EOPNOTSUPP; - if (obj->type != ACPI_TYPE_BUFFER || obj->buffer.length < 1) { + if (obj->buffer.length < 1) { err = -EINVAL; goto out; } -- 2.40.0.1.gaa8946217a0b