From nobody Tue Dec 2 02:29:50 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8970B33C529 for ; Wed, 19 Nov 2025 09:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763543999; cv=none; b=iVto3HiUwzWH+g+lV5yXUcPVLrV0I5gXS74LpR4sYTf1Y9ossyRLEoe50BhiLw87gltW3E/ryxdLb2mrzFd8I62zCGPFV9rngbb6yu03l4wAWaidbS3/G3wxw6reUbsC+JYgXOzdZphA8HmTu8h0SRitOKJuiwDOR2f/zpQK2JY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763543999; c=relaxed/simple; bh=4Xmf8Cb7RjdD1kwGJIipCL2/6UgIAC6pEb6CYdI7LB8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QLeu/WkpmNsuNN+xrV5ioxFzuboRo7ZL1mxopTgzeUSFlLr0AqAquZCGIRTybuD+ifwfxTzFTlWQqHHCtECBJ1CblMY/2FMgFnYBKdC1SM2epUZWSBPe5h110RZnpESbZXUTDyUGPTkuuzcVjfqp33slbA9F5cRytopf4CTAx40= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TZ2GLMyD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TZ2GLMyD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B6ABC4AF0C; Wed, 19 Nov 2025 09:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763543998; bh=4Xmf8Cb7RjdD1kwGJIipCL2/6UgIAC6pEb6CYdI7LB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZ2GLMyDvcrM0QpJ03DhOsncuiJob1ZHVxd5HHDze0Be2wM/QKIoTjsEIRsrUA7yQ ep2eoDLbZqrD6S2QNinm6bkCXiTlZ87pDPdQXNRNy3AxJlketyNRxen4e5J9TWL+7W pfKKKSWPhDlSYPVeljIvsR9i6xmRVVuW1lZYevmdEG91XWovOvEKe1TaPbbLaIHyed muHQJo7qakOHUKD70wpd8JW0Rde18FKjkV2o2UZ9vIq7rAXYquPURi2wyWYuvsVa5X Z2bRDgRJZRUHE4KCpEKKCHbIO0zBceoN+mc62ct2ZXnyH5vCtgntHWNoD9NOOQ7NRu i2m0b9OhOiOOA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 3/6] char/mwave: remove unneeded fops Date: Wed, 19 Nov 2025 10:19:46 +0100 Message-ID: <20251119091949.825958-4-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119091949.825958-1-jirislaby@kernel.org> References: <20251119091949.825958-1-jirislaby@kernel.org> 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" file_operations::{read/write/open/release} need not be defined. The core code return proper values already (the same as the being removed ones). So there is no need to preserve these just for tracing via printk. Signed-off-by: Jiri Slaby (SUSE) --- drivers/char/mwave/mwavedd.c | 62 ------------------------------------ 1 file changed, 62 deletions(-) diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index 86e33c28beac..b6d7a8b04183 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c @@ -86,40 +86,8 @@ module_param_hw(mwave_3780i_io, int, ioport, 0); module_param_hw(mwave_uart_irq, int, irq, 0); module_param_hw(mwave_uart_io, int, ioport, 0); =20 -static int mwave_open(struct inode *inode, struct file *file); -static int mwave_close(struct inode *inode, struct file *file); -static long mwave_ioctl(struct file *filp, unsigned int iocmd, - unsigned long ioarg); - MWAVE_DEVICE_DATA mwave_s_mdd; =20 -static int mwave_open(struct inode *inode, struct file *file) -{ - unsigned int retval =3D 0; - - PRINTK_3(TRACE_MWAVE, - "mwavedd::mwave_open, entry inode %p file %p\n", - inode, file); - PRINTK_2(TRACE_MWAVE, - "mwavedd::mwave_open, exit return retval %x\n", retval); - - return retval; -} - -static int mwave_close(struct inode *inode, struct file *file) -{ - unsigned int retval =3D 0; - - PRINTK_3(TRACE_MWAVE, - "mwavedd::mwave_close, entry inode %p file %p\n", - inode, file); - - PRINTK_2(TRACE_MWAVE, "mwavedd::mwave_close, exit retval %x\n", - retval); - - return retval; -} - static long mwave_ioctl(struct file *file, unsigned int iocmd, unsigned long ioarg) { @@ -410,30 +378,6 @@ static long mwave_ioctl(struct file *file, unsigned in= t iocmd, return retval; } =20 - -static ssize_t mwave_read(struct file *file, char __user *buf, size_t coun= t, - loff_t * ppos) -{ - PRINTK_5(TRACE_MWAVE, - "mwavedd::mwave_read entry file %p, buf %p, count %zx ppos %p\n", - file, buf, count, ppos); - - return -EINVAL; -} - - -static ssize_t mwave_write(struct file *file, const char __user *buf, - size_t count, loff_t * ppos) -{ - PRINTK_5(TRACE_MWAVE, - "mwavedd::mwave_write entry file %p, buf %p," - " count %zx ppos %p\n", - file, buf, count, ppos); - - return -EINVAL; -} - - static int register_serial_portandirq(unsigned int port, int irq) { struct uart_8250_port uart; @@ -478,18 +422,12 @@ static int register_serial_portandirq(unsigned int po= rt, int irq) return serial8250_register_8250_port(&uart); } =20 - static const struct file_operations mwave_fops =3D { .owner =3D THIS_MODULE, - .read =3D mwave_read, - .write =3D mwave_write, .unlocked_ioctl =3D mwave_ioctl, - .open =3D mwave_open, - .release =3D mwave_close, .llseek =3D default_llseek, }; =20 - static struct miscdevice mwave_misc_dev =3D { MWAVE_MINOR, "mwave", &mwave= _fops }; =20 /* --=20 2.51.1