[PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882

Gopi posted 1 patch 3 weeks, 2 days ago
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
Posted by Gopi 3 weeks, 2 days ago
Warning massage found by checkpatch.pl script.

Signed-off-by: Gopi <ggopijeganathan@gmail.com>
---
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index a17b69e34986..918a4cebbc6c 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -1369,7 +1369,7 @@ static struct pci_driver tnt4882_pci_driver = {
 	.probe = &tnt4882_pci_probe
 };
 
-#if 0
+#ifdef CONFIG_TNT4882
 /* unused, will be needed when the driver is turned into a pnp_driver */
 static const struct pnp_device_id tnt4882_pnp_table[] = {
 	{.id = "NICC601"},
-- 
2.25.1
Re: [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
Posted by Greg Kroah-Hartman 3 weeks, 2 days ago
On Tue, Sep 09, 2025 at 09:46:54AM +0530, Gopi wrote:
> Warning massage found by checkpatch.pl script.
> 
> Signed-off-by: Gopi <ggopijeganathan@gmail.com>
> ---
>  drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> index a17b69e34986..918a4cebbc6c 100644
> --- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> +++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> @@ -1369,7 +1369,7 @@ static struct pci_driver tnt4882_pci_driver = {
>  	.probe = &tnt4882_pci_probe
>  };
>  
> -#if 0
> +#ifdef CONFIG_TNT4882

I do not understand, sorry, why is this the correct value to put here?

>  /* unused, will be needed when the driver is turned into a pnp_driver */
>  static const struct pnp_device_id tnt4882_pnp_table[] = {
>  	{.id = "NICC601"},

Now the code will not be unused, as you just enabled it?  Are you sure
the checkpatch warning was correct?

thanks,

greg k-h