On Sun, Jul 24, 2022 at 01:06:16AM +0800, Zhou Yanjie wrote:
On 2022/7/23 上午2:38, Mark Brown wrote:The above comment block uses both C /* */ and C++ // style comments,
I'm sorry, I didn't understand well what you meant :(+++ b/drivers/spi/spi-ingenic-sfc.cPlease make the entire comment a C++ one so things look more
@@ -0,0 +1,662 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Ingenic SoCs SPI Flash Controller Driver
intentional.
Could you please explain a little more detail?
please make it just use the C++ style.
Even if the device is not shared is there no possibility that theThis interrupt is exclusively owned by SFC, do we still+static irqreturn_t ingenic_sfc_irq_handler(int irq, void *data)This doesn't pay any attention to any status registers in the chip so
+{
+ struct ingenic_sfc *sfc = data;
+
+ writel(0x1f, sfc->base + SFC_REG_INTC);
+
+ complete(&sfc->completion);
+
+ return IRQ_HANDLED;
+}
won't work if the interrupt is shared and won't notice any error reports
from the device...
need to perform the operation you said? I haven't done
these operations before because I want to minimize the
overhead and avoid affecting performance.
device can report an unexpected interrupt status? It's not just
the sharing case, it's also the fact that it looks like there's a
status being reported but we're not checking it so if anything
goes wrong then we're less likely to notice. I'd worry about
data corruption.