]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: debugfs: use debugfs_short_fops
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 22 Jan 2025 06:03:06 +0000 (14:03 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 3 Feb 2025 02:27:26 +0000 (10:27 +0800)
With this change, the object code size can reduce 768 bytes.

   text    data     bss     dec     hex filename
  77257    4262       4   81523   13e73 debug.o   (before)
  76489    4262       4   80755   13b73 debug.o   (after)

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250122060310.31976-7-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/debug.c

index 35bf627dbae235e9fa6e543e74336372778f8081..0863ed6acda296a05b2bd4b7a8ec2d28407dcee5 100644 (file)
@@ -217,25 +217,19 @@ static ssize_t rtw89_debugfs_file_write(struct file *file,
        return debugfs_priv->cb_write(rtwdev, debugfs_priv, buf, count);
 }
 
-static const struct file_operations file_ops_single_r = {
-       .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_single_r = {
        .read = rtw89_debugfs_file_read,
-       .open = simple_open,
        .llseek = generic_file_llseek,
 };
 
-static const struct file_operations file_ops_common_rw = {
-       .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_common_rw = {
        .read = rtw89_debugfs_file_read,
        .write = rtw89_debugfs_file_write,
-       .open = simple_open,
        .llseek = generic_file_llseek,
 };
 
-static const struct file_operations file_ops_single_w = {
-       .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_single_w = {
        .write = rtw89_debugfs_file_write,
-       .open = simple_open,
        .llseek = generic_file_llseek,
 };