Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
@ 2025-09-09  4:16 Gopi
  2025-09-09  6:12 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Gopi @ 2025-09-09  4:16 UTC (permalink / raw)
  Cc: ggopijeganathan, Dave Penkler, Greg Kroah-Hartman, Michael Rubin,
	Arnd Bergmann, Dan Carpenter, linux-staging, linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
  2025-09-09  4:16 [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882 Gopi
@ 2025-09-09  6:12 ` Greg Kroah-Hartman
       [not found]   ` <CAGt2Sa+MriEYjPOFGmKWuHXabwkJeWn7q9o8U14B7o3QY4xmyg@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-09  6:12 UTC (permalink / raw)
  To: Gopi
  Cc: Dave Penkler, Michael Rubin, Arnd Bergmann, Dan Carpenter,
	linux-staging, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
       [not found]       ` <CAGt2Sa+tKAmxspYX=iyihmZYxWg0=xOJPW+J0h=9rTG8E99AAg@mail.gmail.com>
@ 2025-09-09 14:40         ` Greg Kroah-Hartman
  2025-09-09 14:48           ` Dave Penkler
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-09 14:40 UTC (permalink / raw)
  To: GOPI JEGANATHAN
  Cc: Dave Penkler, Michael Rubin, Arnd Bergmann, Dan Carpenter,
	linux-staging, linux-kernel

On Tue, Sep 09, 2025 at 07:56:07PM +0530, GOPI JEGANATHAN wrote:
> Hi Greg
> 
> I just saw the warning message in Checkpatch.pl file. It's says #if 0 is
> something wrong so I just change the processor directives properly using
> #ifdef CONFIG_TNT4882, Is that change is wrong!?

#if 0 is a way to comment out code, you just enabled that code to now be
present.  That's probably not the correct thing for this driver, right?
The whole thing is already using CONFIG_TNT4882, so declaring it again
would be the same as just removing the #if 0 line.

In short, only change this type of thing either by removing the code
entirely, or figuring out why it's still present and then fixing it up
to actually be used and remove the #if 0 lines.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882
  2025-09-09 14:40         ` Greg Kroah-Hartman
@ 2025-09-09 14:48           ` Dave Penkler
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Penkler @ 2025-09-09 14:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: GOPI JEGANATHAN, Michael Rubin, Arnd Bergmann, Dan Carpenter,
	linux-staging, linux-kernel

On Tue, Sep 09, 2025 at 04:40:08PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Sep 09, 2025 at 07:56:07PM +0530, GOPI JEGANATHAN wrote:
> > Hi Greg
> > 
> > I just saw the warning message in Checkpatch.pl file. It's says #if 0 is
> > something wrong so I just change the processor directives properly using
> > #ifdef CONFIG_TNT4882, Is that change is wrong!?
> 
> #if 0 is a way to comment out code, you just enabled that code to now be
> present.  That's probably not the correct thing for this driver, right?
> The whole thing is already using CONFIG_TNT4882, so declaring it again
> would be the same as just removing the #if 0 line.
> 
> In short, only change this type of thing either by removing the code
> entirely, or figuring out why it's still present and then fixing it up
> to actually be used and remove the #if 0 lines.
> 
> thanks,
> 
> greg k-h

The code in the #if 0 scope in question can be removed entirely.
There is no call to make the driver it into a pnp driver.
cheers,
-dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-09 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09  4:16 [PATCH] staging: gpib: Declare processor directive as CONFIG_TNT4882 Gopi
2025-09-09  6:12 ` Greg Kroah-Hartman
     [not found]   ` <CAGt2Sa+MriEYjPOFGmKWuHXabwkJeWn7q9o8U14B7o3QY4xmyg@mail.gmail.com>
     [not found]     ` <2025090945-ecologist-gravel-d028@gregkh>
     [not found]       ` <CAGt2Sa+tKAmxspYX=iyihmZYxWg0=xOJPW+J0h=9rTG8E99AAg@mail.gmail.com>
2025-09-09 14:40         ` Greg Kroah-Hartman
2025-09-09 14:48           ` Dave Penkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox