From patchwork Thu Jun 20 11:50:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13705289 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 53455C27C79 for ; Thu, 20 Jun 2024 11:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=jRp699soNP3K8A3f8TIcQqsWYfIKLLW0r/ERAheWeyM=; b=KZvULNtzHvlE3JHHlSkIwoBWLS 2cn1pj+6INdUAmoDPiLw22Oykcrim+hfmCWIIRTzKYpTlFIddEXpiEm622ho4AHGcEhvZJjW2rhif QVmXGqAOrIJsvJhnUC+tCYCvqhtKdTUw7l+9je7oQ9ic/bK2Amp8NuV7zv/AW5qV/5UPW9T5GMIuN kcEz8+BRIrK5PgQQ3+I+XYLpaueJgrMTa30oZVsFe2ww7NJQFpBtCUHo5ALAeXHIlLJtXSddm5iEw TorlrSh/xZSWRXeEkpUSm3v7xJWfboPTBMk2oxLzxEQcZ37mBuzn9/uPiRTVu6kMcblODF/zWfW4+ jJFyH++Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKGJG-00000004qx2-2xqL; Thu, 20 Jun 2024 11:50:34 +0000 Received: from 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 1sKGJC-00000004qvJ-017A for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 11:50:33 +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=jRp699soNP3K8A 3f8TIcQqsWYfIKLLW0r/ERAheWeyM=; b=H0He8Aox06YFOfIxHqpNP5PUEmF9HU r753vMp8hieKLDYEcXrq7yI3ff8JyjWls0qEVGy6mk2aIoF/HsGeY2LN1ft0y87W i6EbEnODgkEopUqSN+bJ3KzYrY9fzqif59ajzXFGY/oTayYdmFKmHMmdzsvAs329 +4mSYkjTyVvHZGuMYiqUQkXSzstxXDWx6fFWyEvDJZHoahFOguRkkAVvWaltdWSz AgbsTzFMzgSztDuYhAIj4utSx/AUYK8RJjRoK6HKadlHUfX3/ot+h2/0Ehjc06Dc a1yXoIT5Qdx8HdG5IehsCSzm5Tsbnyk9WJa+4EzBVdbav72WLD6OexDg== Received: (qmail 1002751 invoked from network); 20 Jun 2024 13:50:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Jun 2024 13:50:24 +0200 X-UD-Smtp-Session: l3s3148p1@n6uQ61AbwpMgAwDPXzjQABqqX1QYyOSW From: Wolfram Sang To: linux-kernel@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 v2 0/2] fpga: use 'time_left' instead of 'timeout' with wait_*() functions Date: Thu, 20 Jun 2024 13:50:20 +0200 Message-ID: <20240620115022.24409-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-20240620_045031_081259_ED38D38B X-CRM114-Status: UNSURE ( 7.80 ) 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_*() 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: 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. Changes since v1 are stated per patch. Summary: I addressed review comments and added acks. Wolfram Sang (2): fpga: socfpga: use 'time_left' variable with wait_for_completion*() 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(-)