* [PATCH 00/16] staging: gpib: fixes multiline comments style
@ 2025-04-12 6:21 Paul Retourné
2025-04-12 6:21 ` [PATCH 01/16] staging: gpib: agilent_82357a: " Paul Retourné
` (16 more replies)
0 siblings, 17 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:21 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style as requested in the gpib TODO file.
Paul Retourné (16):
staging: gpib: agilent_82357a: fixes multiline comments style
staging: gpib: cb7210: fixes multiline comments style
staging: gpib: common: fixes multiline comments style
staging: gpib: eastwood: fixes multiline comments style
staging: gpib: fmh_gpib: fixes multiline comments style
staging: gpib: gpio: fixes multiline comments style
staging: gpib: hp_82335: fixes multiline comments style
staging: gpib: hp_82341: fixes multiline comments style
staging: gpib: include: fixes multiline comments style
staging: gpib: ines: fixes multiline comments style
staging: gpib: lpvo_usb_gpib: fixes multiline comments style
staging: gpib: nec7210: fixes multiline comments style
staging: gpib: ni_usb: fixes multiline comments style
staging: gpib: pc2: fixes multiline comments style
staging: gpib: tms9914: fixes multiline comments style
staging: gpib: tnt4882: fixes multiline comments style
.../gpib/agilent_82357a/agilent_82357a.c | 14 +-
drivers/staging/gpib/cb7210/cb7210.c | 9 +-
drivers/staging/gpib/cb7210/cb7210.h | 14 +-
drivers/staging/gpib/common/gpib_os.c | 47 ++++---
drivers/staging/gpib/common/iblib.c | 19 ++-
drivers/staging/gpib/eastwood/fluke_gpib.c | 51 +++++---
drivers/staging/gpib/eastwood/fluke_gpib.h | 17 ++-
drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 66 ++++++----
drivers/staging/gpib/gpio/gpib_bitbang.c | 6 +-
drivers/staging/gpib/hp_82335/hp82335.c | 5 +-
drivers/staging/gpib/hp_82341/hp_82341.c | 11 +-
drivers/staging/gpib/include/gpib_types.h | 81 ++++++++----
.../staging/gpib/include/nec7210_registers.h | 3 +-
drivers/staging/gpib/include/tms9914.h | 6 +-
drivers/staging/gpib/ines/ines_gpib.c | 86 ++++++------
.../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 123 +++++++++---------
drivers/staging/gpib/nec7210/nec7210.c | 23 ++--
drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 40 ++++--
drivers/staging/gpib/ni_usb/ni_usb_gpib.h | 32 +++--
drivers/staging/gpib/pc2/pc2_gpib.c | 5 +-
drivers/staging/gpib/tms9914/tms9914.c | 9 +-
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 32 +++--
22 files changed, 421 insertions(+), 278 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 01/16] staging: gpib: agilent_82357a: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
@ 2025-04-12 6:21 ` Paul Retourné
2025-04-12 6:21 ` [PATCH 02/16] staging: gpib: cb7210: " Paul Retourné
` (15 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:21 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
.../staging/gpib/agilent_82357a/agilent_82357a.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index da229965d98e..2275d8ac8d30 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -524,9 +524,10 @@ static int agilent_82357a_read(struct gpib_board *board, uint8_t *buffer, size_t
}
kfree(in_data);
- /* Fix for a bug in 9914A that does not return the contents of ADSR
- * when the board is in listener active state and ATN is not asserted.
- * Set ATN here to obtain a valid board level ibsta
+ /*
+ * Fix for a bug in 9914A that does not return the contents of ADSR
+ * when the board is in listener active state and ATN is not asserted.
+ * Set ATN here to obtain a valid board level ibsta
*/
agilent_82357a_take_control_internal(board, 0);
@@ -715,9 +716,10 @@ static int agilent_82357a_take_control(struct gpib_board *board, int synchronous
if (!a_priv->bus_interface)
return -ENODEV;
-/* It looks like the 9914 does not handle tcs properly.
- * See comment above tms9914_take_control_workaround() in
- * drivers/gpib/tms9914/tms9914_aux.c
+/*
+ * It looks like the 9914 does not handle tcs properly.
+ * See comment above tms9914_take_control_workaround() in
+ * drivers/gpib/tms9914/tms9914_aux.c
*/
if (synchronous)
return -ETIMEDOUT;
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 02/16] staging: gpib: cb7210: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
2025-04-12 6:21 ` [PATCH 01/16] staging: gpib: agilent_82357a: " Paul Retourné
@ 2025-04-12 6:21 ` Paul Retourné
2025-04-12 6:21 ` [PATCH 03/16] staging: gpib: common: " Paul Retourné
` (14 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:21 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/cb7210/cb7210.c | 9 +++++----
drivers/staging/gpib/cb7210/cb7210.h | 14 ++++++++------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index 6b22a33a8c4f..86aaef001924 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -905,7 +905,8 @@ static int cb7210_init(struct cb7210_priv *cb_priv, struct gpib_board *board)
cb7210_write_byte(cb_priv, cb_priv->hs_mode_bits, HS_MODE);
write_byte(nec_priv, AUX_LO_SPEED, AUXMR);
- /* set clock register for maximum (20 MHz) driving frequency
+ /*
+ * set clock register for maximum (20 MHz) driving frequency
* ICR should be set to clock in megahertz (1-15) and to zero
* for clocks faster than 15 MHz (max 20MHz)
*/
@@ -1275,9 +1276,9 @@ static int cb_gpib_config(struct pcmcia_device *link)
} /* gpib_config */
/*
- * After a card is removed, gpib_release() will unregister the net
- * device, and release the PCMCIA configuration. If the device is
- * still open, this will be postponed until it is closed.
+ * After a card is removed, gpib_release() will unregister the net
+ * device, and release the PCMCIA configuration. If the device is
+ * still open, this will be postponed until it is closed.
*/
static void cb_gpib_release(struct pcmcia_device *link)
diff --git a/drivers/staging/gpib/cb7210/cb7210.h b/drivers/staging/gpib/cb7210/cb7210.h
index 2108fe7a8ce5..ea92a81689fa 100644
--- a/drivers/staging/gpib/cb7210/cb7210.h
+++ b/drivers/staging/gpib/cb7210/cb7210.h
@@ -134,7 +134,8 @@ enum bus_status_bits {
/* CBI 488.2 HS control */
-/* when both bit 0 and 1 are set, it
+/*
+ * when both bit 0 and 1 are set, it
* 1 clears the transmit state machine to an initial condition
* 2 clears any residual interrupts left latched on cbi488.2
* 3 resets all control bits in HS_MODE to zero
@@ -189,11 +190,12 @@ static inline unsigned int irq_bits(unsigned int irq)
}
enum cb7210_aux_cmds {
-/* AUX_RTL2 is an undocumented aux command which causes cb7210 to assert
- * (and keep asserted) local rtl message. This is used in conjunction
- * with the (stupid) cb7210 implementation
- * of the normal nec7210 AUX_RTL aux command, which
- * causes the rtl message to toggle between on and off.
+/*
+ * AUX_RTL2 is an undocumented aux command which causes cb7210 to assert
+ * (and keep asserted) local rtl message. This is used in conjunction
+ * with the (stupid) cb7210 implementation
+ * of the normal nec7210 AUX_RTL aux command, which
+ * causes the rtl message to toggle between on and off.
*/
AUX_RTL2 = 0xd,
AUX_LO_SPEED = 0x40,
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 03/16] staging: gpib: common: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
2025-04-12 6:21 ` [PATCH 01/16] staging: gpib: agilent_82357a: " Paul Retourné
2025-04-12 6:21 ` [PATCH 02/16] staging: gpib: cb7210: " Paul Retourné
@ 2025-04-12 6:21 ` Paul Retourné
2025-04-12 6:21 ` [PATCH 04/16] staging: gpib: eastwood: " Paul Retourné
` (13 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:21 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/common/gpib_os.c | 47 +++++++++++++++++----------
drivers/staging/gpib/common/iblib.c | 19 +++++++----
2 files changed, 41 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 8456b97290b8..12cd91a4c677 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -119,7 +119,8 @@ int io_timed_out(struct gpib_board *board)
return 0;
}
-/* this is a function instead of a constant because of Suse
+/*
+ * this is a function instead of a constant because of Suse
* defining HZ to be a function call to get_hz()
*/
static inline int pseudo_irq_period(void)
@@ -291,7 +292,8 @@ int autopoll_all_devices(struct gpib_board *board)
}
dev_dbg(board->gpib_dev, "complete\n");
- /* need to wake wait queue in case someone is
+ /*
+ * need to wake wait queue in case someone is
* waiting on RQS
*/
wake_up_interruptible(&board->wait);
@@ -665,8 +667,9 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
retval = board_info_ioctl(board, arg);
goto done;
case IBMUTEX:
- /* Need to unlock board->big_gpib_mutex before potentially locking board->user_mutex
- * to maintain consistent locking order
+ /*
+ * Need to unlock board->big_gpib_mutex before potentially locking board->user_mutex
+ * to maintain consistent locking order
*/
mutex_unlock(&board->big_gpib_mutex);
return mutex_ioctl(board, file_priv, arg);
@@ -736,8 +739,9 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
retval = take_control_ioctl(board, arg);
goto done;
case IBCMD:
- /* IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
- * before we call them.
+ /*
+ * IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
+ * before we call them.
*/
mutex_unlock(&board->big_gpib_mutex);
return command_ioctl(file_priv, board, arg);
@@ -760,8 +764,9 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
retval = query_board_rsv_ioctl(board, arg);
goto done;
case IBRD:
- /* IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
- * before we call them.
+ /*
+ * IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
+ * before we call them.
*/
mutex_unlock(&board->big_gpib_mutex);
return read_ioctl(file_priv, board, arg);
@@ -790,8 +795,9 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
retval = timeout_ioctl(board, arg);
goto done;
case IBWRT:
- /* IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
- * before we call them.
+ /*
+ * IO ioctls can take a long time, we need to unlock board->big_gpib_mutex
+ * before we call them.
*/
mutex_unlock(&board->big_gpib_mutex);
return write_ioctl(file_priv, board, arg);
@@ -913,7 +919,8 @@ static int read_ioctl(gpib_file_private_t *file_priv, struct gpib_board *board,
}
read_cmd.completed_transfer_count = read_cmd.requested_transfer_count - remain;
read_cmd.end = end_flag;
- /* suppress errors (for example due to timeout or interruption by device clear)
+ /*
+ * suppress errors (for example due to timeout or interruption by device clear)
* if all bytes got sent. This prevents races that can occur in the various drivers
* if a device receives a device clear immediately after a transfer completes and
* the driver code wasn't careful enough to handle that case.
@@ -967,10 +974,11 @@ static int command_ioctl(gpib_file_private_t *file_priv,
if (!access_ok(userbuf, remain))
return -EFAULT;
- /* Write buffer loads till we empty the user supplied buffer.
- * Call drivers at least once, even if remain is zero, in
- * order to allow them to insure previous commands were
- * completely finished, in the case of a restarted ioctl.
+ /*
+ * Write buffer loads till we empty the user supplied buffer.
+ * Call drivers at least once, even if remain is zero, in
+ * order to allow them to insure previous commands were
+ * completely finished, in the case of a restarted ioctl.
*/
atomic_set(&desc->io_in_progress, 1);
@@ -1068,7 +1076,8 @@ static int write_ioctl(gpib_file_private_t *file_priv, struct gpib_board *board,
break;
}
write_cmd.completed_transfer_count = write_cmd.requested_transfer_count - remain;
- /* suppress errors (for example due to timeout or interruption by device clear)
+ /*
+ * suppress errors (for example due to timeout or interruption by device clear)
* if all bytes got sent. This prevents races that can occur in the various drivers
* if a device receives a device clear immediately after a transfer completes and
* the driver code wasn't careful enough to handle that case.
@@ -1116,7 +1125,8 @@ static int increment_open_device_count(struct gpib_board *board, struct list_hea
struct list_head *list_ptr;
gpib_status_queue_t *device;
- /* first see if address has already been opened, then increment
+ /*
+ * first see if address has already been opened, then increment
* open count
*/
for (list_ptr = head->next; list_ptr != head; list_ptr = list_ptr->next) {
@@ -1242,7 +1252,8 @@ static int open_dev_ioctl(struct file *filep, struct gpib_board *board, unsigned
if (retval < 0)
return retval;
- /* clear stuck srq state, since we may be able to find service request on
+ /*
+ * clear stuck srq state, since we may be able to find service request on
* the new device
*/
atomic_set(&board->stuck_srq, 0);
diff --git a/drivers/staging/gpib/common/iblib.c b/drivers/staging/gpib/common/iblib.c
index b297261818f2..b05c26d47aa0 100644
--- a/drivers/staging/gpib/common/iblib.c
+++ b/drivers/staging/gpib/common/iblib.c
@@ -33,9 +33,10 @@ int ibcac(struct gpib_board *board, int sync, int fallback_to_async)
return 0;
if (sync && (status & LACS) == 0)
- /* tcs (take control synchronously) can only possibly work when
- * controller is listener. Error code also needs to be -ETIMEDOUT
- * or it will giveout without doing fallback.
+ /*
+ * tcs (take control synchronously) can only possibly work when
+ * controller is listener. Error code also needs to be -ETIMEDOUT
+ * or it will giveout without doing fallback.
*/
retval = -ETIMEDOUT;
else
@@ -50,7 +51,8 @@ int ibcac(struct gpib_board *board, int sync, int fallback_to_async)
return retval;
}
-/* After ATN is asserted, it should cause any connected devices
+/*
+ * After ATN is asserted, it should cause any connected devices
* to start listening for command bytes and leave acceptor idle state.
* So if ATN is asserted and neither NDAC or NRFD are asserted,
* then there are no devices and ibcmd should error out immediately.
@@ -218,7 +220,8 @@ int ibonline(struct gpib_board *board)
board->interface->detach(board);
return retval;
}
- /* nios2nommu on 2.6.11 uclinux kernel has weird problems
+ /*
+ * nios2nommu on 2.6.11 uclinux kernel has weird problems
* with autospoll thread causing huge slowdowns
*/
#ifndef CONFIG_NIOS2
@@ -313,7 +316,8 @@ int ibrd(struct gpib_board *board, uint8_t *buf, size_t length, int *end_flag, s
if (retval < 0)
return retval;
}
- /* XXX resetting timer here could cause timeouts take longer than they should,
+ /*
+ * XXX resetting timer here could cause timeouts take longer than they should,
* since read_ioctl calls this
* function in a loop, there is probably a similar problem with writes/commands
*/
@@ -514,7 +518,8 @@ int general_ibstatus(struct gpib_board *board, const gpib_status_queue_t *device
if (board->private_data) {
status = board->interface->update_status(board, clear_mask);
- /* XXX should probably stop having drivers use TIMO bit in
+ /*
+ * XXX should probably stop having drivers use TIMO bit in
* board->status to avoid confusion
*/
status &= ~TIMO;
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 04/16] staging: gpib: eastwood: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (2 preceding siblings ...)
2025-04-12 6:21 ` [PATCH 03/16] staging: gpib: common: " Paul Retourné
@ 2025-04-12 6:21 ` Paul Retourné
2025-04-12 6:31 ` [PATCH 05/16] staging: gpib: fmh_gpib: " Paul Retourné
` (12 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:21 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/eastwood/fluke_gpib.c | 51 ++++++++++++++--------
drivers/staging/gpib/eastwood/fluke_gpib.h | 17 +++++---
2 files changed, 44 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index a6b1ac169f94..a782b2297b0c 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -254,7 +254,8 @@ static int lacs_or_read_ready(struct gpib_board *board)
return retval;
}
-/* Wait until it is possible for a read to do something useful. This
+/*
+ * Wait until it is possible for a read to do something useful. This
* is not essential, it only exists to prevent RFD holdoff from being released pointlessly.
*/
static int wait_for_read(struct gpib_board *board)
@@ -276,7 +277,8 @@ static int wait_for_read(struct gpib_board *board)
return retval;
}
-/* Check if the SH state machine is in SGNS. We check twice since there is a very small chance
+/*
+ * Check if the SH state machine is in SGNS. We check twice since there is a very small chance
* we could be blowing through SGNS from SIDS to SDYS if there is already a
* byte available in the handshake state machine. We are interested
* in the case where the handshake is stuck in SGNS due to no byte being
@@ -310,7 +312,8 @@ static int source_handshake_is_sids_or_sgns(struct fluke_priv *e_priv)
(source_handshake_bits == SOURCE_HANDSHAKE_SIDS_BITS);
}
-/* Wait until the gpib chip is ready to accept a data out byte.
+/*
+ * Wait until the gpib chip is ready to accept a data out byte.
* If the chip is SGNS it is probably waiting for a a byte to
* be written to it.
*/
@@ -441,7 +444,8 @@ static int fluke_dma_write(struct gpib_board *board, uint8_t *buffer, size_t len
if (test_bit(DMA_WRITE_IN_PROGRESS_BN, &nec_priv->state))
fluke_dma_callback(board);
- /* if everything went fine, try to wait until last byte is actually
+ /*
+ * if everything went fine, try to wait until last byte is actually
* transmitted across gpib (but don't try _too_ hard)
*/
if (retval == 0)
@@ -508,7 +512,8 @@ static int fluke_accel_write(struct gpib_board *board, uint8_t *buffer, size_t l
if (WARN_ON_ONCE(remainder != 1))
return -EFAULT;
- /* wait until we are sure we will be able to write the data byte
+ /*
+ * wait until we are sure we will be able to write the data byte
* into the chip before we send AUX_SEOI. This prevents a timeout
* scenerio where we send AUX_SEOI but then timeout without getting
* any bytes into the gpib chip. This will result in the first byte
@@ -539,8 +544,10 @@ static int fluke_get_dma_residue(struct dma_chan *chan, dma_cookie_t cookie)
return result;
}
dmaengine_tx_status(chan, cookie, &state);
- // hardware doesn't support resume, so dont call this
- // method unless the dma transfer is done.
+ /*
+ * hardware doesn't support resume, so dont call this
+ * method unless the dma transfer is done.
+ */
return state.residue;
}
@@ -608,7 +615,8 @@ static int fluke_dma_read(struct gpib_board *board, uint8_t *buffer,
if (test_bit(DEV_CLEAR_BN, &nec_priv->state))
retval = -EINTR;
- /* If we woke up because of end, wait until the dma transfer has pulled
+ /*
+ * If we woke up because of end, wait until the dma transfer has pulled
* the data byte associated with the end before we cancel the dma transfer.
*/
if (test_bit(RECEIVED_END_BN, &nec_priv->state)) {
@@ -625,7 +633,8 @@ static int fluke_dma_read(struct gpib_board *board, uint8_t *buffer,
// stop the dma transfer
nec7210_set_reg_bits(nec_priv, IMR2, HR_DMAI, 0);
- /* delay a little just to make sure any bytes in dma controller's fifo get
+ /*
+ * delay a little just to make sure any bytes in dma controller's fifo get
* written to memory before we disable it
*/
usleep_range(10, 15);
@@ -641,14 +650,17 @@ static int fluke_dma_read(struct gpib_board *board, uint8_t *buffer,
dma_unmap_single(board->dev, bus_address, length, DMA_FROM_DEVICE);
memcpy(buffer, e_priv->dma_buffer, *bytes_read);
- /* If we got an end interrupt, figure out if it was
+ /*
+ * If we got an end interrupt, figure out if it was
* associated with the last byte we dma'd or with a
* byte still sitting on the cb7210.
*/
spin_lock_irqsave(&board->spinlock, flags);
if (test_bit(READ_READY_BN, &nec_priv->state) == 0) {
- // There is no byte sitting on the cb7210. If we
- // saw an end interrupt, we need to deal with it now
+ /*
+ * There is no byte sitting on the cb7210. If we
+ * saw an end interrupt, we need to deal with it now
+ */
if (test_and_clear_bit(RECEIVED_END_BN, &nec_priv->state))
*end = 1;
}
@@ -725,7 +737,8 @@ static gpib_interface_t fluke_unaccel_interface = {
.return_to_local = fluke_return_to_local,
};
-/* fluke_hybrid uses dma for writes but not for reads. Added
+/*
+ * fluke_hybrid uses dma for writes but not for reads. Added
* to deal with occasional corruption of bytes seen when doing dma
* reads. From looking at the cb7210 vhdl, I believe the corruption
* is due to a hardware bug triggered by the cpu reading a cb7210
@@ -914,7 +927,8 @@ static int fluke_init(struct fluke_priv *e_priv, struct gpib_board *board, int h
nec7210_board_reset(nec_priv, board);
write_byte(nec_priv, AUX_LO_SPEED, AUXMR);
- /* set clock register for driving frequency
+ /*
+ * set clock register for driving frequency
* ICR should be set to clock in megahertz (1-15) and to zero
* for clocks faster than 15 MHz (max 20MHz)
*/
@@ -933,7 +947,8 @@ static int fluke_init(struct fluke_priv *e_priv, struct gpib_board *board, int h
return 0;
}
-/* This function is passed to dma_request_channel() in order to
+/*
+ * This function is passed to dma_request_channel() in order to
* select the pl330 dma channel which has been hardwired to
* the gpib controller.
*/
@@ -1042,8 +1057,10 @@ static int fluke_attach_impl(struct gpib_board *board, const gpib_board_config_t
e_priv->dma_channel = dma_request_channel(dma_cap, gpib_dma_channel_filter, NULL);
if (!e_priv->dma_channel) {
dev_err(board->gpib_dev, "failed to allocate a dma channel.\n");
- // we don't error out here because unaccel interface will still
- // work without dma
+ /*
+ * we don't error out here because unaccel interface will still
+ * work without dma
+ */
}
return fluke_init(e_priv, board, handshake_mode);
diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.h b/drivers/staging/gpib/eastwood/fluke_gpib.h
index 3e4348196b42..dfe2d3c60deb 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.h
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.h
@@ -55,8 +55,10 @@ enum state1_bits {
SOURCE_HANDSHAKE_MASK = 0x7
};
-// we customized the cb7210 vhdl to give the "data in" status
-// on the unused bit 7 of the address0 register.
+/*
+ * we customized the cb7210 vhdl to give the "data in" status
+ * on the unused bit 7 of the address0 register.
+ */
enum cb7210_address0 {
DATA_IN_STATUS = 0x80
};
@@ -124,11 +126,12 @@ enum bus_status_bits {
};
enum cb7210_aux_cmds {
-/* AUX_RTL2 is an undocumented aux command which causes cb7210 to assert
- * (and keep asserted) local rtl message. This is used in conjunction
- * with the (stupid) cb7210 implementation
- * of the normal nec7210 AUX_RTL aux command, which
- * causes the rtl message to toggle between on and off.
+/*
+ * AUX_RTL2 is an undocumented aux command which causes cb7210 to assert
+ * (and keep asserted) local rtl message. This is used in conjunction
+ * with the (stupid) cb7210 implementation
+ * of the normal nec7210 AUX_RTL aux command, which
+ * causes the rtl message to toggle between on and off.
*/
AUX_RTL2 = 0xd,
AUX_NBAF = 0xe, // new byte available false (also clears seoi)
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 05/16] staging: gpib: fmh_gpib: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (3 preceding siblings ...)
2025-04-12 6:21 ` [PATCH 04/16] staging: gpib: eastwood: " Paul Retourné
@ 2025-04-12 6:31 ` Paul Retourné
2025-04-12 6:34 ` [PATCH 06/16] staging: gpib: gpio: " Paul Retourné
` (11 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:31 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 66 ++++++++++++++++--------
1 file changed, 44 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
index 53f4b3fccc3c..8a2f758c828b 100644
--- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
@@ -169,7 +169,8 @@ static void fmh_gpib_local_parallel_poll_mode(struct gpib_board *board, int loca
if (local) {
write_byte(&priv->nec7210_priv, AUX_I_REG | LOCAL_PPOLL_MODE_BIT, AUXMR);
} else {
- /* For fmh_gpib_core, remote parallel poll config mode is unaffected by the
+ /*
+ * For fmh_gpib_core, remote parallel poll config mode is unaffected by the
* state of the disable bit of the parallel poll register (unlike the tnt4882).
* So, we don't need to worry about that.
*/
@@ -195,7 +196,8 @@ static void fmh_gpib_serial_poll_response2(struct gpib_board *board, uint8_t sta
}
if (reqt) {
- /* It may seem like a race to issue reqt before updating
+ /*
+ * It may seem like a race to issue reqt before updating
* the status byte, but it is not. The chip does not
* issue the reqt until the SPMR is written to at
* a later time.
@@ -204,7 +206,8 @@ static void fmh_gpib_serial_poll_response2(struct gpib_board *board, uint8_t sta
} else if (reqf) {
write_byte(&priv->nec7210_priv, AUX_REQF, AUXMR);
}
- /* We need to always zero bit 6 of the status byte before writing it to
+ /*
+ * We need to always zero bit 6 of the status byte before writing it to
* the SPMR to insure we are using
* serial poll mode SP1, and not accidentally triggering mode SP3.
*/
@@ -333,7 +336,8 @@ static int wait_for_rx_fifo_half_full_or_end(struct gpib_board *board)
return retval;
}
-/* Wait until the gpib chip is ready to accept a data out byte.
+/*
+ * Wait until the gpib chip is ready to accept a data out byte.
*/
static int wait_for_data_out_ready(struct gpib_board *board)
{
@@ -377,7 +381,8 @@ static void fmh_gpib_dma_callback(void *arg)
spin_unlock_irqrestore(&board->spinlock, flags);
}
-/* returns true when all the bytes of a write have been transferred to
+/*
+ * returns true when all the bytes of a write have been transferred to
* the chip and successfully transferred out over the gpib bus.
*/
static int fmh_gpib_all_bytes_are_sent(struct fmh_priv *e_priv)
@@ -523,7 +528,8 @@ static int fmh_gpib_accel_write(struct gpib_board *board, uint8_t *buffer,
if (WARN_ON_ONCE(remainder != 1))
return -EFAULT;
- /* wait until we are sure we will be able to write the data byte
+ /*
+ * wait until we are sure we will be able to write the data byte
* into the chip before we send AUX_SEOI. This prevents a timeout
* scenario where we send AUX_SEOI but then timeout without getting
* any bytes into the gpib chip. This will result in the first byte
@@ -554,8 +560,10 @@ static int fmh_gpib_get_dma_residue(struct dma_chan *chan, dma_cookie_t cookie)
return result;
}
dmaengine_tx_status(chan, cookie, &state);
- // dma330 hardware doesn't support resume, so dont call this
- // method unless the dma transfer is done.
+ /*
+ * dma330 hardware doesn't support resume, so dont call this
+ * method unless the dma transfer is done.
+ */
return state.residue;
}
@@ -581,7 +589,8 @@ static int wait_for_tx_fifo_half_empty(struct gpib_board *board)
return retval;
}
-/* supports writing a chunk of data whose length must fit into the hardware'd xfer counter,
+/*
+ * supports writing a chunk of data whose length must fit into the hardware'd xfer counter,
* called in a loop by fmh_gpib_fifo_write()
*/
static int fmh_gpib_fifo_write_countable(struct gpib_board *board, uint8_t *buffer,
@@ -768,8 +777,10 @@ static int fmh_gpib_dma_read(struct gpib_board *board, uint8_t *buffer,
// stop the dma transfer
nec7210_set_reg_bits(nec_priv, IMR2, HR_DMAI, 0);
fifos_write(e_priv, 0, FIFO_CONTROL_STATUS_REG);
- // give time for pl330 to transfer any in-flight data, since
- // pl330 will throw it away when dmaengine_pause is called.
+ /*
+ * give time for pl330 to transfer any in-flight data, since
+ * pl330 will throw it away when dmaengine_pause is called.
+ */
usleep_range(10, 15);
residue = fmh_gpib_get_dma_residue(e_priv->dma_channel, dma_cookie);
if (WARN_ON_ONCE(residue > length || residue < 0))
@@ -793,14 +804,17 @@ static int fmh_gpib_dma_read(struct gpib_board *board, uint8_t *buffer,
buffer[(*bytes_read)++] = fifos_read(e_priv, FIFO_DATA_REG) & fifo_data_mask;
}
- /* If we got an end interrupt, figure out if it was
+ /*
+ * If we got an end interrupt, figure out if it was
* associated with the last byte we dma'd or with a
* byte still sitting on the cb7210.
*/
spin_lock_irqsave(&board->spinlock, flags);
if (*bytes_read > 0 && test_bit(READ_READY_BN, &nec_priv->state) == 0) {
- // If there is no byte sitting on the cb7210 and we
- // saw an end, we need to deal with it now
+ /*
+ * If there is no byte sitting on the cb7210 and we
+ * saw an end, we need to deal with it now
+ */
if (test_and_clear_bit(RECEIVED_END_BN, &nec_priv->state))
*end = 1;
}
@@ -819,7 +833,8 @@ static void fmh_gpib_release_rfd_holdoff(struct gpib_board *board, struct fmh_pr
ext_status_1 = read_byte(nec_priv, EXT_STATUS_1_REG);
- /* if there is an end byte sitting on the chip, don't release
+ /*
+ * if there is an end byte sitting on the chip, don't release
* holdoff. We want it left set after we read out the end
* byte.
*/
@@ -828,7 +843,8 @@ static void fmh_gpib_release_rfd_holdoff(struct gpib_board *board, struct fmh_pr
if (ext_status_1 & RFD_HOLDOFF_STATUS_BIT)
write_byte(nec_priv, AUX_FH, AUXMR);
- /* Check if an end byte raced in before we executed the AUX_FH command.
+ /*
+ * Check if an end byte raced in before we executed the AUX_FH command.
* If it did, we want to make sure the rfd holdoff is in effect. The end
* byte can arrive since
* AUX_RFD_HOLDOFF_ASAP doesn't immediately force the acceptor handshake
@@ -893,7 +909,8 @@ static int fmh_gpib_accel_read(struct gpib_board *board, uint8_t *buffer, size_t
return retval;
}
-/* Read a chunk of data whose length is within the limits of the hardware's
+/*
+ * Read a chunk of data whose length is within the limits of the hardware's
* xfer counter. Called in a loop from fmh_gpib_fifo_read().
*/
static int fmh_gpib_fifo_read_countable(struct gpib_board *board, uint8_t *buffer,
@@ -969,7 +986,8 @@ static int fmh_gpib_fifo_read(struct gpib_board *board, uint8_t *buffer, size_t
*end = 0;
*bytes_read = 0;
- /* Do a little prep with data in interrupt so that following wait_for_read()
+ /*
+ * Do a little prep with data in interrupt so that following wait_for_read()
* will wake up if a data byte is received.
*/
nec7210_set_reg_bits(nec_priv, IMR1, HR_DIIE, HR_DIIE);
@@ -1166,7 +1184,8 @@ irqreturn_t fmh_gpib_internal_interrupt(struct gpib_board *board)
clear_bit(RFD_HOLDOFF_BN, &nec_priv->state);
if (ext_status_1 & END_STATUS_BIT) {
- /* only set RECEIVED_END while there is still a data
+ /*
+ * only set RECEIVED_END while there is still a data
* byte sitting in the chip, to avoid spuriously
* setting it multiple times after it has been cleared
* during a read.
@@ -1179,7 +1198,8 @@ irqreturn_t fmh_gpib_internal_interrupt(struct gpib_board *board)
if ((fifo_status & TX_FIFO_HALF_EMPTY_INTERRUPT_IS_ENABLED) &&
(fifo_status & TX_FIFO_HALF_EMPTY)) {
- /* We really only want to clear the
+ /*
+ * We really only want to clear the
* TX_FIFO_HALF_EMPTY_INTERRUPT_ENABLE bit in the
* FIFO_CONTROL_STATUS_REG. Since we are not being
* careful, this also has a side effect of disabling
@@ -1193,7 +1213,8 @@ irqreturn_t fmh_gpib_internal_interrupt(struct gpib_board *board)
if ((fifo_status & RX_FIFO_HALF_FULL_INTERRUPT_IS_ENABLED) &&
(fifo_status & RX_FIFO_HALF_FULL)) {
- /* We really only want to clear the
+ /*
+ * We really only want to clear the
* RX_FIFO_HALF_FULL_INTERRUPT_ENABLE bit in the
* FIFO_CONTROL_STATUS_REG. Since we are not being
* careful, this also has a side effect of disabling
@@ -1444,7 +1465,8 @@ static int fmh_gpib_attach_impl(struct gpib_board *board, const gpib_board_confi
return -EIO;
}
}
- /* in the future we might want to know the half-fifo size
+ /*
+ * in the future we might want to know the half-fifo size
* (dma_burst_length) even when not using dma, so go ahead an
* initialize it unconditionally.
*/
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 06/16] staging: gpib: gpio: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (4 preceding siblings ...)
2025-04-12 6:31 ` [PATCH 05/16] staging: gpib: fmh_gpib: " Paul Retourné
@ 2025-04-12 6:34 ` Paul Retourné
2025-04-12 6:37 ` [PATCH 07/16] staging: gpib: hp_82335: " Paul Retourné
` (10 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:34 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/gpio/gpib_bitbang.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 86bdd381472a..97ae80e8ee3b 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -32,7 +32,8 @@
#define ENABLE_IRQ(IRQ, TYPE) irq_set_irq_type(IRQ, TYPE)
#define DISABLE_IRQ(IRQ) irq_set_irq_type(IRQ, IRQ_TYPE_NONE)
-/* Debug print levels:
+/*
+ * Debug print levels:
* 0 = load/unload info and errors that make the driver fail;
* 1 = + warnings for unforeseen events that may break the current
* operation and lead to a timeout, but do not affect the
@@ -1256,7 +1257,8 @@ static int bb_attach(struct gpib_board *board, const gpib_board_config_t *config
if (allocate_gpios(board))
goto bb_attach_fail;
-/* Configure SN7516X control lines.
+/*
+ * Configure SN7516X control lines.
* drive ATN, IFC and REN as outputs only when master
* i.e. system controller. In this mode can only be the CIC
* When not master then enable device mode ATN, IFC & REN as inputs
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 07/16] staging: gpib: hp_82335: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (5 preceding siblings ...)
2025-04-12 6:34 ` [PATCH 06/16] staging: gpib: gpio: " Paul Retourné
@ 2025-04-12 6:37 ` Paul Retourné
2025-04-12 6:42 ` [PATCH 08/16] staging: gpib: hp_82341: " Paul Retourné
` (9 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:37 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/hp_82335/hp82335.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/hp_82335/hp82335.c b/drivers/staging/gpib/hp_82335/hp82335.c
index fd23b1cb80f9..ec531c2b174f 100644
--- a/drivers/staging/gpib/hp_82335/hp82335.c
+++ b/drivers/staging/gpib/hp_82335/hp82335.c
@@ -4,8 +4,9 @@
* copyright : (C) 2002 by Frank Mori Hess *
***************************************************************************/
-/*should enable ATN interrupts (and update board->status on occurrence),
- * implement recovery from bus errors (if necessary)
+/*
+ * should enable ATN interrupts (and update board->status on occurrence),
+ * implement recovery from bus errors (if necessary)
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 08/16] staging: gpib: hp_82341: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (6 preceding siblings ...)
2025-04-12 6:37 ` [PATCH 07/16] staging: gpib: hp_82335: " Paul Retourné
@ 2025-04-12 6:42 ` Paul Retourné
2025-04-12 6:45 ` [PATCH 09/16] staging: gpib: include: " Paul Retourné
` (8 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:42 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/hp_82341/hp_82341.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index f52e673dc869..0b1f923de24a 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -51,11 +51,12 @@ static int hp_82341_accel_read(struct gpib_board *board, uint8_t *buffer, size_t
return 0;
//disable fifo for the moment
outb(DIRECTION_GPIB_TO_HOST_BIT, hp_priv->iobase[3] + BUFFER_CONTROL_REG);
- // Handle corner case of board not in holdoff and one byte has slipped in already.
- // Also, board sometimes has problems (spurious 1 byte reads) when read fifo is
- // started up with board in
- // TACS under certain data holdoff conditions. Doing a 1 byte tms9914-style
- // read avoids these problems.
+ /*
+ * Handle corner case of board not in holdoff and one byte has slipped in already.
+ * Also, board sometimes has problems (spurious 1 byte reads) when read fifo is
+ * started up with board in TACS under certain data holdoff conditions.
+ * Doing a 1 byte tms9914-style read avoids these problems.
+ */
if (/*tms_priv->holdoff_active == 0 && */length > 1) {
size_t num_bytes;
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 09/16] staging: gpib: include: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (7 preceding siblings ...)
2025-04-12 6:42 ` [PATCH 08/16] staging: gpib: hp_82341: " Paul Retourné
@ 2025-04-12 6:45 ` Paul Retourné
2025-04-12 6:47 ` [PATCH 10/16] staging: gpib: ines: " Paul Retourné
` (7 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:45 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/include/gpib_types.h | 81 ++++++++++++-------
.../staging/gpib/include/nec7210_registers.h | 3 +-
drivers/staging/gpib/include/tms9914.h | 6 +-
3 files changed, 60 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 2d9b9be683f8..8cea658078e2 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -8,7 +8,8 @@
#define _GPIB_TYPES_H
#ifdef __KERNEL__
-/* gpib_interface_t defines the interface
+/*
+ * gpib_interface_t defines the interface
* between the board-specific details dealt with in the drivers
* and generic interface provided by gpib-common.
* This really should be in a different header file.
@@ -37,11 +38,13 @@ typedef struct {
unsigned int ibirq;
/* dma channel to use for non-pnp cards (set by core, driver should make local copy) */
unsigned int ibdma;
- /* pci bus of card, useful for distinguishing multiple identical pci cards
+ /*
+ * pci bus of card, useful for distinguishing multiple identical pci cards
* (negative means don't care)
*/
int pci_bus;
- /* pci slot of card, useful for distinguishing multiple identical pci cards
+ /*
+ * pci slot of card, useful for distinguishing multiple identical pci cards
* (negative means don't care)
*/
int pci_slot;
@@ -58,7 +61,8 @@ struct gpib_interface_struct {
int (*attach)(struct gpib_board *board, const gpib_board_config_t *config);
/* detach() shuts down board and frees resources */
void (*detach)(struct gpib_board *board);
- /* read() should read at most 'length' bytes from the bus into
+ /*
+ * read() should read at most 'length' bytes from the bus into
* 'buffer'. It should return when it fills the buffer or
* encounters an END (EOI and or EOS if appropriate). It should set 'end'
* to be nonzero if the read was terminated by an END, otherwise 'end'
@@ -70,39 +74,46 @@ struct gpib_interface_struct {
*/
int (*read)(struct gpib_board *board, uint8_t *buffer, size_t length, int *end,
size_t *bytes_read);
- /* write() should write 'length' bytes from buffer to the bus.
+ /*
+ * write() should write 'length' bytes from buffer to the bus.
* If the boolean value send_eoi is nonzero, then EOI should
* be sent along with the last byte. Returns number of bytes
* written or negative value on error.
*/
int (*write)(struct gpib_board *board, uint8_t *buffer, size_t length, int send_eoi,
size_t *bytes_written);
- /* command() writes the command bytes in 'buffer' to the bus
+ /*
+ * command() writes the command bytes in 'buffer' to the bus
* Returns zero on success or negative value on error.
*/
int (*command)(struct gpib_board *board, uint8_t *buffer, size_t length,
size_t *bytes_written);
- /* Take control (assert ATN). If 'asyncronous' is nonzero, take
+ /*
+ * Take control (assert ATN). If 'asyncronous' is nonzero, take
* control asyncronously (assert ATN immediately without waiting
* for other processes to complete first). Should not return
* until board becomes controller in charge. Returns zero no success,
* nonzero on error.
*/
int (*take_control)(struct gpib_board *board, int asyncronous);
- /* De-assert ATN. Returns zero on success, nonzer on error.
+ /*
+ * De-assert ATN. Returns zero on success, nonzer on error.
*/
int (*go_to_standby)(struct gpib_board *board);
/* request/release control of the IFC and REN lines (system controller) */
void (*request_system_control)(struct gpib_board *board, int request_control);
- /* Asserts or de-asserts 'interface clear' (IFC) depending on
+ /*
+ * Asserts or de-asserts 'interface clear' (IFC) depending on
* boolean value of 'assert'
*/
void (*interface_clear)(struct gpib_board *board, int assert);
- /* Sends remote enable command if 'enable' is nonzero, disables remote mode
+ /*
+ * Sends remote enable command if 'enable' is nonzero, disables remote mode
* if 'enable' is zero
*/
void (*remote_enable)(struct gpib_board *board, int enable);
- /* enable END for reads, when byte 'eos' is received. If
+ /*
+ * enable END for reads, when byte 'eos' is received. If
* 'compare_8_bits' is nonzero, then all 8 bits are compared
* with the eos bytes. Otherwise only the 7 least significant
* bits are compared.
@@ -118,26 +129,31 @@ struct gpib_interface_struct {
void (*parallel_poll_response)(struct gpib_board *board, int ist);
/* select local parallel poll configuration mode PP2 versus remote PP1 */
void (*local_parallel_poll_mode)(struct gpib_board *board, int local);
- /* Returns current status of the bus lines. Should be set to
+ /*
+ * Returns current status of the bus lines. Should be set to
* NULL if your board does not have the ability to query the
* state of the bus lines.
*/
int (*line_status)(const struct gpib_board *board);
- /* updates and returns the board's current status.
+ /*
+ * updates and returns the board's current status.
* The meaning of the bits are specified in gpib_user.h
* in the IBSTA section. The driver does not need to
* worry about setting the CMPL, END, TIMO, or ERR bits.
*/
unsigned int (*update_status)(struct gpib_board *board, unsigned int clear_mask);
- /* Sets primary address 0-30 for gpib interface card.
+ /*
+ * Sets primary address 0-30 for gpib interface card.
*/
int (*primary_address)(struct gpib_board *board, unsigned int address);
- /* Sets and enables, or disables secondary address 0-30
+ /*
+ * Sets and enables, or disables secondary address 0-30
* for gpib interface card.
*/
int (*secondary_address)(struct gpib_board *board, unsigned int address,
int enable);
- /* Sets the byte the board should send in response to a serial poll.
+ /*
+ * Sets the byte the board should send in response to a serial poll.
* This function should also start or stop requests for service via
* IEEE 488.2 reqt/reqf, based on MSS (bit 6 of the status_byte).
* If the more flexible serial_poll_response2 is implemented by the
@@ -150,7 +166,8 @@ struct gpib_interface_struct {
* STB, reqt, and reqf".
*/
void (*serial_poll_response)(struct gpib_board *board, uint8_t status_byte);
- /* Sets the byte the board should send in response to a serial poll.
+ /*
+ * Sets the byte the board should send in response to a serial poll.
* This function should also request service via IEEE 488.2 reqt/reqf
* based on MSS (bit 6 of the status_byte) and new_reason_for_service.
* reqt should be set true if new_reason_for_service is true,
@@ -166,7 +183,8 @@ struct gpib_interface_struct {
*/
void (*serial_poll_response2)(struct gpib_board *board, uint8_t status_byte,
int new_reason_for_service);
- /* returns the byte the board will send in response to a serial poll.
+ /*
+ * returns the byte the board will send in response to a serial poll.
*/
uint8_t (*serial_poll_status)(struct gpib_board *board);
/* adjust T1 delay */
@@ -216,14 +234,16 @@ typedef struct gpib_interface_list_struct {
struct module *module;
} gpib_interface_list_t;
-/* One struct gpib_board is allocated for each physical board in the computer.
+/*
+ * One struct gpib_board is allocated for each physical board in the computer.
* It provides storage for variables local to each board, and interface
* functions for performing operations on the board
*/
struct gpib_board {
/* functions used by this board */
gpib_interface_t *interface;
- /* Pointer to module whose use count we should increment when
+ /*
+ * Pointer to module whose use count we should increment when
* interface is in use
*/
struct module *provider_module;
@@ -231,20 +251,24 @@ struct gpib_board {
u8 *buffer;
/* length of buffer */
unsigned int buffer_length;
- /* Used to hold the board's current status (see update_status() above)
+ /*
+ * Used to hold the board's current status (see update_status() above)
*/
unsigned long status;
- /* Driver should only sleep on this wait queue. It is special in that the
+ /*
+ * Driver should only sleep on this wait queue. It is special in that the
* core will wake this queue and set the TIMO bit in 'status' when the
* watchdog timer times out.
*/
wait_queue_head_t wait;
- /* Lock that only allows one process to access this board at a time.
+ /*
+ * Lock that only allows one process to access this board at a time.
* Has to be first in any locking order, since it can be locked over
* multiple ioctls.
*/
struct mutex user_mutex;
- /* Mutex which compensates for removal of "big kernel lock" from kernel.
+ /*
+ * Mutex which compensates for removal of "big kernel lock" from kernel.
* Should not be held for extended waits.
*/
struct mutex big_gpib_mutex;
@@ -259,7 +283,8 @@ struct gpib_board {
struct device *dev;
/* gpib_common device gpibN */
struct device *gpib_dev;
- /* 'private_data' can be used as seen fit by the driver to
+ /*
+ * 'private_data' can be used as seen fit by the driver to
* store additional variables for this board
*/
void *private_data;
@@ -296,7 +321,8 @@ struct gpib_board {
unsigned master : 1;
/* individual status bit */
unsigned ist : 1;
- /* one means local parallel poll mode ieee 488.1 PP2 (or no parallel poll PP0),
+ /*
+ * one means local parallel poll mode ieee 488.1 PP2 (or no parallel poll PP0),
* zero means remote parallel poll configuration mode ieee 488.1 PP1
*/
unsigned local_ppoll_mode : 1;
@@ -308,7 +334,8 @@ typedef struct {
short event_type;
} gpib_event_t;
-/* Each board has a list of gpib_status_queue_t to keep track of all open devices
+/*
+ * Each board has a list of gpib_status_queue_t to keep track of all open devices
* on the bus, so we know what address to poll when we get a service request
*/
typedef struct {
diff --git a/drivers/staging/gpib/include/nec7210_registers.h b/drivers/staging/gpib/include/nec7210_registers.h
index 888803dd97f9..97c53ac8e805 100644
--- a/drivers/staging/gpib/include/nec7210_registers.h
+++ b/drivers/staging/gpib/include/nec7210_registers.h
@@ -17,7 +17,8 @@ enum nec7210_chipset {
TNT5004, // NI (minor differences to TNT4882)
};
-/* nec7210 register numbers (might need to be multiplied by
+/*
+ * nec7210 register numbers (might need to be multiplied by
* a board-dependent offset to get actually io address offset)
*/
// write registers
diff --git a/drivers/staging/gpib/include/tms9914.h b/drivers/staging/gpib/include/tms9914.h
index 424c95ad85c6..11909c3e6bbf 100644
--- a/drivers/staging/gpib/include/tms9914.h
+++ b/drivers/staging/gpib/include/tms9914.h
@@ -86,7 +86,8 @@ int tms9914_write(struct gpib_board *board, struct tms9914_priv *priv, uint8_t *
int tms9914_command(struct gpib_board *board, struct tms9914_priv *priv, uint8_t *buffer,
size_t length, size_t *bytes_written);
int tms9914_take_control(struct gpib_board *board, struct tms9914_priv *priv, int syncronous);
-/* alternate version of tms9914_take_control which works around buggy tcs
+/*
+ * alternate version of tms9914_take_control which works around buggy tcs
* implementation.
*/
int tms9914_take_control_workaround(struct gpib_board *board, struct tms9914_priv *priv,
@@ -139,7 +140,8 @@ enum {
ms9914_num_registers = 8,
};
-/* tms9914 register numbers (might need to be multiplied by
+/*
+ * tms9914 register numbers (might need to be multiplied by
* a board-dependent offset to get actually io address offset)
*/
// write registers
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 10/16] staging: gpib: ines: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (8 preceding siblings ...)
2025-04-12 6:45 ` [PATCH 09/16] staging: gpib: include: " Paul Retourné
@ 2025-04-12 6:47 ` Paul Retourné
2025-04-12 6:48 ` [PATCH 11/16] staging: gpib: lpvo_usb_gpib: " Paul Retourné
` (6 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:47 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/ines/ines_gpib.c | 86 ++++++++++++++-------------
1 file changed, 44 insertions(+), 42 deletions(-)
diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index d93eb05dab90..f143fe8011bd 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -990,12 +990,13 @@ static struct pci_driver ines_pci_driver = {
static const int ines_pcmcia_iosize = 0x20;
-/* The event() function is this driver's Card Services event handler.
- * It will be called by Card Services when an appropriate card status
- * event is received. The config() and release() entry points are
- * used to configure or release a socket, in response to card insertion
- * and ejection events. They are invoked from the gpib event
- * handler.
+/*
+ * The event() function is this driver's Card Services event handler.
+ * It will be called by Card Services when an appropriate card status
+ * event is received. The config() and release() entry points are
+ * used to configure or release a socket, in response to card insertion
+ * and ejection events. They are invoked from the gpib event
+ * handler.
*/
static int ines_gpib_config(struct pcmcia_device *link);
@@ -1007,31 +1008,31 @@ static irqreturn_t ines_pcmcia_interrupt(int irq, void *arg);
static int ines_common_pcmcia_attach(struct gpib_board *board);
/*
* A linked list of "instances" of the gpib device. Each actual
- * PCMCIA card corresponds to one device instance, and is described
- * by one dev_link_t structure (defined in ds.h).
+ * PCMCIA card corresponds to one device instance, and is described
+ * by one dev_link_t structure (defined in ds.h).
*
- * You may not want to use a linked list for this -- for example, the
- * memory card driver uses an array of dev_link_t pointers, where minor
- * device numbers are used to derive the corresponding array index.
+ * You may not want to use a linked list for this -- for example, the
+ * memory card driver uses an array of dev_link_t pointers, where minor
+ * device numbers are used to derive the corresponding array index.
*/
static struct pcmcia_device *curr_dev;
/*
- * A dev_link_t structure has fields for most things that are needed
- * to keep track of a socket, but there will usually be some device
- * specific information that also needs to be kept track of. The
- * 'priv' pointer in a dev_link_t structure can be used to point to
- * a device-specific private data structure, like this.
+ * A dev_link_t structure has fields for most things that are needed
+ * to keep track of a socket, but there will usually be some device
+ * specific information that also needs to be kept track of. The
+ * 'priv' pointer in a dev_link_t structure can be used to point to
+ * a device-specific private data structure, like this.
*
- * A driver needs to provide a dev_node_t structure for each device
- * on a card. In some cases, there is only one device per card (for
- * example, ethernet cards, modems). In other cases, there may be
- * many actual or logical devices (SCSI adapters, memory cards with
- * multiple partitions). The dev_node_t structures need to be kept
- * in a linked list starting at the 'dev' field of a dev_link_t
- * structure. We allocate them in the card's private data structure,
- * because they generally can't be allocated dynamically.
+ * A driver needs to provide a dev_node_t structure for each device
+ * on a card. In some cases, there is only one device per card (for
+ * example, ethernet cards, modems). In other cases, there may be
+ * many actual or logical devices (SCSI adapters, memory cards with
+ * multiple partitions). The dev_node_t structures need to be kept
+ * in a linked list starting at the 'dev' field of a dev_link_t
+ * structure. We allocate them in the card's private data structure,
+ * because they generally can't be allocated dynamically.
*/
struct local_info {
@@ -1042,13 +1043,13 @@ struct local_info {
};
/*
- * gpib_attach() creates an "instance" of the driver, allocating
- * local data structures for one device. The device is registered
- * with Card Services.
+ * gpib_attach() creates an "instance" of the driver, allocating
+ * local data structures for one device. The device is registered
+ * with Card Services.
*
- * The dev_link structure is initialized, but we don't actually
- * configure the card at this point -- we wait until we receive a
- * card insertion event.
+ * The dev_link structure is initialized, but we don't actually
+ * configure the card at this point -- we wait until we receive a
+ * card insertion event.
*/
static int ines_gpib_probe(struct pcmcia_device *link)
{
@@ -1079,10 +1080,10 @@ static int ines_gpib_probe(struct pcmcia_device *link)
}
/*
- * This deletes a driver "instance". The device is de-registered
- * with Card Services. If it has been released, all local data
- * structures are freed. Otherwise, the structures will be freed
- * when the device is released.
+ * This deletes a driver "instance". The device is de-registered
+ * with Card Services. If it has been released, all local data
+ * structures are freed. Otherwise, the structures will be freed
+ * when the device is released.
*/
static void ines_gpib_remove(struct pcmcia_device *link)
{
@@ -1103,9 +1104,9 @@ static int ines_gpib_config_iteration(struct pcmcia_device *link, void *priv_dat
}
/*
- * gpib_config() is scheduled to run after a CARD_INSERTION event
- * is received, to configure the PCMCIA socket, and to make the
- * device available to the system.
+ * gpib_config() is scheduled to run after a CARD_INSERTION event
+ * is received, to configure the PCMCIA socket, and to make the
+ * device available to the system.
*/
static int ines_gpib_config(struct pcmcia_device *link)
{
@@ -1125,8 +1126,9 @@ static int ines_gpib_config(struct pcmcia_device *link)
dev_dbg(&link->dev, "ines_cs: manufacturer: 0x%x card: 0x%x\n",
link->manf_id, link->card_id);
- /* for the ines card we have to setup the configuration registers in
- * attribute memory here
+ /*
+ * for the ines card we have to setup the configuration registers in
+ * attribute memory here
*/
link->resource[2]->flags |= WIN_MEMORY_TYPE_AM | WIN_DATA_WIDTH_8 | WIN_ENABLE;
link->resource[2]->end = 0x1000;
@@ -1159,9 +1161,9 @@ static int ines_gpib_config(struct pcmcia_device *link)
} /* gpib_config */
/*
- * After a card is removed, gpib_release() will unregister the net
- * device, and release the PCMCIA configuration. If the device is
- * still open, this will be postponed until it is closed.
+ * After a card is removed, gpib_release() will unregister the net
+ * device, and release the PCMCIA configuration. If the device is
+ * still open, this will be postponed until it is closed.
*/
static void ines_gpib_release(struct pcmcia_device *link)
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 11/16] staging: gpib: lpvo_usb_gpib: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (9 preceding siblings ...)
2025-04-12 6:47 ` [PATCH 10/16] staging: gpib: ines: " Paul Retourné
@ 2025-04-12 6:48 ` Paul Retourné
2025-04-12 6:49 ` [PATCH 12/16] staging: gpib: nec7210: " Paul Retourné
` (5 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:48 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
.../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 123 +++++++++---------
1 file changed, 64 insertions(+), 59 deletions(-)
diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
index faf96e9cc4a1..f7dd7e8b0764 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -36,16 +36,16 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("GPIB driver for LPVO usb devices");
/*
- * Table of devices that work with this driver.
+ * Table of devices that work with this driver.
*
- * Currently, only one device is known to be used in the
- * lpvo_usb_gpib adapter (FTDI 0403:6001).
- * If your adapter uses a different chip, insert a line
- * in the following table with proper <Vendor-id>, <Product-id>.
+ * Currently, only one device is known to be used in the
+ * lpvo_usb_gpib adapter (FTDI 0403:6001).
+ * If your adapter uses a different chip, insert a line
+ * in the following table with proper <Vendor-id>, <Product-id>.
*
- * To have your chip automatically handled by the driver,
- * update files "/usr/local/etc/modprobe.d/lpvo_usb_gpib.conf"
- * and /usr/local/etc/udev/rules.d/99-lpvo_usb_gpib.rules.
+ * To have your chip automatically handled by the driver,
+ * update files "/usr/local/etc/modprobe.d/lpvo_usb_gpib.conf"
+ * and /usr/local/etc/udev/rules.d/99-lpvo_usb_gpib.rules.
*
*/
@@ -56,18 +56,18 @@ static const struct usb_device_id skel_table[] = {
MODULE_DEVICE_TABLE(usb, skel_table);
/*
- * *** Diagnostics and Debug ***
- * To enable the diagnostic and debug messages either compile with DEBUG set
- * or control via the dynamic debug mechanisms.
- * The module parameter "debug" controls the sending of debug messages to
- * syslog. By default it is set to 0
- * debug = 0: only attach/detach messages are sent
- * 1: every action is logged
- * 2: extended logging; each single exchanged byte is documented
- * (about twice the log volume of [1])
- * To switch debug level:
- * At module loading: modprobe lpvo_usb_gpib debug={0,1,2}
- * On the fly: echo {0,1,2} > /sys/modules/lpvo_usb_gpib/parameters/debug
+ * *** Diagnostics and Debug ***
+ * To enable the diagnostic and debug messages either compile with DEBUG set
+ * or control via the dynamic debug mechanisms.
+ * The module parameter "debug" controls the sending of debug messages to
+ * syslog. By default it is set to 0
+ * debug = 0: only attach/detach messages are sent
+ * 1: every action is logged
+ * 2: extended logging; each single exchanged byte is documented
+ * (about twice the log volume of [1])
+ * To switch debug level:
+ * At module loading: modprobe lpvo_usb_gpib debug={0,1,2}
+ * On the fly: echo {0,1,2} > /sys/modules/lpvo_usb_gpib/parameters/debug
*/
static int debug;
@@ -169,10 +169,10 @@ static void show_status(struct gpib_board *board)
}
/*
- * GLOBAL VARIABLES: required for
- * pairing among gpib minor and usb minor.
- * MAX_DEV is the max number of usb-gpib adapters; free
- * to change as you like, but no more than 32
+ * GLOBAL VARIABLES: required for
+ * pairing among gpib minor and usb minor.
+ * MAX_DEV is the max number of usb-gpib adapters; free
+ * to change as you like, but no more than 32
*/
#define MAX_DEV 8
@@ -182,7 +182,7 @@ static int assigned_usb_minors; /* mask of filled slots */
static struct mutex minors_lock; /* operations on usb_minors are to be protected */
/*
- * usb-skeleton prototypes
+ * usb-skeleton prototypes
*/
struct usb_skel;
@@ -192,7 +192,7 @@ static int skel_do_open(struct gpib_board *, int);
static int skel_do_release(struct gpib_board *);
/*
- * usec_diff : take difference in MICROsec between two 'timespec'
+ * usec_diff : take difference in MICROsec between two 'timespec'
* (unix time in sec and NANOsec)
*/
@@ -203,7 +203,7 @@ static inline int usec_diff(struct timespec64 *a, struct timespec64 *b)
}
/*
- * *** these routines are specific to the usb-gpib adapter ***
+ * *** these routines are specific to the usb-gpib adapter ***
*/
/**
@@ -262,13 +262,11 @@ static int send_command(struct gpib_board *board, char *msg, int leng)
}
/*
- *
* set_control_line() - Set the value of a single gpib control line
*
* @board: the gpib_board_struct data area for this gpib interface
* @line: line mask
* @value: line new value (0/1)
- *
*/
static int set_control_line(struct gpib_board *board, int line, int value)
@@ -368,7 +366,7 @@ static void set_timeout(struct gpib_board *board)
}
/*
- * now the standard interface functions - attach and detach
+ * now the standard interface functions - attach and detach
*/
/**
@@ -464,7 +462,8 @@ static int usb_gpib_attach(struct gpib_board *board, const gpib_board_config_t *
if (retval != ACK)
return -EIO;
- /* We must setup debug mode because we need the extended instruction
+ /*
+ * We must setup debug mode because we need the extended instruction
* set to cope with the Core (gpib_common) point of view
*/
@@ -473,7 +472,8 @@ static int usb_gpib_attach(struct gpib_board *board, const gpib_board_config_t *
if (retval != ACK)
return -EIO;
- /* We must keep REN off after an IFC because so it is
+ /*
+ * We must keep REN off after an IFC because so it is
* assumed by the Core
*/
@@ -654,7 +654,8 @@ static int usb_gpib_line_status(const struct gpib_board *board)
DIA_LOG(1, "%s\n", "request");
- /* if we are on the wait queue (board->wait), do not hurry
+ /*
+ * if we are on the wait queue (board->wait), do not hurry
* reading status line; instead, pause a little
*/
@@ -707,7 +708,8 @@ static int usb_gpib_line_status(const struct gpib_board *board)
static int usb_gpib_parallel_poll(struct gpib_board *board, uint8_t *result)
{
- /* request parallel poll asserting ATN | EOI;
+ /*
+ * request parallel poll asserting ATN | EOI;
* we suppose ATN already asserted
*/
@@ -1083,13 +1085,13 @@ static gpib_interface_t usb_gpib_interface = {
};
/*
- * usb_gpib_init_module(), usb_gpib_exit_module()
+ * usb_gpib_init_module(), usb_gpib_exit_module()
*
- * This functions are called every time a new device is detected
- * and registered or is removed and unregistered.
- * We must take note of created and destroyed usb minors to be used
- * when usb_gpib_attach() and usb_gpib_detach() will be called on
- * request by gpib_config.
+ * This functions are called every time a new device is detected
+ * and registered or is removed and unregistered.
+ * We must take note of created and destroyed usb minors to be used
+ * when usb_gpib_attach() and usb_gpib_detach() will be called on
+ * request by gpib_config.
*/
static int usb_gpib_init_module(struct usb_interface *interface)
@@ -1107,8 +1109,9 @@ static int usb_gpib_init_module(struct usb_interface *interface)
goto exit;
}
} else {
- /* check if minor is already registered - maybe useless, but if
- * it happens the code is inconsistent somewhere
+ /*
+ * check if minor is already registered - maybe useless, but if
+ * it happens the code is inconsistent somewhere
*/
for (j = 0 ; j < MAX_DEV ; j++) {
@@ -1162,12 +1165,11 @@ static void usb_gpib_exit_module(int minor)
}
/*
- * Default latency time (16 msec) is too long.
- * We must use 1 msec (best); anyhow, no more than 5 msec.
- *
- * Defines and function taken and modified from the kernel tree
- * (see ftdi_sio.h and ftdi_sio.c).
+ * Default latency time (16 msec) is too long.
+ * We must use 1 msec (best); anyhow, no more than 5 msec.
*
+ * Defines and function taken and modified from the kernel tree
+ * (see ftdi_sio.h and ftdi_sio.c).
*/
#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
@@ -1235,7 +1237,8 @@ static int write_latency_timer(struct usb_device *udev)
/* private defines */
#define MAX_TRANSFER (PAGE_SIZE - 512)
-/* MAX_TRANSFER is chosen so that the VM is not stressed by
+/*
+ * MAX_TRANSFER is chosen so that the VM is not stressed by
* allocations > PAGE_SIZE and the number of packets in a page
* is an integer 512 is the largest possible packet on EHCI
*/
@@ -1280,7 +1283,7 @@ static void skel_delete(struct kref *kref)
}
/*
- * skel_do_open() - to be called by usb_gpib_attach
+ * skel_do_open() - to be called by usb_gpib_attach
*/
static int skel_do_open(struct gpib_board *board, int subminor)
@@ -1317,7 +1320,7 @@ static int skel_do_open(struct gpib_board *board, int subminor)
}
/*
- * skel_do_release() - to be called by usb_gpib_detach
+ * skel_do_release() - to be called by usb_gpib_detach
*/
static int skel_do_release(struct gpib_board *board)
@@ -1340,7 +1343,7 @@ static int skel_do_release(struct gpib_board *board)
}
/*
- * read functions
+ * read functions
*/
static void skel_read_bulk_callback(struct urb *urb)
@@ -1405,7 +1408,7 @@ static int skel_do_read_io(struct usb_skel *dev, size_t count)
}
/*
- * skel_do_read() - read operations from lpvo_usb_gpib
+ * skel_do_read() - read operations from lpvo_usb_gpib
*/
static ssize_t skel_do_read(struct usb_skel *dev, char *buffer, size_t count)
@@ -1482,7 +1485,8 @@ static ssize_t skel_do_read(struct usb_skel *dev, char *buffer, size_t count)
* all data has been used
* actual IO needs to be done
*/
- /* it seems that requests for less than dev->bulk_in_size
+ /*
+ * it seems that requests for less than dev->bulk_in_size
* are not accepted
*/
rv = skel_do_read_io(dev, dev->bulk_in_size);
@@ -1496,7 +1500,8 @@ static ssize_t skel_do_read(struct usb_skel *dev, char *buffer, size_t count)
* data is available - chunk tells us how much shall be copied
*/
- /* Condition dev->bulk_in_copied > 0 maybe will never happen. In case,
+ /*
+ * Condition dev->bulk_in_copied > 0 maybe will never happen. In case,
* signal the event and copy using the original procedure, i.e., copy
* first two bytes also
*/
@@ -1551,7 +1556,7 @@ static ssize_t skel_do_read(struct usb_skel *dev, char *buffer, size_t count)
}
/*
- * write functions
+ * write functions
*/
static void skel_write_bulk_callback(struct urb *urb)
@@ -1581,7 +1586,7 @@ static void skel_write_bulk_callback(struct urb *urb)
}
/*
- * skel_do_write() - write operations from lpvo_usb_gpib
+ * skel_do_write() - write operations from lpvo_usb_gpib
*/
static ssize_t skel_do_write(struct usb_skel *dev, const char *buffer, size_t count)
@@ -1686,7 +1691,7 @@ static ssize_t skel_do_write(struct usb_skel *dev, const char *buffer, size_t co
}
/*
- * services for the user space devices
+ * services for the user space devices
*/
#if USER_DEVICE /* conditional compilation of user space device */
@@ -1771,7 +1776,7 @@ static int skel_release(struct inode *inode, struct file *file)
}
/*
- * user space access to read function
+ * user space access to read function
*/
static ssize_t skel_read(struct file *file, char __user *buffer, size_t count,
@@ -1800,7 +1805,7 @@ static ssize_t skel_read(struct file *file, char __user *buffer, size_t count,
}
/*
- * user space access to write function
+ * user space access to write function
*/
static ssize_t skel_write(struct file *file, const char __user *user_buffer,
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 12/16] staging: gpib: nec7210: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (10 preceding siblings ...)
2025-04-12 6:48 ` [PATCH 11/16] staging: gpib: lpvo_usb_gpib: " Paul Retourné
@ 2025-04-12 6:49 ` Paul Retourné
2025-04-12 7:07 ` [PATCH 13/16] staging: gpib: ni_usb: " Paul Retourné
` (4 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 6:49 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/nec7210/nec7210.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/gpib/nec7210/nec7210.c b/drivers/staging/gpib/nec7210/nec7210.c
index 846c0a3fa1dc..eaa37f916b0b 100644
--- a/drivers/staging/gpib/nec7210/nec7210.c
+++ b/drivers/staging/gpib/nec7210/nec7210.c
@@ -79,7 +79,8 @@ void nec7210_parallel_poll_response(struct gpib_board *board, struct nec7210_pri
write_byte(priv, AUX_CPPF, AUXMR);
}
EXPORT_SYMBOL(nec7210_parallel_poll_response);
-/* This is really only adequate for chips that do a 488.2 style reqt/reqf
+/*
+ * This is really only adequate for chips that do a 488.2 style reqt/reqf
* based on bit 6 of the SPMR (see chapter 11.3.3 of 488.2). For simpler chips that simply
* set rsv directly based on bit 6, we either need to do more hardware setup to expose
* the 488.2 capability (for example with NI chips), or we need to implement the
@@ -202,7 +203,8 @@ unsigned int nec7210_update_status_nolock(struct gpib_board *board, struct nec72
set_bit(SPOLL_NUM, &board->status);
}
- /* we rely on the interrupt handler to set the
+ /*
+ * we rely on the interrupt handler to set the
* rest of the status bits
*/
@@ -482,7 +484,8 @@ static int pio_read(struct gpib_board *board, struct nec7210_priv *priv, uint8_t
}
if (test_bit(READ_READY_BN, &priv->state)) {
if (*bytes_read == 0) {
- /* We set the handshake mode here because we know
+ /*
+ * We set the handshake mode here because we know
* no new bytes will arrive (it has already arrived
* and is awaiting being read out of the chip) while we are changing
* modes. This ensures we can reliably keep track
@@ -662,7 +665,8 @@ static int pio_write(struct gpib_board *board, struct nec7210_priv *priv, uint8_
if (retval == -EIO) {
/* resend last byte on bus error */
*bytes_written = last_count;
- /* we can get unrecoverable bus errors,
+ /*
+ * we can get unrecoverable bus errors,
* so give up after a while
*/
bus_error_count++;
@@ -805,7 +809,8 @@ int nec7210_write(struct gpib_board *board, struct nec7210_priv *priv,
if (send_eoi) {
size_t num_bytes;
- /* We need to wait to make sure we will immediately be able to write the data byte
+ /*
+ * We need to wait to make sure we will immediately be able to write the data byte
* into the chip before sending the associated AUX_SEOI command. This is really
* only needed for length==1 since otherwise the earlier calls to pio_write
* will have dont the wait already.
@@ -827,7 +832,7 @@ int nec7210_write(struct gpib_board *board, struct nec7210_priv *priv,
EXPORT_SYMBOL(nec7210_write);
/*
- * interrupt service routine
+ * interrupt service routine
*/
irqreturn_t nec7210_interrupt(struct gpib_board *board, struct nec7210_priv *priv)
{
@@ -1021,7 +1026,8 @@ EXPORT_SYMBOL(nec7210_ioport_read_byte);
void nec7210_ioport_write_byte(struct nec7210_priv *priv, uint8_t data, unsigned int register_num)
{
if (register_num == AUXMR)
- /* locking makes absolutely sure noone accesses the
+ /*
+ * locking makes absolutely sure noone accesses the
* AUXMR register faster than once per microsecond
*/
nec7210_locking_ioport_write_byte(priv, data, register_num);
@@ -1066,7 +1072,8 @@ EXPORT_SYMBOL(nec7210_iomem_read_byte);
void nec7210_iomem_write_byte(struct nec7210_priv *priv, uint8_t data, unsigned int register_num)
{
if (register_num == AUXMR)
- /* locking makes absolutely sure noone accesses the
+ /*
+ * locking makes absolutely sure noone accesses the
* AUXMR register faster than once per microsecond
*/
nec7210_locking_iomem_write_byte(priv, data, register_num);
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 13/16] staging: gpib: ni_usb: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (11 preceding siblings ...)
2025-04-12 6:49 ` [PATCH 12/16] staging: gpib: nec7210: " Paul Retourné
@ 2025-04-12 7:07 ` Paul Retourné
2025-04-12 7:48 ` [PATCH 14/16] staging: gpib: pc2: " Paul Retourné
` (3 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 7:07 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 40 +++++++++++++++--------
drivers/staging/gpib/ni_usb/ni_usb_gpib.h | 32 +++++++++++-------
2 files changed, 47 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
index 9f1b9927f025..62735a0cb4ec 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
@@ -74,7 +74,8 @@ static unsigned short ni_usb_timeout_code(unsigned int usec)
return 0xff;
else if (usec <= 300000000)
return 0x01;
- /* NI driver actually uses 0xff for timeout T1000s, which is a bug in their code.
+ /*
+ * NI driver actually uses 0xff for timeout T1000s, which is a bug in their code.
* I've verified on a usb-b that a code of 0x2 is correct for a 1000 sec timeout
*/
else if (usec <= 1000000000)
@@ -232,7 +233,8 @@ static int ni_usb_nonblocking_receive_bulk_msg(struct ni_usb_priv *ni_priv,
mutex_unlock(&ni_priv->bulk_transfer_lock);
if (interruptible) {
if (wait_for_completion_interruptible(&context->complete)) {
- /* If we got interrupted by a signal while
+ /*
+ * If we got interrupted by a signal while
* waiting for the usb gpib to respond, we
* should send a stop command so it will
* finish up with whatever it was doing and
@@ -240,8 +242,9 @@ static int ni_usb_nonblocking_receive_bulk_msg(struct ni_usb_priv *ni_priv,
*/
ni_usb_stop(ni_priv);
retval = -ERESTARTSYS;
- /* now do an uninterruptible wait, it shouldn't take long
- * for the board to respond now.
+ /*
+ * now do an uninterruptible wait, it shouldn't take long
+ * for the board to respond now.
*/
wait_for_completion(&context->complete);
}
@@ -684,7 +687,8 @@ static int ni_usb_read(struct gpib_board *board, uint8_t *buffer, size_t length,
retval = 0;
break;
case NIUSB_ABORTED_ERROR:
- /* this is expected if ni_usb_receive_bulk_msg got
+ /*
+ * this is expected if ni_usb_receive_bulk_msg got
* interrupted by a signal and returned -ERESTARTSYS
*/
break;
@@ -794,7 +798,8 @@ static int ni_usb_write(struct gpib_board *board, uint8_t *buffer, size_t length
retval = 0;
break;
case NIUSB_ABORTED_ERROR:
- /* this is expected if ni_usb_receive_bulk_msg got
+ /*
+ * this is expected if ni_usb_receive_bulk_msg got
* interrupted by a signal and returned -ERESTARTSYS
*/
break;
@@ -893,7 +898,8 @@ static int ni_usb_command_chunk(struct gpib_board *board, uint8_t *buffer, size_
case NIUSB_NO_ERROR:
break;
case NIUSB_ABORTED_ERROR:
- /* this is expected if ni_usb_receive_bulk_msg got
+ /*
+ * this is expected if ni_usb_receive_bulk_msg got
* interrupted by a signal and returned -ERESTARTSYS
*/
break;
@@ -1192,8 +1198,9 @@ static int ni_usb_enable_eos(struct gpib_board *board, uint8_t eos_byte, int com
static void ni_usb_disable_eos(struct gpib_board *board)
{
struct ni_usb_priv *ni_priv = board->private_data;
- /* adapter gets unhappy if you don't zero all the bits
- * for the eos mode and eos char (returns error 4 on reads).
+ /*
+ * adapter gets unhappy if you don't zero all the bits
+ * for the eos mode and eos char (returns error 4 on reads).
*/
ni_priv->eos_mode = 0;
ni_priv->eos_char = 0;
@@ -2045,8 +2052,10 @@ static int ni_usb_hs_wait_for_ready(struct ni_usb_priv *ni_priv)
unexpected = 1;
}
++j;
- // MC usb-488 (and sometimes NI-USB-HS?) sends 0x8 here; MC usb-488A sends 0x7 here
- // NI-USB-HS+ sends 0x0
+ /*
+ * MC usb-488 (and sometimes NI-USB-HS?) sends 0x8 here; MC usb-488A sends 0x7 here
+ * NI-USB-HS+ sends 0x0
+ */
if (buffer[j] != 0x1 && buffer[j] != 0x8 && buffer[j] != 0x7 && buffer[j] != 0x0) {
// [3]
dev_err(&usb_dev->dev, "unexpected data: buffer[%i]=0x%x, expected 0x0, 0x1, 0x7 or 0x8\n",
@@ -2127,7 +2136,8 @@ static int ni_usb_hs_wait_for_ready(struct ni_usb_priv *ni_priv)
return retval;
}
-/* This does some extra init for HS+ models, as observed on Windows. One of the
+/*
+ * This does some extra init for HS+ models, as observed on Windows. One of the
* control requests causes the LED to stop blinking.
* I'm not sure what the other 2 requests do. None of these requests are actually required
* for the adapter to work, maybe they do some init for the analyzer interface
@@ -2343,8 +2353,10 @@ static void ni_usb_detach(struct gpib_board *board)
struct ni_usb_priv *ni_priv;
mutex_lock(&ni_usb_hotplug_lock);
-// under windows, software unplug does chip_reset nec7210 aux command,
-// then writes 0x0 to address 0x10 of device 3
+ /*
+ * under windows, software unplug does chip_reset nec7210 aux command,
+ * then writes 0x0 to address 0x10 of device 3
+ */
ni_priv = board->private_data;
if (ni_priv) {
if (ni_priv->bus_interface) {
diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.h b/drivers/staging/gpib/ni_usb/ni_usb_gpib.h
index 4b297db09a9b..b011e131201c 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.h
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.h
@@ -113,27 +113,37 @@ enum ni_usb_bulk_ids {
enum ni_usb_error_codes {
NIUSB_NO_ERROR = 0,
- /* NIUSB_ABORTED_ERROR occurs when I/O is interrupted early by
- * doing a NI_USB_STOP_REQUEST on the control endpoint.
+ /*
+ * NIUSB_ABORTED_ERROR occurs when I/O is interrupted early by
+ * doing a NI_USB_STOP_REQUEST on the control endpoint.
*/
NIUSB_ABORTED_ERROR = 1,
- // NIUSB_READ_ATN_ERROR occurs when you do a board read while
- // ATN is set
+ /*
+ * NIUSB_READ_ATN_ERROR occurs when you do a board read while
+ * ATN is set
+ */
NIUSB_ATN_STATE_ERROR = 2,
- // NIUSB_ADDRESSING_ERROR occurs when you do a board
- // read/write as CIC but are not in LACS/TACS
+ /*
+ * NIUSB_ADDRESSING_ERROR occurs when you do a board
+ * read/write as CIC but are not in LACS/TACS
+ */
NIUSB_ADDRESSING_ERROR = 3,
- /* NIUSB_EOSMODE_ERROR occurs on reads if any eos mode or char
+ /*
+ * NIUSB_EOSMODE_ERROR occurs on reads if any eos mode or char
* bits are set when REOS is not set.
* Have also seen error 4 if you try to send more than 16
* command bytes at once on a usb-b.
*/
NIUSB_EOSMODE_ERROR = 4,
- // NIUSB_NO_BUS_ERROR occurs when you try to write a command
- // byte but there are no devices connected to the gpib bus
+ /*
+ * NIUSB_NO_BUS_ERROR occurs when you try to write a command
+ * byte but there are no devices connected to the gpib bus
+ */
NIUSB_NO_BUS_ERROR = 5,
- // NIUSB_NO_LISTENER_ERROR occurs when you do a board write as
- // CIC with no listener
+ /*
+ * NIUSB_NO_LISTENER_ERROR occurs when you do a board write as
+ * CIC with no listener
+ */
NIUSB_NO_LISTENER_ERROR = 8,
// get NIUSB_TIMEOUT_ERROR on board read/write timeout
NIUSB_TIMEOUT_ERROR = 10,
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 14/16] staging: gpib: pc2: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (12 preceding siblings ...)
2025-04-12 7:07 ` [PATCH 13/16] staging: gpib: ni_usb: " Paul Retourné
@ 2025-04-12 7:48 ` Paul Retourné
2025-04-12 18:09 ` [PATCH 15/16] staging: gpib: tms9914: " Paul Retourné
` (2 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 7:48 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/pc2/pc2_gpib.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/pc2/pc2_gpib.c b/drivers/staging/gpib/pc2/pc2_gpib.c
index 96d3c09f2273..d93502a833bf 100644
--- a/drivers/staging/gpib/pc2/pc2_gpib.c
+++ b/drivers/staging/gpib/pc2/pc2_gpib.c
@@ -267,8 +267,9 @@ static int pc2_generic_attach(struct gpib_board *board, const gpib_board_config_
nec_priv->type = chipset;
#ifndef PC2_DMA
- /* board->dev hasn't been initialized, so forget about DMA until this driver
- * is adapted to use isa_register_driver.
+ /*
+ * board->dev hasn't been initialized, so forget about DMA until this driver
+ * 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*
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 15/16] staging: gpib: tms9914: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (13 preceding siblings ...)
2025-04-12 7:48 ` [PATCH 14/16] staging: gpib: pc2: " Paul Retourné
@ 2025-04-12 18:09 ` Paul Retourné
2025-04-12 18:10 ` [PATCH 16/16] staging: gpib: tnt4882: " Paul Retourné
2025-04-15 14:50 ` [PATCH 00/16] staging: gpib: " Greg KH
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 18:09 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/tms9914/tms9914.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/gpib/tms9914/tms9914.c b/drivers/staging/gpib/tms9914/tms9914.c
index 2abda9d7dfcb..edbd8ea8967c 100644
--- a/drivers/staging/gpib/tms9914/tms9914.c
+++ b/drivers/staging/gpib/tms9914/tms9914.c
@@ -53,7 +53,8 @@ int tms9914_take_control(struct gpib_board *board, struct tms9914_priv *priv, in
}
EXPORT_SYMBOL_GPL(tms9914_take_control);
-/* The agilent 82350B has a buggy implementation of tcs which interferes with the
+/*
+ * The agilent 82350B has a buggy implementation of tcs which interferes with the
* operation of tca. It appears to be based on the controller state machine
* described in the TI 9900 TMS9914A data manual published in 1982. This
* manual describes tcs as putting the controller into a CWAS
@@ -321,7 +322,8 @@ static void update_talker_state(struct tms9914_priv *priv, unsigned int address_
if (address_status_bits & HR_ATN)
priv->talker_state = talker_addressed;
else
- /* this could also be serial_poll_active, but the tms9914 provides no
+ /*
+ * this could also be serial_poll_active, but the tms9914 provides no
* way to distinguish, so we'll assume talker_active
*/
priv->talker_state = talker_active;
@@ -738,7 +740,8 @@ irqreturn_t tms9914_interrupt_have_status(struct gpib_board *board, struct tms99
switch (command_byte) {
case PPConfig:
priv->ppoll_configure_state = 1;
- /* AUX_PTS generates another UNC interrupt on the next command byte
+ /*
+ * AUX_PTS generates another UNC interrupt on the next command byte
* if it is in the secondary address group (such as PPE and PPD).
*/
write_byte(priv, AUX_PTS, AUXCR);
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 16/16] staging: gpib: tnt4882: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (14 preceding siblings ...)
2025-04-12 18:09 ` [PATCH 15/16] staging: gpib: tms9914: " Paul Retourné
@ 2025-04-12 18:10 ` Paul Retourné
2025-04-15 14:50 ` [PATCH 00/16] staging: gpib: " Greg KH
16 siblings, 0 replies; 19+ messages in thread
From: Paul Retourné @ 2025-04-12 18:10 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: Paul Retourné, linux-staging, linux-kernel
Fixes the style of multiline comments to comply with the linux kernel
coding style.
Signed-off-by: Paul Retourné <paul.retourne@orange.fr>
---
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 32 ++++++++++++---------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index c35b084b6fd0..51ddade6819a 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -258,7 +258,8 @@ static void tnt4882_release_holdoff(struct gpib_board *board, struct tnt4882_pri
sasr_bits = tnt_readb(tnt_priv, SASR);
- /*tnt4882 not in one-chip mode won't always release holdoff unless we
+ /*
+ * tnt4882 not in one-chip mode won't always release holdoff unless we
* are in the right mode when release handshake command is given
*/
if (sasr_bits & AEHS_BIT) /* holding off due to holdoff on end mode*/ {
@@ -384,7 +385,8 @@ static int tnt4882_accel_read(struct gpib_board *board, uint8_t *buffer, size_t
nec7210_set_reg_bits(nec_priv, IMR1, HR_ENDIE, 0);
nec7210_set_reg_bits(nec_priv, IMR2, HR_DMAI, 0);
- /* force handling of any pending interrupts (seems to be needed
+ /*
+ * force handling of any pending interrupts (seems to be needed
* to keep interrupts from getting hosed, plus for syncing
* with RECEIVED_END below)
*/
@@ -531,7 +533,8 @@ static int generic_write(struct gpib_board *board, uint8_t *buffer, size_t lengt
nec7210_set_reg_bits(nec_priv, IMR1, HR_ERR, 0x0);
nec7210_set_reg_bits(nec_priv, IMR2, HR_DMAO, 0x0);
- /* force handling of any interrupts that happened
+ /*
+ * force handling of any interrupts that happened
* while they were masked (this appears to be needed)
*/
tnt4882_internal_interrupt(board);
@@ -760,7 +763,8 @@ static void tnt4882_parallel_poll_response(struct gpib_board *board, int ist)
nec7210_parallel_poll_response(board, &priv->nec7210_priv, ist);
}
-/* this is just used by the old nec7210 isa interfaces, the newer
+/*
+ * this is just used by the old nec7210 isa interfaces, the newer
* boards use tnt4882_serial_poll_response2
*/
static void tnt4882_serial_poll_response(struct gpib_board *board, uint8_t status)
@@ -788,7 +792,8 @@ static void tnt4882_serial_poll_response2(struct gpib_board *board, uint8_t stat
priv->nec7210_priv.srq_pending = 0;
}
if (reqt)
- /* It may seem like a race to issue reqt before updating
+ /*
+ * It may seem like a race to issue reqt before updating
* the status byte, but it is not. The chip does not
* issue the reqt until the SPMR is written to at
* a later time.
@@ -796,7 +801,8 @@ static void tnt4882_serial_poll_response2(struct gpib_board *board, uint8_t stat
write_byte(&priv->nec7210_priv, AUX_REQT, AUXMR);
else if (reqf)
write_byte(&priv->nec7210_priv, AUX_REQF, AUXMR);
- /* We need to always zero bit 6 of the status byte before writing it to
+ /*
+ * We need to always zero bit 6 of the status byte before writing it to
* the SPMR to insure we are using
* serial poll mode SP1, and not accidentally triggering mode SP3.
*/
@@ -1581,10 +1587,10 @@ static int ni_gpib_probe(struct pcmcia_device *link)
}
/*
- * This deletes a driver "instance". The device is de-registered
- * with Card Services. If it has been released, all local data
- * structures are freed. Otherwise, the structures will be freed
- * when the device is released.
+ * This deletes a driver "instance". The device is de-registered
+ * with Card Services. If it has been released, all local data
+ * structures are freed. Otherwise, the structures will be freed
+ * when the device is released.
*/
static void ni_gpib_remove(struct pcmcia_device *link)
{
@@ -1611,9 +1617,9 @@ static int ni_gpib_config_iteration(struct pcmcia_device *link, void *priv_data)
}
/*
- * ni_gpib_config() is scheduled to run after a CARD_INSERTION event
- * is received, to configure the PCMCIA socket, and to make the
- * device available to the system.
+ * ni_gpib_config() is scheduled to run after a CARD_INSERTION event
+ * is received, to configure the PCMCIA socket, and to make the
+ * device available to the system.
*/
static int ni_gpib_config(struct pcmcia_device *link)
{
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 00/16] staging: gpib: fixes multiline comments style
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
` (15 preceding siblings ...)
2025-04-12 18:10 ` [PATCH 16/16] staging: gpib: tnt4882: " Paul Retourné
@ 2025-04-15 14:50 ` Greg KH
2025-04-15 21:38 ` Paul Retourne
16 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2025-04-15 14:50 UTC (permalink / raw)
To: Paul Retourné; +Cc: dpenkler, dan.carpenter, linux-staging, linux-kernel
On Fri, Apr 11, 2025 at 11:21:52PM -0700, Paul Retourné wrote:
> Fixes the style of multiline comments to comply with the linux kernel
> coding style as requested in the gpib TODO file.
>
> Paul Retourné (16):
> staging: gpib: agilent_82357a: fixes multiline comments style
> staging: gpib: cb7210: fixes multiline comments style
> staging: gpib: common: fixes multiline comments style
> staging: gpib: eastwood: fixes multiline comments style
> staging: gpib: fmh_gpib: fixes multiline comments style
> staging: gpib: gpio: fixes multiline comments style
> staging: gpib: hp_82335: fixes multiline comments style
> staging: gpib: hp_82341: fixes multiline comments style
> staging: gpib: include: fixes multiline comments style
> staging: gpib: ines: fixes multiline comments style
> staging: gpib: lpvo_usb_gpib: fixes multiline comments style
> staging: gpib: nec7210: fixes multiline comments style
> staging: gpib: ni_usb: fixes multiline comments style
> staging: gpib: pc2: fixes multiline comments style
> staging: gpib: tms9914: fixes multiline comments style
> staging: gpib: tnt4882: fixes multiline comments style
One of these did not apply to my tree, can you rebase and resend the
remaining one?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 00/16] staging: gpib: fixes multiline comments style
2025-04-15 14:50 ` [PATCH 00/16] staging: gpib: " Greg KH
@ 2025-04-15 21:38 ` Paul Retourne
0 siblings, 0 replies; 19+ messages in thread
From: Paul Retourne @ 2025-04-15 21:38 UTC (permalink / raw)
To: Greg KH; +Cc: dpenkler, dan.carpenter, linux-staging, linux-kernel
On 4/15/25 07:50, Greg KH wrote:
> On Fri, Apr 11, 2025 at 11:21:52PM -0700, Paul Retourné wrote:
>> Fixes the style of multiline comments to comply with the linux kernel
>> coding style as requested in the gpib TODO file.
>>
>> Paul Retourné (16):
>> staging: gpib: agilent_82357a: fixes multiline comments style
>> staging: gpib: cb7210: fixes multiline comments style
>> staging: gpib: common: fixes multiline comments style
>> staging: gpib: eastwood: fixes multiline comments style
>> staging: gpib: fmh_gpib: fixes multiline comments style
>> staging: gpib: gpio: fixes multiline comments style
>> staging: gpib: hp_82335: fixes multiline comments style
>> staging: gpib: hp_82341: fixes multiline comments style
>> staging: gpib: include: fixes multiline comments style
>> staging: gpib: ines: fixes multiline comments style
>> staging: gpib: lpvo_usb_gpib: fixes multiline comments style
>> staging: gpib: nec7210: fixes multiline comments style
>> staging: gpib: ni_usb: fixes multiline comments style
>> staging: gpib: pc2: fixes multiline comments style
>> staging: gpib: tms9914: fixes multiline comments style
>> staging: gpib: tnt4882: fixes multiline comments style
> One of these did not apply to my tree, can you rebase and resend the
> remaining one?
>
> thanks,
>
> greg k-h
Will do, thank you for looking at it,
Paul Retourné
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-04-15 21:38 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 6:21 [PATCH 00/16] staging: gpib: fixes multiline comments style Paul Retourné
2025-04-12 6:21 ` [PATCH 01/16] staging: gpib: agilent_82357a: " Paul Retourné
2025-04-12 6:21 ` [PATCH 02/16] staging: gpib: cb7210: " Paul Retourné
2025-04-12 6:21 ` [PATCH 03/16] staging: gpib: common: " Paul Retourné
2025-04-12 6:21 ` [PATCH 04/16] staging: gpib: eastwood: " Paul Retourné
2025-04-12 6:31 ` [PATCH 05/16] staging: gpib: fmh_gpib: " Paul Retourné
2025-04-12 6:34 ` [PATCH 06/16] staging: gpib: gpio: " Paul Retourné
2025-04-12 6:37 ` [PATCH 07/16] staging: gpib: hp_82335: " Paul Retourné
2025-04-12 6:42 ` [PATCH 08/16] staging: gpib: hp_82341: " Paul Retourné
2025-04-12 6:45 ` [PATCH 09/16] staging: gpib: include: " Paul Retourné
2025-04-12 6:47 ` [PATCH 10/16] staging: gpib: ines: " Paul Retourné
2025-04-12 6:48 ` [PATCH 11/16] staging: gpib: lpvo_usb_gpib: " Paul Retourné
2025-04-12 6:49 ` [PATCH 12/16] staging: gpib: nec7210: " Paul Retourné
2025-04-12 7:07 ` [PATCH 13/16] staging: gpib: ni_usb: " Paul Retourné
2025-04-12 7:48 ` [PATCH 14/16] staging: gpib: pc2: " Paul Retourné
2025-04-12 18:09 ` [PATCH 15/16] staging: gpib: tms9914: " Paul Retourné
2025-04-12 18:10 ` [PATCH 16/16] staging: gpib: tnt4882: " Paul Retourné
2025-04-15 14:50 ` [PATCH 00/16] staging: gpib: " Greg KH
2025-04-15 21:38 ` Paul Retourne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox