From patchwork Thu May 2 21:00:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13652072 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 1285DC4345F for ; Thu, 2 May 2024 21:01:15 +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:Date:Subject:Cc :To:From: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=4kIxMEjSa2K+XeE2Re4usjKxtWT95aLC2tRx20M6Huc=; b=rhQeWAU4mWZIcQ UVsoLLOPMaDrud+DyMd4ziE6BRTmZDEhmJn9oWKViJqoZRAgF+Bn5Cng8FWdHgYiEbMVEUWHUo49G mR8Mjedvt0t/0nid6abiEeiBS954uD+WZa6Rp4aEO6TnNZvuvPqNQJiOEB+YfwHwS1MUd3XSBPGo/ 9yZSBKtM5gZy/rgPAPcYZg6t+1MC49JiIvfuUA98Cqs5hSCVuuQQwuuOuqd+m7Xl2YTF2JoAH+fTP YRUIDSS4wNJuRY6KT1ZbiA+jWuXAuTHtWc/u1/k2NgqlqmaeA4grCba/1c4wZOFKIYe8oT3+a+HCe v0JZzKTDhTSumXI1D2dQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2dXx-0000000DtoT-1hfY; Thu, 02 May 2024 21:00:53 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2dXs-0000000Dtkx-2c5d for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 21:00:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=vbLbGnRrGB7osk 150qN2jGrCzd2fjB5/oPHzyxdfjfo=; b=kTsD4wzsqhNs625k+/D3X4EveeW156 xolafYJZMXNmURAxMJW+VCLt7kkK/pfWh2TyUZJtR73Ex3q5/LaM1fhnVKbCX0aN b8rtHgKHqNEYKNyEek6k/+5QdVpHHqQktdrahFswrIQTyhyvybT+u7muQTF6V7k2 okY7OPAqkeEcHpRbDcjKWizio5tXyGMtpPVSoxyAOfmDem7pXlZNfryFbn4eJL37 pDKgHZuI/OHUy4RJHE11vBQMPxIKJJs8Ejee3756yPKLKjJeV6a3yJzdOClXcWqL 4bjpmX2ztPBpJNGAGAKUEFzNjoKlI3+AjX4W5pTIydSSd11Hv+LgxGnQ== Received: (qmail 3365792 invoked from network); 2 May 2024 23:00:40 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 2 May 2024 23:00:40 +0200 X-UD-Smtp-Session: l3s3148p1@ZIs/5X4XVopehhrT From: Wolfram Sang To: linux-crypto@vger.kernel.org Cc: Wolfram Sang , linux-arm-kernel@lists.infradead.org, linux-fpga@vger.kernel.org, Michal Simek , Moritz Fischer , Wu Hao , Xu Yilun Subject: [PATCH 0/2] fpga: use 'time_left' instead of 'timeout' with wait_for_*() functions Date: Thu, 2 May 2024 23:00:35 +0200 Message-ID: <20240502210038.11480-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_140049_576021_AA7CBAA7 X-CRM114-Status: UNSURE ( 8.50 ) X-CRM114-Notice: Please train this message. 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 a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_*() functions causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code obvious and self explaining. This is part of a tree-wide series. The rest of the patches can be found here (some parts may still be WIP): git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/time_left Because these patches are generated, I audit them before sending. This is why I will send series step by step. Build bot is happy with these patches, though. No functional changes intended. Wolfram Sang (2): fpga: socfpga: use 'time_left' variable with wait_for_completion_interruptible_timeout() fpga: zynq-fpga: use 'time_left' variable with wait_for_completion_timeout() drivers/fpga/socfpga.c | 7 ++++--- drivers/fpga/zynq-fpga.c | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-)