From nobody Tue Feb 10 03:55:56 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAFBE35EDC7 for ; Thu, 15 Jan 2026 09:25:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768469147; cv=none; b=mpGoywEoUq9fO0XIdF05xD4Kj5ObE0o4hSAx7++gEzNhGoZ5DtDLKhoWi4mPhyg/CtExid4AxdATwIigfIdlbJ221XDV/X3Nz1wBttnGH3sJXg4d8jxZ8TrSi8RuMwXYyhHN5jS4tqyPMmFFGiaIKBenCYuxklxUFMeET4DwzvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768469147; c=relaxed/simple; bh=r4xsrvUEkrisBm830uVOi5LF7CumvVgNOo2uu+EAufY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OT0jQgz4k7bIxx7Qwh7KBZQ2J3NJhJPY9guHI4tQqHy+1iRgnChLmJh2leBnyy2xnSd3owlLOovJLjhNee0XQYZ9xF/6+LYMurHjrWc498f6SvcpJaZvbGlJksA0TzaIgW7BEQNiZsMV17nJBlm3/g7Al75eKvKY3AWIdz5nr7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=EbrZSyQK; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="EbrZSyQK" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id B30994E420FF; Thu, 15 Jan 2026 09:25:38 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 8913C606B6; Thu, 15 Jan 2026 09:25:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A922710B68530; Thu, 15 Jan 2026 10:25:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768469137; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=gltgqZxplCK6T7f5+zOiN0+WD5c1Yq1xx9kIlIzwwZA=; b=EbrZSyQKJUUTB5NptiNKVCUwI7JbCfuXCDSqTCUozcFI3T5j2UrOTsmyVkgOEPo/n7zw8q Q6ovswpKZ3Q/l2UNgF/GaCeA6AS12yaf2EJ1crWjCzBRbJsSBbMa4RK5DIF8mVbzyAsOl1 9Nn3vzMCVqQfCSos34PzHlwObu62D8CULhpT3ji1ZL7oZG40ffCdknBVTmoRVeuwFMqvkp lnlYx2ctKUjO53L3IwfwUAsRFZmeemQoWYO0eLH+K/Krb877qTO2GNR1w8OqA2bSZTBXVp 3L2MRb1AjlD4JizkrcZBOay9/GPNsN436/Fi/k1d9KCx8kibaNede0IKmQiuRQ== From: "Miquel Raynal (Schneider Electric)" Date: Thu, 15 Jan 2026 10:24:54 +0100 Subject: [PATCH v2 03/13] spi: cadence-qspi: Fix style and improve readability Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260115-schneider-6-19-rc1-qspi-v2-3-7e6a06e1e17b@bootlin.com> References: <20260115-schneider-6-19-rc1-qspi-v2-0-7e6a06e1e17b@bootlin.com> In-Reply-To: <20260115-schneider-6-19-rc1-qspi-v2-0-7e6a06e1e17b@bootlin.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Vaishnav Achath Cc: Thomas Petazzoni , =?utf-8?q?Herv=C3=A9_Codina?= , Wolfram Sang , Vignesh Raghavendra , Santhosh Kumar K , Pratyush Yadav , Pascal Eberhard , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, "Miquel Raynal (Schneider Electric)" X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 It took me several seconds to correctly understand this block. I understand the goal: showing that we are in the if, or in one of the two other cases. Improve the organization of the code to both improve readability and fix the style. Suggested-by: Pratyush Yadav Signed-off-by: Miquel Raynal (Schneider Electric) --- drivers/spi/spi-cadence-quadspi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-qu= adspi.c index cc28da7fc686..c0a507953c58 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -374,17 +374,12 @@ static irqreturn_t cqspi_irq_handler(int this_irq, vo= id *dev) /* Clear interrupt */ writel(irq_status, cqspi->iobase + CQSPI_REG_IRQSTATUS); =20 - if (cqspi->use_dma_read && ddata && ddata->get_dma_status) { - if (ddata->get_dma_status(cqspi)) { - complete(&cqspi->transfer_complete); - return IRQ_HANDLED; - } - } - - else if (!cqspi->slow_sram) - irq_status &=3D CQSPI_IRQ_MASK_RD | CQSPI_IRQ_MASK_WR; - else + if (cqspi->use_dma_read && ddata && ddata->get_dma_status) + irq_status =3D ddata->get_dma_status(cqspi); + else if (cqspi->slow_sram) irq_status &=3D CQSPI_IRQ_MASK_RD_SLOW_SRAM | CQSPI_IRQ_MASK_WR; + else + irq_status &=3D CQSPI_IRQ_MASK_RD | CQSPI_IRQ_MASK_WR; =20 if (irq_status) complete(&cqspi->transfer_complete); --=20 2.51.1