paride: Mark PARIDE as deprecated, point to PATA_PARPORT

Message ID 20230122181415.21031-1-linux@zary.sk
State New
Headers
Series paride: Mark PARIDE as deprecated, point to PATA_PARPORT |

Commit Message

Ondrej Zary Jan. 22, 2023, 6:14 p.m. UTC
  Add Kconfig and runtime deprecation warnings to PARIDE, pointing users
to PATA_PARPORT.

Signed-off-by: Ondrej Zary <linux@zary.sk>
---
 drivers/block/Kconfig         | 4 +++-
 drivers/block/paride/paride.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
  

Comments

Sergey Shtylyov Jan. 22, 2023, 7:11 p.m. UTC | #1
Hello!

On 1/22/23 9:14 PM, Ondrej Zary wrote:

> Add Kconfig and runtime deprecation warnings to PARIDE, pointing users
> to PATA_PARPORT.
> 
> Signed-off-by: Ondrej Zary <linux@zary.sk>
[...]
> diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c
> index 0e287993b778..010daf605728 100644
> --- a/drivers/block/paride/paride.c
> +++ b/drivers/block/paride/paride.c
> @@ -452,6 +452,8 @@ void *pi_register_driver(char *name)
>  	struct parport_driver *parp_drv;
>  	int ret;
>  
> +	printk(KERN_WARNING "PARIDE is deprecated. Use PATA_PARPORT instead.\n");

   Why not pr_warn()?

[...]

MBR, Sergey
  
Hannes Reinecke Jan. 23, 2023, 7:38 a.m. UTC | #2
On 1/22/23 19:14, Ondrej Zary wrote:
> Add Kconfig and runtime deprecation warnings to PARIDE, pointing users
> to PATA_PARPORT.
> 
> Signed-off-by: Ondrej Zary <linux@zary.sk>
> ---
>   drivers/block/Kconfig         | 4 +++-
>   drivers/block/paride/paride.c | 2 ++
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
  

Patch

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index a2184b428493..3a2065c6a4d7 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -104,7 +104,7 @@  config GDROM
 	  You can also build this as a module which will be called gdrom.
 
 config PARIDE
-	tristate "Parallel port IDE device support"
+	tristate "Parallel port IDE device support (DEPRECATED)"
 	depends on PARPORT_PC
 	help
 	  There are many external CD-ROM and disk devices that connect through
@@ -130,6 +130,8 @@  config PARIDE
 	  "MicroSolutions backpack protocol", "DataStor Commuter protocol"
 	  etc.).
 
+	  This driver is deprecated, replaced by libata-based PATA_PARPORT.
+
 source "drivers/block/paride/Kconfig"
 
 source "drivers/block/mtip32xx/Kconfig"
diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c
index 0e287993b778..010daf605728 100644
--- a/drivers/block/paride/paride.c
+++ b/drivers/block/paride/paride.c
@@ -452,6 +452,8 @@  void *pi_register_driver(char *name)
 	struct parport_driver *parp_drv;
 	int ret;
 
+	printk(KERN_WARNING "PARIDE is deprecated. Use PATA_PARPORT instead.\n");
+
 	parp_drv = kzalloc(sizeof(*parp_drv), GFP_KERNEL);
 	if (!parp_drv)
 		return NULL;