Thread (21 messages) 21 messages, 2 authors, 2023-12-01

Re: [PATCH 15/17] soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-11-29 14:03:32
Also in: alsa-devel, linux-arm-kernel, lkml

On Tue, Nov 28, 2023, at 15:08, Herve Codina wrote:
quoted hunk ↗ jump to hunk
@@ -272,6 +274,8 @@ int qmc_chan_get_info(struct qmc_chan *chan, struct 
qmc_chan_info *info)
 	if (ret)
 		return ret;

+	spin_lock_irqsave(&chan->ts_lock, flags);
+
 	info->mode = chan->mode;
 	info->rx_fs_rate = tsa_info.rx_fs_rate;
 	info->rx_bit_rate = tsa_info.rx_bit_rate;
@@ -280,6 +284,8 @@ int qmc_chan_get_info(struct qmc_chan *chan, struct 
qmc_chan_info *info)
 	info->tx_bit_rate = tsa_info.tx_bit_rate;
 	info->nb_rx_ts = hweight64(chan->rx_ts_mask);

+	spin_unlock_irqrestore(&chan->ts_lock, flags);
+
 	return 0;
 }
I would normally use spin_lock_irq() instead of spin_lock_irqsave()
in functions that are only called outside of atomic context.
+static int qmc_chan_start_rx(struct qmc_chan *chan);
+
 int qmc_chan_stop(struct qmc_chan *chan, int direction)
 {
... 
-static void qmc_chan_start_rx(struct qmc_chan *chan)
+static int qmc_setup_chan_trnsync(struct qmc *qmc, struct qmc_chan *chan);
+
+static int qmc_chan_start_rx(struct qmc_chan *chan)
 {
Can you reorder the static functions in a way that avoids the
forward declarations?

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help