From patchwork Tue Dec 20 15:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 636317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4911C4167B for ; Tue, 20 Dec 2022 15:01:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234181AbiLTPBr (ORCPT ); Tue, 20 Dec 2022 10:01:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbiLTPBO (ORCPT ); Tue, 20 Dec 2022 10:01:14 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C585D1CB26 for ; Tue, 20 Dec 2022 07:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671548462; x=1703084462; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eCH+vVzzZOuP/pP9FLSZ/qhBMoVAg7DrcVKiwzyjV1A=; b=lr8bGP0rJJWYKeVC5WvqstE7muE6jS/NnyCZeFy4TdxGQNvxbVVAGCFL L5E92kKqUbBiiptT2KiWDMVLw4F/AyOY7+Fz/0dgo6+jjSQeZQwCJwupH O5aH6lC6kQ8YTEJylWGJYI0s2J4KgbbT4nHLwNmqjugyoNFnZiyJ8CRCi cbj53gnYodEK+WclPqMYL4sqI5APunLOzJ+71lCENJo/WuRejzKryNDca B7E4uff7JbP5escETWtrZerQW603SARqXTVUBZMvxEt4fHl4VBdFoBseS KZAKznpgV6A9681b8JuvkVVIfwFIzMyx4Oh9cOdl7l8F7ApT8KivJoXz0 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="346732743" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="346732743" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 07:00:48 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="896472622" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="896472622" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 07:00:47 -0800 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 716BE20321; Tue, 20 Dec 2022 17:00:45 +0200 (EET) Received: from sailus by punajuuri.localdomain with local (Exim 4.94.2) (envelope-from ) id 1p7e7S-006okH-7j; Tue, 20 Dec 2022 17:01:26 +0200 From: Sakari Ailus To: linux-acpi@vger.kernel.org Cc: "Moore, Robert" , "Rafael J. Wysocki" Subject: [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle() Date: Tue, 20 Dec 2022 17:01:26 +0200 Message-Id: <20221220150126.1624988-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_get_handle() uses the pathname argument to find a handle related to that pathname but it does not need to modify it. Make it const, in order to be able to pass const pathname to it. Cc: "Moore, Robert" Link: https://github.com/acpica/acpica/pull/773 Signed-off-by: Sakari Ailus --- drivers/acpi/acpica/nsxfname.c | 2 +- include/acpi/acpixf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index b2cfdfef31947..a0592d15dd37c 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest, acpi_status acpi_get_handle(acpi_handle parent, - acpi_string pathname, acpi_handle *ret_handle) + const char *pathname, acpi_handle *ret_handle) { acpi_status status; struct acpi_namespace_node *node = NULL; diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 67c0b9e734b64..085f23d833349 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status struct acpi_buffer *ret_path_ptr)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_get_handle(acpi_handle parent, - acpi_string pathname, + const char *pathname, acpi_handle *ret_handle)) ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_attach_data(acpi_handle object,