From patchwork Wed May 3 10:40:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13230030 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 E5502C77B7F for ; Wed, 3 May 2023 10:42:05 +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:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6TE1tHp+uFzZW5NFlPEu1yKGejBzje8cE371EnbDyBs=; b=xxCiCFy37kTn6P opuC5qSaRYwjgGJdmADRLOXtFnfoqgFl2BgPqRAvKx+RLEKBEPY//8MPhvPE2IDOFCdRK/hrDHbxy ue3YUTV4fAvygBZVpJSvhc6gCvVb/xiObKrKqM+gKc7Tn540PjhVWnbSPAT6ddItN9ib7HJbCUKX3 gJ3bX+0DSMjTz2pNFQwFJblpmb9PkmcBgkz58bh7b2w9G4MN1o3fuPHBJwtRIGUrJKuGOVnLmePj/ vc66CKr5yQdrBhZkiGyGoJAeFNFxdT9NiA4CiOqXFNXLdIwp66XDn79L2xYHP+93x+H7Fer3j4EK5 nqrcJyZnWs4Msym/BHsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pu9v6-004Ce1-2a; Wed, 03 May 2023 10:41:12 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pu9v2-004CZl-3A for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2023 10:41:10 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-2f86ee42669so4783436f8f.2 for ; Wed, 03 May 2023 03:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683110466; x=1685702466; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=18+zD8zJYi3/Cfjv44S8LZuiPVGNRYG6CxrA5L7f37c=; b=pJJ5gpIVOdGJhMps7tKZauJYNEF32/NT8iGK0CuyrDEMVE/+NBU3KOqSMTj9UrNyxH yh/mmvEsDhCerh0pN6S2YvvP317oQzB7NpLlxLEMd8exJoQ3WtTLvenIe8rrvw5tksJI 9bMdxotUdgPuRgbPr53Q0DIRKEwizOkOpgz4WPR2SaYSgLLJQAqJCT/fXY1dYluBqQr5 sL7lU3SPvBjKCj5N5RDsALucCOjJ9LZg9edK22h+/i+33pi/ryAYptI8g2Ye0C4pmGy1 IIrZkCMo02AhdeWs9zNglu94SXjxtdSx5EY0EvurVmzqaZ4gdLFAnnM9FlXJ7iZmTjlr VgBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683110466; x=1685702466; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=18+zD8zJYi3/Cfjv44S8LZuiPVGNRYG6CxrA5L7f37c=; b=RTvcqRmfahQxHnMyqtTJlY+04KucJhPdQRtgC/UdFUw1b2oXS/pUqC+UgnkzvINuv1 Af7p0GF1iU8cNZKJrJR3HgrhL9oWtAmho0owyZmX/n685YXmbjShTNabXzFiaT9Tt8Iw ab2gwVVDxo/ioUYRLFaHLCky6tU0Kz0IT55GxJoVBdnOy4W/xsbGLYtyq1B99l6dnTQQ wni+wTvqsh7lK+JXg/1eTy8lVGSgGq7Y7EzNJ5hZYFuoh3jGxytozAtwQFA6jZFintA6 5pmlztKD1MAP/inESO1AfZYrzHg4+m+VH0xgEMvfR42fjE5HvvMnsPswWkt90+U1RIAS 4aag== X-Gm-Message-State: AC+VfDx9iDxpMzKIdL7oqJvJ5cWU5MbAM+JQ94Phn6pOFZIP7sCtTA6g uGtijFKExob277iwbHm/FrAoUw== X-Google-Smtp-Source: ACHHUZ5WMJai/7lvt00NBo93bMqGBV8AwVXXrIpyWqT8UcwT9B2mcylhVQ9xuSDVl+13JhaF2VwWsQ== X-Received: by 2002:a5d:448a:0:b0:306:459b:f575 with SMTP id j10-20020a5d448a000000b00306459bf575mr554124wrq.12.1683110466641; Wed, 03 May 2023 03:41:06 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id h13-20020adffd4d000000b0030631dcbea6sm6450573wrs.77.2023.05.03.03.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 03:41:04 -0700 (PDT) Date: Wed, 3 May 2023 13:40:59 +0300 From: Dan Carpenter To: Stanley Chu Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Matthias Brugger , AngeloGioacchino Del Regno , Andy Teng , linux-scsi@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH] scsi: ufs: ufs-mediatek: delete some dead code Message-ID: <68fce64f-4970-45f1-807e-6c0eecdfcdc2@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230503_034109_017483_555E7FDD X-CRM114-Status: GOOD ( 11.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is already a test for "if (val == state)" earlier so it's not possible here. Delete the dead code. Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet") Signed-off-by: Dan Carpenter Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Stanley Chu --- drivers/ufs/host/ufs-mediatek.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 73e217260390..a054810e321d 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -410,9 +410,6 @@ static int ufs_mtk_wait_link_state(struct ufs_hba *hba, u32 state, usleep_range(100, 200); } while (ktime_before(time_checked, timeout)); - if (val == state) - return 0; - return -ETIMEDOUT; }