Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1297153ybl; Mon, 2 Dec 2019 01:04:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyswdFsUFRmkAtCawFx2TAWJJXX1yk2R2YiR3JUIsPK6k61QNkN5qQ2oy9158U2PPvlYIqe X-Received: by 2002:a17:906:397:: with SMTP id b23mr22294345eja.234.1575277454447; Mon, 02 Dec 2019 01:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575277454; cv=none; d=google.com; s=arc-20160816; b=Rxng5C2u+PuxXpYYxeTYS5EeTUw2D5ldOfDkQO/eAIpdBI4+FqJ9TxgQYOd7ew9wfi r9a5w1SrdOR6jgWIeohFWl9pBrzC7VtLVRlZ5opBcTU+miogyVD2z9aePkUuxtWKADwF AWrg3NzIYrIdshbFsVFUafEMg2N7R0TZFKUwhyBfJ7vCORdnIjcWfxtBVF4rPg2nq1WK AL7AL7JO4gwOwsOHiDzQRKrlRYoFMtvE4m8ChSSiKcvzxKMaD9atNRHkkTKc3FBDFmIw Y5Polv6SZdPfAfnNxaDkyMkpYXaPGSqtjsRdtIdK6uzOHfCIsZ/uLORvZZa+9jnz3/sS g9mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=xJSCoF7uUHStyU5OcsO3VSav2wz6CuhovW+cwvZNC0Q=; b=LEeP7BDY1MdMISb929DbGl+eJB1WNKicMWWwBjClpMzYfRKpx+wEr57YHxLPpxaQeH utFrfJfvh8qn8rwC5KmsvQXZ3UDeDXZA5kCdks82qOVxgMfwppRcg2Efk8Ait2hAbhMQ fRTVZ06ZQoW8gvgZWVTjZeRjPXu6pfVgsod28ZBDGp+hm6E+WsLqWUnXdWcpdSP1Hnqu UoHBq30Th0MXm3SsiJR+hlfngFPOqxQw4Gxcfc8W6q6c5UQ6mIV1Ml9C0Nxz2FmrTzPL xDVbS1qAkFt4t5IjRbNy7m5lCR7Rt6rBH90yeYR92JbYJ/l1SO+kSVmjgbG76m8qSQQX 1VbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=KwSYsYv9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si7013550ejj.376.2019.12.02.01.03.51; Mon, 02 Dec 2019 01:04:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=KwSYsYv9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbfLBJBp (ORCPT + 99 others); Mon, 2 Dec 2019 04:01:45 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:23814 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726087AbfLBJBp (ORCPT ); Mon, 2 Dec 2019 04:01:45 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB28uqsK024786; Mon, 2 Dec 2019 10:01:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=xJSCoF7uUHStyU5OcsO3VSav2wz6CuhovW+cwvZNC0Q=; b=KwSYsYv9scHiQoM03z9oli12C/h35lJz6m+7TB+4I4RPTRZQQT8WywaE91e/QcIZemrh p0LjvzxzRnVXf77+5SLGAsbTuIVmpQPNI8l9zGUnifVAhtmLQhWMf4f14yeR9W+A0Fdu eZdRlEVWSIjMIGLuSWrz65FA0ATqSLEcIkh62Z3aVuUoY2cKiSWYQTIhDW7ECRVDQsQv 3nNuakHw9cDJOSiWIv9T72xtLAwR2zt12jUVmx34E18G3kH3PDOUShf9Ux4YcmPr8vRy y6/Iyk4DYBoLeQG4pvywAXZ8HBoDk61GfmPASDYN/Pis2PyZwsCVzwG7mmMg+01nCN0/ lg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2wkf2xgq8h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Dec 2019 10:01:25 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D9415100038; Mon, 2 Dec 2019 10:01:23 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 7DD2E2ACD4A; Mon, 2 Dec 2019 10:01:23 +0100 (CET) Received: from localhost (10.75.127.46) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 2 Dec 2019 10:01:23 +0100 From: Fabien Dessenne To: Jessica Yu , Alexey Gladkov , Zhenzhong Duan , Gleb Fotengauer-Malinovskiy , Randy Dunlap , CC: Fabien Dessenne Subject: [PATCH v3] moduleparam: fix kerneldoc Date: Mon, 2 Dec 2019 10:01:17 +0100 Message-ID: <1575277277-4435-1-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-02_01:2019-11-29,2019-12-02 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document missing @arg in xxx_param_cb(). Describe all parameters of module_param_[named_]unsafe() and all *_param_cb() to make ./scripts/kernel-doc happy. Signed-off-by: Fabien Dessenne --- Changes since v2: @arg not @args + fix other kernel-doc warnings Changes since v1: do not replace 'lvalue' with 'value' --- include/linux/moduleparam.h | 82 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 5 deletions(-) diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index e5c3e23..3ef917f 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -128,6 +128,9 @@ struct kparam_array /** * module_param_unsafe - same as module_param but taints kernel + * @name: the variable to alter, and exposed parameter name. + * @type: the type of the parameter + * @perm: visibility in sysfs. */ #define module_param_unsafe(name, type, perm) \ module_param_named_unsafe(name, name, type, perm) @@ -150,6 +153,10 @@ struct kparam_array /** * module_param_named_unsafe - same as module_param_named but taints kernel + * @name: a valid C identifier which is the parameter name. + * @value: the actual lvalue to alter. + * @type: the type of the parameter + * @perm: visibility in sysfs. */ #define module_param_named_unsafe(name, value, type, perm) \ param_check_##type(name, &(value)); \ @@ -160,6 +167,7 @@ struct kparam_array * module_param_cb - general callback for a module/cmdline parameter * @name: a valid C identifier which is the parameter name. * @ops: the set & get operations for this parameter. + * @arg: args for @ops * @perm: visibility in sysfs. * * The ops can have NULL set or get functions. @@ -171,36 +179,96 @@ struct kparam_array __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, \ KERNEL_PARAM_FL_UNSAFE) +#define __level_param_cb(name, ops, arg, perm, level) \ + __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, level, 0) /** - * _param_cb - general callback for a module/cmdline parameter - * to be evaluated before certain initcall level + * core_param_cb - general callback for a module/cmdline parameter + * to be evaluated before core initcall level * @name: a valid C identifier which is the parameter name. * @ops: the set & get operations for this parameter. + * @arg: args for @ops * @perm: visibility in sysfs. * * The ops can have NULL set or get functions. */ -#define __level_param_cb(name, ops, arg, perm, level) \ - __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, level, 0) - #define core_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 1) +/** + * postcore_param_cb - general callback for a module/cmdline parameter + * to be evaluated before postcore initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define postcore_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 2) +/** + * arch_param_cb - general callback for a module/cmdline parameter + * to be evaluated before arch initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define arch_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 3) +/** + * subsys_param_cb - general callback for a module/cmdline parameter + * to be evaluated before subsys initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define subsys_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 4) +/** + * fs_param_cb - general callback for a module/cmdline parameter + * to be evaluated before fs initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define fs_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 5) +/** + * device_param_cb - general callback for a module/cmdline parameter + * to be evaluated before device initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define device_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 6) +/** + * late_param_cb - general callback for a module/cmdline parameter + * to be evaluated before late initcall level + * @name: a valid C identifier which is the parameter name. + * @ops: the set & get operations for this parameter. + * @arg: args for @ops + * @perm: visibility in sysfs. + * + * The ops can have NULL set or get functions. + */ #define late_param_cb(name, ops, arg, perm) \ __level_param_cb(name, ops, arg, perm, 7) @@ -263,6 +331,10 @@ static inline void kernel_param_unlock(struct module *mod) /** * core_param_unsafe - same as core_param but taints kernel + * @name: the name of the cmdline and sysfs parameter (often the same as var) + * @var: the variable + * @type: the type of the parameter + * @perm: visibility in sysfs */ #define core_param_unsafe(name, var, type, perm) \ param_check_##type(name, &(var)); \ -- 2.7.4