lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ubrqzvmzwltmdg2wogy4ag7yjzhfvg3f5cygfbcznrt6a5zpw4@cmuhdjcwzezn>
Date: Mon, 17 Nov 2025 23:43:02 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: 2724853925@...com
Cc: Henrik Rydberg <rydberg@...math.org>, linux-input@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH] input: touchscreen: Add ilitek touchscreen driver support

Hi,

On Sun, Nov 16, 2025 at 09:49:24PM +0800, 2724853925@...com wrote:
> +/* i2c clock rate for rk3288 */
> +#if ILITEK_PLAT == ILITEK_PLAT_ROCKCHIP && \
> +	KERNEL_VERSION(4, 0, 0) > LINUX_VERSION_CODE
> +#define SCL_RATE(rate)	.scl_rate = (rate),
> +#else
> +#define SCL_RATE(rate)
> +#endif
> +
> +/* netlink */
> +#if KERNEL_VERSION(3, 6, 0) <= LINUX_VERSION_CODE
> +#define NETLINK_KERNEL_CFG_DECLARE(cfg, func)	\
> +	struct netlink_kernel_cfg cfg = {	\
> +		.groups = 0,			\
> +		.input = func,			\
> +	}
> +#if KERNEL_VERSION(3, 7, 0) <= LINUX_VERSION_CODE
> +#define NETLINK_KERNEL_CREATE(unit, cfg_ptr, func)	\
> +	netlink_kernel_create(&init_net, (unit), (cfg_ptr))
> +#else
> +#define NETLINK_KERNEL_CREATE(unit, cfg_ptr, func)	\
> +	netlink_kernel_create(&init_net, (unit), THIS_MODULE, (cfg_ptr))
> +#endif
> +#else
> +#define NETLINK_KERNEL_CFG_DECLARE(cfg, func)
> +#define NETLINK_KERNEL_CREATE(unit, cfg_ptr, func)	\
> +	netlink_kernel_create(&init_net, (unit), 0, (func), NULL, THIS_MODULE)
> +#endif
> +
> +/* input_dev */
> +#if KERNEL_VERSION(3, 7, 0) <= LINUX_VERSION_CODE
> +#define INPUT_MT_INIT_SLOTS(dev, num)	\
> +		input_mt_init_slots((dev), (num), INPUT_MT_DIRECT)
> +#else
> +#define INPUT_MT_INIT_SLOTS(dev, num)	input_mt_init_slots((dev), (num))
> +#endif
> +
> +/* file_operations ioctl */
> +#if KERNEL_VERSION(2, 6, 36) <= LINUX_VERSION_CODE
> +#define FOPS_IOCTL	unlocked_ioctl
> +#define FOPS_IOCTL_FUNC(func, cmd, arg) \
> +		long func(struct file *fp, cmd, arg)
> +#else
> +#define FOPS_IOCTL	ioctl
> +#define FOPS_IOCTL_FUNC(func, cmd, arg) \
> +		s32 func(struct inode *np, struct file *fp,	cmd, arg)
> +
> +#endif
> +
> +#if KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE
> +#define I2C_PROBE_FUNC(func, client_arg)	\
> +	int func(client_arg, const struct i2c_device_id *id)
> +#else
> +#define I2C_PROBE_FUNC(func, client_arg)	int func(client_arg)
> +#endif
> +
> +#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
> +#define REMOVE_FUNC(func, client_arg)	int func(client_arg)
> +#define REMOVE_RETURN(val)		({ __typeof__(val) _val = (val); return _val; })
> +#else
> +#define REMOVE_FUNC(func, client_arg)	void func(client_arg)
> +#define REMOVE_RETURN(val)		(val)
> +#endif
> +
> +#if KERNEL_VERSION(6, 4, 0) > LINUX_VERSION_CODE
> +#define CLASS_CREATE(name)	class_create(THIS_MODULE, (name))
> +#else
> +#define CLASS_CREATE(name)	class_create((name))
> +#endif
> +
> +/* procfs */
> +#if KERNEL_VERSION(5, 6, 0) > LINUX_VERSION_CODE
> +#define PROC_FOPS_T	file_operations
> +#define PROC_READ	read
> +#define PROC_WRITE	write
> +#define PROC_IOCTL		FOPS_IOCTL
> +#define PROC_COMPAT_IOCTL	compat_ioctl
> +#define PROC_OPEN	open
> +#define PROC_RELEASE	release
> +#else
> +#define PROC_FOPS_T	proc_ops
> +#define PROC_READ	proc_read
> +#define PROC_WRITE	proc_write
> +#define PROC_IOCTL		proc_ioctl
> +#define PROC_COMPAT_IOCTL	proc_compat_ioctl
> +#define PROC_OPEN	proc_open
> +#define PROC_RELEASE	proc_release
> +#endif

Please prepare the driver properly for the upstream submission. This
means removing compatibility code for older kernel version, adopting to
the new/latest APIs, etc.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ