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 9FFC1CCF2C1 for ; Fri, 16 Oct 2026 12:34:33 +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=1vgB3gVOPs9tV6dRjtisdyiF2MbZfbBFkTVFdtSpwE0=; b=vYO7WOnu1MxXNq 9gZdhb0agSXlCplsQwowu8CJNPn9Livv2NQDZyVzPsdTfJPPkJOcAlktV9Z9wgX4V6xmJcxiOYznQ A127GrHbHEnX/6SftIzpvTuPjeUMWnmK7asaKTj83I58bAkeWVRfuWI867UNZw0heTEulpwcSpfH5 kI9aIGpRzW+q4uP5PsH5QY2SJCkk1n0C1ENYcWql2zU1wMoivCbzDc7Zcjlidrsjqji9rJRn5bwM5 w0h00aQ5uUkutQoh6j++vpD4RCvsder/npUauMkl5FJKdFpacK0KtOIG20MHmCBJvOo9mRTq2+hZu 7PzG99WwMRjggIrox7Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHh8r-00000002uqM-1KdF; Fri, 16 Oct 2026 12:34:33 +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 1xHh8G-00000002tSt-0Gju; Fri, 16 Oct 2026 12:33:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1792154033; bh=qhQj/W2FGJgVcnuSv1mvjlMbghrB/T2Td5HFXiF2ezE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DL4VM8+kOY+LyeNE5p3YtmDgtVcJYebF0pxR9sO6X0yH+ttFb1xfO4McJhRUU4pBx /dEPhem1bT6/ysaR8FKPKsTo7W9hpBuO7sJTLlwGuXSO5x8qMaViUWXdqac2DXcBRs NnrG7hkT5zTKADJ8tKGLyaFDvPysb6iZDvXujl5F+9bzx6u/pen6lE8+Dm1fdhJfkl YmM3fLmSOjCirCCoH+Kq0EzqrrzAMDboQ9BTJZV56DES8zRCNHWBPh7a5Tgw2/7do6 EAa++Bq9SUoJMQiTpPRa4IEo7+J44ZjPsdAQQfSs/dESLnkp2vkAuRNiEHCCzj99sU hjcWzj7WidOGA== 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 EA91D17E12B9; Fri, 16 Oct 2026 14:33:52 +0200 (CEST) From: Louis-Alexis Eyraud Date: Fri, 16 Oct 2026 14:33:13 +0200 Subject: [PATCH v14 21/23] scsi: ufs: mediatek: Remove ret local from link_startup_notify MIME-Version: 1.0 Message-Id: <20261016-mt8196-ufs-v14-21-e8d565e0cd45@collabora.com> References: <20261016-mt8196-ufs-v14-0-e8d565e0cd45@collabora.com> In-Reply-To: <20261016-mt8196-ufs-v14-0-e8d565e0cd45@collabora.com> To: Chunfeng Yun , Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Peter Wang , Chaotian Jing , Alim Akhtar , Bart Van Assche , Bean Huo , Stanley Jhu , Stanley Jhu , "James E.J. Bottomley" , "Martin K. Petersen" , Philipp Zabel , Liam Girdwood , Mark Brown 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=1792154009; l=1411; i=louisalexis.eyraud@collabora.com; s=20250113; h=from:subject:message-id; bh=DTFoP4zj9jE4qTNyeHA3Vmefd9hRDOsT3YaWpVSzdiM=; b=Ok+XjieiGDxP983TlQjzezzsvGowIj1LQwXVx6ewSDrXI6oXk5Nl3jyp8Uiu56VrpY9ykI3+O j3+wKaBLpcmDSoxHnDwafkSnevcgxY3CibCSiyYSJqJjV7Rg/lZeWoZ 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-20261016_053356_345044_8FAC3F5E X-CRM114-Status: GOOD ( 11.98 ) 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 328df4521a02..760c1ebd53bc 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -1579,21 +1579,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.56.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy