diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2026-10-13 11:59:24 +0200 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-13 22:48:51 -0400 |
| commit | fb20fe062b008eba371c5265440b6bbad5690405 (patch) | |
| tree | 66bdd835a2d6d554942d432b86d3db473e108f21 | |
| parent | e7d41f493e736fdf6d1fba40f0f24e9f4bfe6337 (diff) | |
| download | linux-next-fb20fe062b008eba371c5265440b6bbad5690405.tar.gz linux-next-fb20fe062b008eba371c5265440b6bbad5690405.zip | |
scsi: ufs: ufs-qcom: Don't define variable in the middle of the code
While the C11 allows us to define variables in the code, we do not do
this style (see more at [1]). Move the declaration to the top of the
function.
Link: https://lore.kernel.org/lkml/58fd478f408a34b578ee8d949c5c4b4da4d4f41d.camel@HansenPartnership.com/ [1]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20261013095924.959455-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
| -rw-r--r-- | drivers/ufs/host/ufs-qcom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index fb5213bad4a6..fcafba9c2995 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -2438,6 +2438,7 @@ static irqreturn_t ufs_qcom_mcq_esi_handler(int irq, void *data) static int ufs_qcom_config_esi(struct ufs_hba *hba) { struct ufs_qcom_host *host = ufshcd_get_variant(hba); + struct ufs_qcom_irq *qi; int nr_irqs, ret; if (host->esi_enabled) @@ -2456,8 +2457,7 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba) return ret; /* Continue without ESI */ } - struct ufs_qcom_irq *qi = devm_kcalloc(hba->dev, nr_irqs, sizeof(*qi), GFP_KERNEL); - + qi = devm_kcalloc(hba->dev, nr_irqs, sizeof(*qi), GFP_KERNEL); if (!qi) { platform_device_msi_free_irqs_all(hba->dev); return -ENOMEM; |
