linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: gpib/pc2: convert explanatory comments to /* ... */ style
@ 2025-10-14 20:07 Fokaz Chakma
  2025-10-22 10:25 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Fokaz Chakma @ 2025-10-14 20:07 UTC (permalink / raw)
  To: dpenkler; +Cc: gregkh, linux-staging, linux-kernel, Fokaz Chakma

Converted single-line // comments that explain data or logic
to kernel-style /* ... */ comments, per
Documentation/process/coding-style.rst.

// XXX notes are left unchanged.

Signed-off-by: Fokaz Chakma <fokazmchakma4427@gmail.com>
---
 drivers/staging/gpib/pc2/pc2_gpib.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/gpib/pc2/pc2_gpib.c b/drivers/staging/gpib/pc2/pc2_gpib.c
index 9f3943d1d..c9c2b3ed8 100644
--- a/drivers/staging/gpib/pc2/pc2_gpib.c
+++ b/drivers/staging/gpib/pc2/pc2_gpib.c
@@ -19,30 +19,30 @@
 #include "nec7210.h"
 #include "gpibP.h"
 
-// struct which defines private_data for pc2 driver
+/* struct which defines private_data for pc2 driver */
 struct pc2_priv {
 	struct nec7210_priv nec7210_priv;
 	unsigned int irq;
-	// io address that clears interrupt for pc2a (0x2f0 + irq)
+	/* io address that clears interrupt for pc2a (0x2f0 + irq) */
 	unsigned int clear_intr_addr;
 };
 
-// pc2 uses 8 consecutive io addresses
+/* pc2 uses 8 consecutive io addresses */
 static const int pc2_iosize = 8;
 static const int pc2a_iosize = 8;
 static const int pc2_2a_iosize = 16;
 
-// offset between io addresses of successive nec7210 registers
+/* offset between io addresses of successive nec7210 registers */
 static const int pc2a_reg_offset = 0x400;
 static const int pc2_reg_offset = 1;
 
-// interrupt service routine
+/* interrupt service routine */
 static irqreturn_t pc2_interrupt(int irq, void *arg);
 static irqreturn_t pc2a_interrupt(int irq, void *arg);
 
-// pc2 specific registers and bits
+/* pc2 specific registers and bits */
 
-// interrupt clear register address
+/* interrupt clear register address */
 static const int pc2a_clear_intr_iobase = 0x2f0;
 static inline unsigned int CLEAR_INTR_REG(unsigned int irq)
 {
@@ -78,7 +78,7 @@ irqreturn_t pc2a_interrupt(int irq, void *arg)
 	irqreturn_t retval;
 
 	spin_lock_irqsave(&board->spinlock, flags);
-	// read interrupt status (also clears status)
+	/* read interrupt status (also clears status) */
 	status1 = read_byte(&priv->nec7210_priv, ISR1);
 	status2 = read_byte(&priv->nec7210_priv, ISR2);
 	/* clear interrupt circuit */
@@ -89,7 +89,7 @@ irqreturn_t pc2a_interrupt(int irq, void *arg)
 	return retval;
 }
 
-// wrappers for interface functions
+/* wrappers for interface functions */
 static int pc2_read(struct gpib_board *board, u8 *buffer, size_t length, int *end,
 		    size_t *bytes_read)
 {
@@ -273,7 +273,7 @@ static int pc2_generic_attach(struct gpib_board *board, const struct gpib_board_
 	 * is adapted to use isa_register_driver.
 	 */
 	if (config->ibdma)
-	// driver needs to be adapted to use isa_register_driver to get a struct device*
+	/* driver needs to be adapted to use isa_register_driver to get a struct device */
 		dev_err(board->gpib_dev, "DMA disabled for pc2 gpib");
 #else
 	if (config->ibdma) {
@@ -284,7 +284,7 @@ static int pc2_generic_attach(struct gpib_board *board, const struct gpib_board_
 		if (!nec_priv->dma_buffer)
 			return -ENOMEM;
 
-		// request isa dma channel
+		/* request isa dma channel */
 		if (request_dma(config->ibdma, "pc2")) {
 			dev_err(board->gpib_dev, "can't request DMA %d\n", config->ibdma);
 			return -1;
@@ -319,7 +319,7 @@ static int pc2_attach(struct gpib_board *board, const struct gpib_board_config *
 
 	nec7210_board_reset(nec_priv, board);
 
-	// install interrupt handler
+	/* install interrupt handler */
 	if (config->ibirq) {
 		if (request_irq(config->ibirq, pc2_interrupt, isr_flags, "pc2", board))	{
 			dev_err(board->gpib_dev, "can't request IRQ %d\n", config->ibirq);
@@ -447,7 +447,7 @@ static int pc2a_common_attach(struct gpib_board *board, const struct gpib_board_
 		return -1;
 	}
 
-	// make sure interrupt is clear
+	/* make sure interrupt is clear */
 	if (pc2_priv->irq)
 		outb(0xff, CLEAR_INTR_REG(pc2_priv->irq));
 
-- 
2.51.0


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

* Re: [PATCH] staging: gpib/pc2: convert explanatory comments to /* ... */ style
  2025-10-14 20:07 [PATCH] staging: gpib/pc2: convert explanatory comments to /* ... */ style Fokaz Chakma
@ 2025-10-22 10:25 ` Greg KH
       [not found]   ` <CAMa_khZMv-8jmUf1wqhund_rWQ5Nkoox1mqUsHaHmVvS6PJwCQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-10-22 10:25 UTC (permalink / raw)
  To: Fokaz Chakma; +Cc: dpenkler, linux-staging, linux-kernel

On Wed, Oct 15, 2025 at 01:37:27AM +0530, Fokaz Chakma wrote:
> Converted single-line // comments that explain data or logic
> to kernel-style /* ... */ comments, per
> Documentation/process/coding-style.rst.

It's ok now to use // in .c files, so why is this required?

thanks,

greg k-h

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

* Re: [PATCH] staging: gpib/pc2: convert explanatory comments to /* ... */ style
       [not found]   ` <CAMa_khZMv-8jmUf1wqhund_rWQ5Nkoox1mqUsHaHmVvS6PJwCQ@mail.gmail.com>
@ 2025-10-23  9:58     ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-10-23  9:58 UTC (permalink / raw)
  To: Fokaz Chakma; +Cc: dpenkler, linux-staging, linux-kernel

A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

Also, HTML email caused this to be rejected by the server :(

On Wed, Oct 22, 2025 at 06:48:21PM +0530, Fokaz Chakma wrote:
> The coding style guide in Documentation/process/coding-style.rst indicated
> that single-line // comments should be converted to /* ... */ style when
> describing  code or data.

Yes, that's good, but we have learned to live with // comments for
simple one line comments now, so there's no real need to change this
driver for just that.

thanks,

greg k-h

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

end of thread, other threads:[~2025-10-23  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 20:07 [PATCH] staging: gpib/pc2: convert explanatory comments to /* ... */ style Fokaz Chakma
2025-10-22 10:25 ` Greg KH
     [not found]   ` <CAMa_khZMv-8jmUf1wqhund_rWQ5Nkoox1mqUsHaHmVvS6PJwCQ@mail.gmail.com>
2025-10-23  9:58     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).