From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD4A5C624D5 for ; Tue, 1 Sep 2026 15:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p8l40k3ZP44R0vcIu/1NNrZxW/3J+jw3xWwfV2dffP0=; b=FzVFVCMONiGrEf Sm/YhbwNzaqgnSW+244j2N1jsDpV7vqSydwNb4d8FxkVggpip38emKIQjiEDT1hMng5z3ILwvubn7 K23YytCSlRtB5ESoytz+YJHDANjQZ3XQst110qNZTiUQ9Y+zqupk1r53xmIpqKKnOYNan+Nml0Ng/ jA2Mo32aqib2cSU2f+yMzyapW4kqsdtXt1m84XRXGhaKbIWLUnpi04+0cpzV2atTssX0VDVnCUoUV 9OmxaVnb/EKNeMuR0NxM39Q/nZ4M/cNEElVsxRE8jcsSxYJDgTWOyuUbXD5JvMLXLkCUsV7vwRgi/ ntwZsP9AONXugwnsRV1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1Qan-0000000CYQw-1PeF; Tue, 01 Sep 2026 15:40:09 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1QaV-0000000CXa1-2ZYK; Tue, 01 Sep 2026 15:39:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1788277188; bh=yHYnZo9thDOybBolptJrfbVmNYQ8QaDOG2QmCxd3Q+g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GU2fCD9RsYiU9hZMCjolF+iwNaEFIv5Rnh52DgFrsTaFprci5nYgwkH9xA8PgF7U/ u4gI3+9jHclDh5URPhaw3morFXY75GYBCzfNnsV2j0Au3DdV+G37E6A0xxinKpc5NE BnhpwigKD1VCytAT0gZDTOhEV1OM5bRDbe+kugL6gAQAogoiBd4cccYaP7VW3ucX6D 9hFnpoMGa8BNm3ayviNGA/eizKBVvTd2GZmLkz0tpTGpKw07rjqSFYCFDGYPySUenb 3UXKyFfdGZBMz0Iwb+bwCooWV2XT53i4ooUsQ4RpZzwwoyqUknaj2w0t3LtQYX1jZ3 ag1baM/+ZU+XQ== Received: from yukiji.home (unknown [100.64.0.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laeyraud) by bali.collaboradmins.com (Postfix) with ESMTPSA id 035E117E10BE; Tue, 01 Sep 2026 17:39:47 +0200 (CEST) From: Louis-Alexis Eyraud Date: Tue, 01 Sep 2026 17:39:10 +0200 Subject: [PATCH v11 22/24] scsi: ufs: mediatek: Remove ret local from link_startup_notify MIME-Version: 1.0 Message-Id: <20260901-mt8196-ufs-v11-22-dbd007704490@collabora.com> References: <20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com> In-Reply-To: <20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com> To: Chunfeng Yun , Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Peter Wang , Chaotian Jing , Alim Akhtar , Avri Altman , Bart Van Assche , Stanley Jhu , "James E.J. Bottomley" , Philipp Zabel , Liam Girdwood , Mark Brown , Manivannan Sadhasivam , "Martin K. Petersen" , "Martin K. Petersen" Cc: kernel@collabora.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Nicolas Frattaroli , Louis-Alexis Eyraud X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788277164; l=1411; i=louisalexis.eyraud@collabora.com; s=20250113; h=from:subject:message-id; bh=zpGKpq9Sjjpc/u30yTDEw/7TjoEnEL+HJGQ6bVDYcwU=; b=iWlT9fFLfgFjDWoVdKpsrOoZzhy2kdDfUlHuJ7CF7YbKJKp3HKMkyJT5/DvvzNm9ZhMP/pwoj IRHrCcPkD/LB5pgzzGcwJDeITYvcvZXTJLWYoss0LU3d/+aOYBIeiOC X-Developer-Key: i=louisalexis.eyraud@collabora.com; a=ed25519; pk=CHFBDB2Kqh4EHc6JIqFn69GhxJJAzc0Zr4e8QxtumuM= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260901_083951_842085_7C6B62E6 X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Nicolas Frattaroli Remove the "ret" local variable from ufs_mtk_link_startup_notify, as it's pointless; in all cases it is assigned, it is returned right after without being read first. Rework the code to just return directly, and get rid of the default branch while at it. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Peter Wang Signed-off-by: Nicolas Frattaroli Signed-off-by: Louis-Alexis Eyraud --- drivers/ufs/host/ufs-mediatek.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 4782fdf54866..bcde58e3aee8 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -1543,21 +1543,15 @@ static void ufs_mtk_post_link(struct ufs_hba *hba) static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, enum ufs_notify_change_status stage) { - int ret = 0; - switch (stage) { case PRE_CHANGE: - ret = ufs_mtk_pre_link(hba); - break; + return ufs_mtk_pre_link(hba); case POST_CHANGE: ufs_mtk_post_link(hba); - break; - default: - ret = -EINVAL; - break; + return 0; } - return ret; + return -EINVAL; } static int ufs_mtk_device_reset(struct ufs_hba *hba) -- 2.55.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy