Thread (13 messages) 13 messages, 5 authors, 2022-01-27

RE: [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021

From: Lh Kuo 郭力豪 <hidden>
Date: 2022-01-20 09:12:15
Also in: linux-spi, lkml

Hi Mr. Mark Brown :

Thanks for your comment, I will modify it in next next submission
quoted
+	for (i = 0; i <= xfer_cnt; i++) {
+		mutex_lock(&pspim->buf_lock);
This lock is redundant: it is only ever held in this function which is guaranteed by the core to never be
called twice concurrently.
I will modify it in next next submission

quoted
+	ret = devm_request_irq(dev, pspim->m_irq, sp7021_spi_master_irq,
+			       IRQF_TRIGGER_RISING, pdev->name, pspim);
+	if (ret)
+		return ret;
+
+	ret = devm_request_irq(dev, pspim->s_irq, sp7021_spi_slave_irq,
+			       IRQF_TRIGGER_RISING, pdev->name, pspim);
+	if (ret)
+		return ret;
Are you sure the driver is ready to handle interrupts without any of the other resources?  Normally
interrupts are one of the last things to be requested.
I will modify it in next next submission

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