From patchwork Sun Dec 31 10:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 759553 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 6F4D979D4 for ; Sun, 31 Dec 2023 10:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="biMXuSl3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704018696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l1YEY+oD4lb5AgB8WSj5waUHiVWBYefH7L/B2Z7Te70=; b=biMXuSl32SEAudsmzLE6x+Mho314NKPIcvKMmDU9Zi2O6Hwc2b+lzFwVCKY9PMhXBI2jlP SKEAvbPDF43zRZrroJq33BXUM3t8mY7Y8gei1lAUbvUThOG0E37R/YmVr2AdxSzhMFi0YE v/islEbZF9tn3Pp1bxL48cPpd+Lx040= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-v2HdgJDwNvq18Wg55_b50Q-1; Sun, 31 Dec 2023 05:31:32 -0500 X-MC-Unique: v2HdgJDwNvq18Wg55_b50Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A832A85A58A; Sun, 31 Dec 2023 10:31:31 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31C11492BC6; Sun, 31 Dec 2023 10:31:30 +0000 (UTC) From: Hans de Goede To: Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko Cc: Hans de Goede , Kate Hsuan , Tsuchiya Yuto , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 14/15] media: atomisp: Remove unnecessary msleep(10) from atomisp_mrfld_power() error path Date: Sun, 31 Dec 2023 11:30:56 +0100 Message-ID: <20231231103057.35837-15-hdegoede@redhat.com> In-Reply-To: <20231231103057.35837-1-hdegoede@redhat.com> References: <20231231103057.35837-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 Remove unnecessary msleep(10) from atomisp_mrfld_power() error-exit path, the success exit from atomisp_mrfld_power() happens if a test succeeds inside the do { } while loop above the msleep(). The error-exit path with the removed msleep is only hit it the power-on is not reflected in the iUNIT ISPSSPM0 status bits after a timeout of 50 ms. Sleeping an extra 10 ms in the timeout path makes little sense. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 7e241f4e9e93..f736e54c7df3 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -587,9 +587,6 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable) usleep_range(100, 150); } while (1); - if (enable) - msleep(10); - dev_err(isp->dev, "IUNIT power-%s timeout.\n", enable ? "on" : "off"); return -EBUSY; }