Lines Matching +full:entry +full:- +full:method
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: nsarguments - Validation of args for ACPI predefined methods
6 * Copyright (C) 2000 - 2019, Intel Corp.
22 * PARAMETERS: info - Method execution information block
41 * Also, ignore typecheck if warnings/errors if this method in acpi_ns_check_argument_types()
42 * has already been evaluated at least once -- in order in acpi_ns_check_argument_types()
45 if (!info->predefined || (info->node->flags & ANOBJ_EVALUATED)) { in acpi_ns_check_argument_types()
49 arg_type_list = info->predefined->info.argument_list; in acpi_ns_check_argument_types()
54 for (i = 0; ((i < arg_count) && (i < info->param_count)); i++) { in acpi_ns_check_argument_types()
56 user_arg_type = info->parameters[i]->common.type; in acpi_ns_check_argument_types()
59 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, in acpi_ns_check_argument_types()
61 "Argument #%u type mismatch - " in acpi_ns_check_argument_types()
68 /* Prevent any additional typechecking for this method */ in acpi_ns_check_argument_types()
70 info->node->flags |= ANOBJ_EVALUATED; in acpi_ns_check_argument_types()
79 * PARAMETERS: pathname - Full pathname to the node (for error msgs)
80 * node - Namespace node for the method/object
81 * predefined - Pointer to entry in predefined name table
99 if (!predefined || (node->flags & ANOBJ_EVALUATED)) { in acpi_ns_check_acpi_compliance()
103 /* Get the ACPI-required arg count from the predefined info table */ in acpi_ns_check_acpi_compliance()
106 METHOD_GET_ARG_COUNT(predefined->info.argument_list); in acpi_ns_check_acpi_compliance()
109 * If this object is not a control method, we can check if the ACPI in acpi_ns_check_acpi_compliance()
110 * spec requires that it be a method. in acpi_ns_check_acpi_compliance()
112 if (node->type != ACPI_TYPE_METHOD) { in acpi_ns_check_acpi_compliance()
115 /* Object requires args, must be implemented as a method */ in acpi_ns_check_acpi_compliance()
119 "Object (%s) must be a control method with %u arguments", in acpi_ns_check_acpi_compliance()
120 acpi_ut_get_type_name(node-> in acpi_ns_check_acpi_compliance()
124 && !predefined->info.expected_btypes) { in acpi_ns_check_acpi_compliance()
126 /* Object requires no args and no return value, must be a method */ in acpi_ns_check_acpi_compliance()
130 "Object (%s) must be a control method " in acpi_ns_check_acpi_compliance()
132 acpi_ut_get_type_name(node-> in acpi_ns_check_acpi_compliance()
140 * This is a control method. in acpi_ns_check_acpi_compliance()
141 * Check that the ASL/AML-defined parameter count for this method in acpi_ns_check_acpi_compliance()
142 * matches the ACPI-required parameter count in acpi_ns_check_acpi_compliance()
149 aml_param_count = node->object->method.param_count; in acpi_ns_check_acpi_compliance()
153 "Insufficient arguments - " in acpi_ns_check_acpi_compliance()
158 && !(predefined->info. in acpi_ns_check_acpi_compliance()
161 "Excess arguments - " in acpi_ns_check_acpi_compliance()
172 * PARAMETERS: pathname - Full pathname to the node (for error msgs)
173 * node - Namespace node for the method/object
174 * user_param_count - Number of args passed in by the caller
175 * predefined - Pointer to entry in predefined name table
193 if (node->flags & ANOBJ_EVALUATED) { in acpi_ns_check_argument_count()
200 * against the count that is specified in the method/object. in acpi_ns_check_argument_count()
202 if (node->type != ACPI_TYPE_METHOD) { in acpi_ns_check_argument_count()
206 "%u arguments were passed to a non-method ACPI object (%s)", in acpi_ns_check_argument_count()
209 (node->type))); in acpi_ns_check_argument_count()
216 * This is a control method. Check the parameter count. in acpi_ns_check_argument_count()
218 * argument count declared for the method in the ASL/AML. in acpi_ns_check_argument_count()
223 * Note: Too many arguments will not cause the method to in acpi_ns_check_argument_count()
224 * fail. However, the method will fail if there are too few in acpi_ns_check_argument_count()
225 * arguments and the method attempts to use one of the missing ones. in acpi_ns_check_argument_count()
227 aml_param_count = node->object->method.param_count; in acpi_ns_check_argument_count()
232 "Insufficient arguments - " in acpi_ns_check_argument_count()
233 "Caller passed %u, method requires %u", in acpi_ns_check_argument_count()
239 "Excess arguments - " in acpi_ns_check_argument_count()
240 "Caller passed %u, method requires %u", in acpi_ns_check_argument_count()
249 * This is a predefined name. Validate the user-supplied parameter in acpi_ns_check_argument_count()
251 * the method itself because what is important here is that the in acpi_ns_check_argument_count()
253 * method was checked against the ACPI spec earlier.) in acpi_ns_check_argument_count()
259 METHOD_GET_ARG_COUNT(predefined->info.argument_list); in acpi_ns_check_argument_count()
263 "Insufficient arguments - " in acpi_ns_check_argument_count()
267 !(predefined->info.argument_list & ARG_COUNT_IS_MINIMUM)) { in acpi_ns_check_argument_count()
269 "Excess arguments - " in acpi_ns_check_argument_count()