From nobody Tue Apr 7 12:53:40 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 327933947B4 for ; Fri, 13 Mar 2026 13:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773409791; cv=none; b=t3aNhAmCL0sBwo3qWkWgseRy4t6YlBUBW63C91T/dyOnsUZ0Kkl0dCiQ3ScLtGCpnE3SmrhnX9raniDZFCdeq0JD3cnn9vfDpbsPZQIFAJR3wTftXyFRegfGQLcTyl5F4XFXSjVkN3zXbM3JUBJgq3klbh6i/G1Qd0xbAReMv8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773409791; c=relaxed/simple; bh=qruJx6QJEICr8bcneKcKb3mtFa1KqnHncYpYtjLmF5k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rbATgxOmHJ2vv1lw5DBo5XepyQ4b5DVtaoHvSDrGt7+2sFTKWNs0E0k8LMvwC6K2FjJNKlYEqKJwR/SUd7kutBWwhOXLhYvaNrqKcB5CRt2hhg/3YIjf60r8OgU1tzM7JSsEk6ciNe3SihT95u0+4r+J+Rz6y6w+sfTcgeU3IOQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=TZEnpjWv; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="TZEnpjWv" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-48535a0ef86so18388165e9.1 for ; Fri, 13 Mar 2026 06:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773409787; x=1774014587; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VGEtKP4Tr+bgxoNWP/aiQM4tyqyPY7Jg/v7bcyDwq6Y=; b=TZEnpjWvwF6duicvrRlAYvuTw2tYpLZaeuwBaSwQiuBsqdXAYCUQ9HOvN0xx7jccEN 6uLUOuGONLudTigIEXxX8vOsaHdB6AgqLxYV+FtYoYac0SqYM6PrkUNiDYzpUzVm09hi odR88dJ6kifIf/q4G2cGtk2ojnshlwwxmwAPkozLY8qzsu+8pID1Nyoh+D7cG/AyeqST 1XFKnDwNTwpZMNRVn6xfTPV2vF3zfdjuutETDWbCBktxlAL3B1RX1w9GTaOS9tIUqu6G MSmunzu/FGdJ7eAdhfw7YESrB5H9z58e2RK/bNnUk/zCfivV3LGtF/sfQ6ve4H7TcJiq znpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773409787; x=1774014587; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VGEtKP4Tr+bgxoNWP/aiQM4tyqyPY7Jg/v7bcyDwq6Y=; b=qnzMqZGIm/+iYQzI2JIjdXIt8orVzyZYwoThc7bNnRGnVeIQgBNDySD8RPIke8qKCm sER0dDyhLOqKtGSsYESIq3hPDfzmK1px1NecZh9R5fHp8PTsv9stsFpIodOjfCFAq6SU Snex7YkfogENjxXo8GovZQImbO/+zYFbQX6u89tBqgj5bjqDxRsDsg7HrqHvaQF6hYkt mITajtxZszWH215eTsXs2sj+C7Zxnor2bTIA5+lrWnumqGrAe0zrd59W2m16FAbBhJQf REv4dZgLy7BRN4K2pCZoNsK1SZnnsKpdxSi82K65fTiwZn3eNpfZzbtBD1UAwsj8qrA1 E9Cw== X-Forwarded-Encrypted: i=1; AJvYcCVB4K/XLB4lBjK1e4RwpGx97dRA668f66ZbcWGyYwXFImWuKY3ZhBPdTE04nmvs3dUUYXhQPeSed1fBLlc=@vger.kernel.org X-Gm-Message-State: AOJu0Yzoy3geWN9TnfBYFoPV15nbSBPCpH75Zrz/JDmrJYJSyuBG303E 8bCjvos7UI9rl00jS0IhJsV7+v3bNWMQYY6okj4Zb6bu9qc6lfsiBoMFjWDbCHBoS04= X-Gm-Gg: ATEYQzwQgfyfVBDPR2Dv2a2RU6NX/ka3gNzB1gzWQ2MKbQPqgOWuKD/r8UIVMK9fSxu HihDOCAHL2cohELk589kfvmDe9qwdNunul8IYmVKVeD3W7F26kQeBIhjvrxyTIT6PF6JtHQ8OXP tWY1aCgdIECmRk3C+aD+Ia7LYvVaOtbbEecWjLbsyUaAEY/JQDlg6Mt+EEpRRVtbMmn4r0CYYhp 9rDqThsLPF4giTmOXWMXKH9WLwgOKQPJTn6tAR4jzcWAuoFEr98eYCZrVxS9FllxHIx6B3aE9t0 JmG9RrljEYiS9qSjIapvOIg3W9kniP8fjd7VLKN7TvjJ5zOLJbs1+RIR+f6jFlmERwRnnNhHc6S jDG5rwpIPm/mUqB4BCw49JC+HrOPPs64VWadzXDh1DLLzH0eqvhvp/LySjcopyCBTlQyJ4z+wQN I83Vvo32gGTN43IahAhpscBCho+e7Wlt2ptGHz6wHh X-Received: by 2002:a05:600c:8b6f:b0:477:5c58:3d42 with SMTP id 5b1f17b1804b1-485566d92f3mr54669825e9.10.1773409787280; Fri, 13 Mar 2026 06:49:47 -0700 (PDT) Received: from zovi.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854b66e3f8sm206491865e9.14.2026.03.13.06.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 06:49:47 -0700 (PDT) From: Petr Pavlu To: Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen Cc: Christophe Leroy , Aaron Tomlin , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] module: Remove extern keyword from param prototypes Date: Fri, 13 Mar 2026 14:48:04 +0100 Message-ID: <20260313134932.335275-4-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260313134932.335275-1-petr.pavlu@suse.com> References: <20260313134932.335275-1-petr.pavlu@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The external function declarations do not need the "extern" keyword. Remove it to align with the Linux kernel coding style and to silence the associated checkpatch warnings. Signed-off-by: Petr Pavlu --- include/linux/moduleparam.h | 89 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 604bc6e9f3a1..075f28585074 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -317,8 +317,8 @@ struct kparam_array name, &__param_ops_##name, arg, perm, -1, 0) =20 #ifdef CONFIG_SYSFS -extern void kernel_param_lock(struct module *mod); -extern void kernel_param_unlock(struct module *mod); +void kernel_param_lock(struct module *mod); +void kernel_param_unlock(struct module *mod); #else static inline void kernel_param_lock(struct module *mod) { @@ -398,7 +398,7 @@ static inline void kernel_param_unlock(struct module *m= od) * Returns: true if the two parameter names are equal. * Dashes (-) are considered equal to underscores (_). */ -extern bool parameq(const char *name1, const char *name2); +bool parameq(const char *name1, const char *name2); =20 /** * parameqn - checks if two parameter names match @@ -412,18 +412,18 @@ extern bool parameq(const char *name1, const char *na= me2); * are equal. * Dashes (-) are considered equal to underscores (_). */ -extern bool parameqn(const char *name1, const char *name2, size_t n); +bool parameqn(const char *name1, const char *name2, size_t n); =20 typedef int (*parse_unknown_fn)(char *param, char *val, const char *doing,= void *arg); =20 /* Called on module insert or kernel boot */ -extern char *parse_args(const char *doing, - char *args, - const struct kernel_param *params, - unsigned int num, - s16 min_level, - s16 max_level, - void *arg, parse_unknown_fn unknown); +char *parse_args(const char *doing, + char *args, + const struct kernel_param *params, + unsigned int num, + s16 min_level, + s16 max_level, + void *arg, parse_unknown_fn unknown); =20 /* Called by module remove. */ #ifdef CONFIG_MODULES @@ -437,78 +437,77 @@ void module_destroy_params(const struct kernel_param = *params, unsigned int num); static inline type __always_unused *__check_##name(void) { return(p); } =20 extern const struct kernel_param_ops param_ops_byte; -extern int param_set_byte(const char *val, const struct kernel_param *kp); -extern int param_get_byte(char *buffer, const struct kernel_param *kp); +int param_set_byte(const char *val, const struct kernel_param *kp); +int param_get_byte(char *buffer, const struct kernel_param *kp); #define param_check_byte(name, p) __param_check(name, p, unsigned char) =20 extern const struct kernel_param_ops param_ops_short; -extern int param_set_short(const char *val, const struct kernel_param *kp); -extern int param_get_short(char *buffer, const struct kernel_param *kp); +int param_set_short(const char *val, const struct kernel_param *kp); +int param_get_short(char *buffer, const struct kernel_param *kp); #define param_check_short(name, p) __param_check(name, p, short) =20 extern const struct kernel_param_ops param_ops_ushort; -extern int param_set_ushort(const char *val, const struct kernel_param *kp= ); -extern int param_get_ushort(char *buffer, const struct kernel_param *kp); +int param_set_ushort(const char *val, const struct kernel_param *kp); +int param_get_ushort(char *buffer, const struct kernel_param *kp); #define param_check_ushort(name, p) __param_check(name, p, unsigned short) =20 extern const struct kernel_param_ops param_ops_int; -extern int param_set_int(const char *val, const struct kernel_param *kp); -extern int param_get_int(char *buffer, const struct kernel_param *kp); +int param_set_int(const char *val, const struct kernel_param *kp); +int param_get_int(char *buffer, const struct kernel_param *kp); #define param_check_int(name, p) __param_check(name, p, int) =20 extern const struct kernel_param_ops param_ops_uint; -extern int param_set_uint(const char *val, const struct kernel_param *kp); -extern int param_get_uint(char *buffer, const struct kernel_param *kp); +int param_set_uint(const char *val, const struct kernel_param *kp); +int param_get_uint(char *buffer, const struct kernel_param *kp); int param_set_uint_minmax(const char *val, const struct kernel_param *kp, unsigned int min, unsigned int max); #define param_check_uint(name, p) __param_check(name, p, unsigned int) =20 extern const struct kernel_param_ops param_ops_long; -extern int param_set_long(const char *val, const struct kernel_param *kp); -extern int param_get_long(char *buffer, const struct kernel_param *kp); +int param_set_long(const char *val, const struct kernel_param *kp); +int param_get_long(char *buffer, const struct kernel_param *kp); #define param_check_long(name, p) __param_check(name, p, long) =20 extern const struct kernel_param_ops param_ops_ulong; -extern int param_set_ulong(const char *val, const struct kernel_param *kp); -extern int param_get_ulong(char *buffer, const struct kernel_param *kp); +int param_set_ulong(const char *val, const struct kernel_param *kp); +int param_get_ulong(char *buffer, const struct kernel_param *kp); #define param_check_ulong(name, p) __param_check(name, p, unsigned long) =20 extern const struct kernel_param_ops param_ops_ullong; -extern int param_set_ullong(const char *val, const struct kernel_param *kp= ); -extern int param_get_ullong(char *buffer, const struct kernel_param *kp); +int param_set_ullong(const char *val, const struct kernel_param *kp); +int param_get_ullong(char *buffer, const struct kernel_param *kp); #define param_check_ullong(name, p) __param_check(name, p, unsigned long l= ong) =20 extern const struct kernel_param_ops param_ops_hexint; -extern int param_set_hexint(const char *val, const struct kernel_param *kp= ); -extern int param_get_hexint(char *buffer, const struct kernel_param *kp); +int param_set_hexint(const char *val, const struct kernel_param *kp); +int param_get_hexint(char *buffer, const struct kernel_param *kp); #define param_check_hexint(name, p) param_check_uint(name, p) =20 extern const struct kernel_param_ops param_ops_charp; -extern int param_set_charp(const char *val, const struct kernel_param *kp); -extern int param_get_charp(char *buffer, const struct kernel_param *kp); -extern void param_free_charp(void *arg); +int param_set_charp(const char *val, const struct kernel_param *kp); +int param_get_charp(char *buffer, const struct kernel_param *kp); +void param_free_charp(void *arg); #define param_check_charp(name, p) __param_check(name, p, char *) =20 /* We used to allow int as well as bool. We're taking that away! */ extern const struct kernel_param_ops param_ops_bool; -extern int param_set_bool(const char *val, const struct kernel_param *kp); -extern int param_get_bool(char *buffer, const struct kernel_param *kp); +int param_set_bool(const char *val, const struct kernel_param *kp); +int param_get_bool(char *buffer, const struct kernel_param *kp); #define param_check_bool(name, p) __param_check(name, p, bool) =20 extern const struct kernel_param_ops param_ops_bool_enable_only; -extern int param_set_bool_enable_only(const char *val, - const struct kernel_param *kp); +int param_set_bool_enable_only(const char *val, const struct kernel_param = *kp); /* getter is the same as for the regular bool */ #define param_check_bool_enable_only param_check_bool =20 extern const struct kernel_param_ops param_ops_invbool; -extern int param_set_invbool(const char *val, const struct kernel_param *k= p); -extern int param_get_invbool(char *buffer, const struct kernel_param *kp); +int param_set_invbool(const char *val, const struct kernel_param *kp); +int param_get_invbool(char *buffer, const struct kernel_param *kp); #define param_check_invbool(name, p) __param_check(name, p, bool) =20 /* An int, which can only be set like a bool (though it shows as an int). = */ extern const struct kernel_param_ops param_ops_bint; -extern int param_set_bint(const char *val, const struct kernel_param *kp); +int param_set_bint(const char *val, const struct kernel_param *kp); #define param_get_bint param_get_int #define param_check_bint param_check_int =20 @@ -615,19 +614,19 @@ enum hwparam_type { extern const struct kernel_param_ops param_array_ops; =20 extern const struct kernel_param_ops param_ops_string; -extern int param_set_copystring(const char *val, const struct kernel_param= *); -extern int param_get_string(char *buffer, const struct kernel_param *kp); +int param_set_copystring(const char *val, const struct kernel_param *kp); +int param_get_string(char *buffer, const struct kernel_param *kp); =20 /* for exporting parameters in /sys/module/.../parameters */ =20 struct module; =20 #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) -extern int module_param_sysfs_setup(struct module *mod, - const struct kernel_param *kparam, - unsigned int num_params); +int module_param_sysfs_setup(struct module *mod, + const struct kernel_param *kparam, + unsigned int num_params); =20 -extern void module_param_sysfs_remove(struct module *mod); +void module_param_sysfs_remove(struct module *mod); #else static inline int module_param_sysfs_setup(struct module *mod, const struct kernel_param *kparam, --=20 2.53.0