Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp833813ybl; Wed, 4 Dec 2019 11:38:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzM+LKwF51U/YUAyJvdtL+3ECNRGi6K9m2P9xA0odbn8Y+7NC3KMQWbz+qTUVV0hEvauRt/ X-Received: by 2002:a05:6808:984:: with SMTP id a4mr4187052oic.38.1575488329202; Wed, 04 Dec 2019 11:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575488329; cv=none; d=google.com; s=arc-20160816; b=gY1E+MXTWeTn8PtU9IKox1k74FDNJ3rnGczZdFvg87WpCHMMQ4p8hnMFwUGzoFpSR4 WK7lWel7VoNM1l+uAJw1UWCCmc3i55wAcG9fuCX7IDeo4mnNJtbM57EjVrodJvjflzTY 0xAxP9J4BVQwsTH3JaDD8qqBadglvS/Pyb+Wdwy6c9PGaG9rUwxXbGnbTHt/ej0UG865 sp8kVwa2o5LfMgnqolS1o+9c6cjQeGT/BIWBF4RhCS89hbgfCt/WVF8GB8vKshXI/rcz exKBbFYK30k0fqloahe6+BUoVTiBuJvMQJJ8VqeItNRW0gzd4SnACc/p7jFfldJB+hSQ dVtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uJECoojTrWIjKCOdM01NTmH0hCvjlHaXRyvaDEnpZaY=; b=tYeF/Sqo0ghQ5xCaV16eGu2i90dZhwmn1DbZLTfa6ob/olyCD10Nwpx0JRBDAzd0It c3BBwTkU5GAZ0v0UZa3VVPkrYkOdk/RLtB9+JVTy09M4WGrNIkDEEtCP0s92VMsiowhI Babf9kJuOashoum7HLaQCHyPDJP4JkQ7vMAFWrAJtqP2FJFj0KgXR+6Z2cvmWPeIx/tP 8FeyLa4Y9hJSwm9QKgoDOFC8pyqfFrqzoNfFKzadNzQ3vCF+j1/pZ/28PV3R9ytFszmo B1yN/iemh4d4biCr6WeOTKZjXOYsIrv2qkDi9Vef/p7G1m2jR9kgcrsaotdnkX/KyuGc j97A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p7oWeY3d; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si3853225otl.54.2019.12.04.11.38.36; Wed, 04 Dec 2019 11:38:49 -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=@kernel.org header.s=default header.b=p7oWeY3d; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728142AbfLDTb6 (ORCPT + 99 others); Wed, 4 Dec 2019 14:31:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:48460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727978AbfLDTb5 (ORCPT ); Wed, 4 Dec 2019 14:31:57 -0500 Received: from linux-8ccs (x2f7fec9.dyn.telefonica.de [2.247.254.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EFC820409; Wed, 4 Dec 2019 19:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575487916; bh=ctu9RwlHjv4upjNSW0WkBkI6dkqaoeEKbM7GREKBB/c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p7oWeY3dWzFF3f9LBOiJLOFd88G0sqZWw1uGsQCqWsl70Wryb8Te7/IVmWEMwtdVc WNKzIgbWUTzoLCxS5DzpH7OE4+CYBy+qDle+kCCuA9bKjBiofRyUUxkoomsxK+g0SU 9j1AwqWUydZd7I+W+lkzDVm+FUWB2MGyDbgScuBA= Date: Wed, 4 Dec 2019 20:31:51 +0100 From: Jessica Yu To: Fabien Dessenne Cc: Alexey Gladkov , Zhenzhong Duan , Gleb Fotengauer-Malinovskiy , Randy Dunlap , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] moduleparam: fix kerneldoc Message-ID: <20191204193150.GA22824@linux-8ccs> References: <1575277277-4435-1-git-send-email-fabien.dessenne@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1575277277-4435-1-git-send-email-fabien.dessenne@st.com> X-OS: Linux linux-8ccs 4.12.14-lp150.12.61-default x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Fabien Dessenne [02/12/19 10:01 +0100]: >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 Looks good, I'll apply this to modules-next after the merge window ends. Thanks! Jessica >--- >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 >