Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1976046lqa; Tue, 30 Apr 2024 05:14:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2L306OwOlfqBfH8x+/4rr+Tqw7FItxuRkXvnCUia3NqenLKiwO2yJCY9H1xv+7qFxDZjDXwmvUA+YvgRYGy2+06Bx8edXR0ScDIwZqw== X-Google-Smtp-Source: AGHT+IEsBflhP8b+hd0YN5tE3giOFnlFqk8KJk6LVaNeADgO4E2793hwbRAA3LQODNGQbFwVJ+Lq X-Received: by 2002:a05:6808:e85:b0:3c8:531f:ca40 with SMTP id k5-20020a0568080e8500b003c8531fca40mr16962098oil.35.1714479291767; Tue, 30 Apr 2024 05:14:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714479291; cv=pass; d=google.com; s=arc-20160816; b=p2q0JY95H4byIVU0BWsCVXEy53Yqn4OsNIpz31IqfpvwqtDaXawQlZVfeFz8ymIktK kIYvdHwAlFfTqF/5epe8HXEcBt8qFelEAuEHAauULk2F4wf0gr6zT5YIC8GZiXQTBZJ3 2p07ajfGJx2QtEcGy45T2BU1BF654126yAnNxYwLC93oAVGCzAWke+7m8Vsn7fQkzol8 4lPWU2Md6CkC+pPu7ojDeZcjvfcisuMqjZE/Hf28GL/OrnmEsNrRmbu1hIoHHxdwnMC6 xnUhDjcRFVK7pnhPTxk/dfDpL3qEe6TVT7hJx8JKjbcg2Y8g3tRHvi6iJ9Wc6lhojDAf gNjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=qv3V9v04XImJ7RSA6mxDg9I+SyYmu2l8iNOgau7ZTcc=; fh=y7JCNr06FkRcriEs42nTByYzvogNqBMswu0Nlp6mNiI=; b=cJddT30AYUEiykwJOMXA0i71i78rMMQw/X0fytoLQZJKjwV1WDoCJfp6vtUZpnD4RX DrfTc4FEPe7iuy26AMg84N/F0j/A/RkmBw62/OzN4S1+WVFqW5eAv2T1iqr0XlRAvPEr Mytm2G7uVDMG8Q2pn229planeqiZMr7qv78Jk6wimKUe2vfoql37I5l93DKlfgZRffrg jO5He7ug+SpwnWdEHAqzfFEKl+iDY9uE9mpO+CRhuxcrgRUREiz8Me8AH9YNAhgJvjoD CdLWy4Emf1dOW0/maKBWGlAMaJXZn+M+OynWWAuD5xE6YsFPoJeFwHorxSz8vlcS9a3s K4Nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=LRlFu+ye; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-crypto+bounces-3954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3954-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a8-20020ad45c48000000b006a0d6c1b798si3039332qva.363.2024.04.30.05.14.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=LRlFu+ye; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-crypto+bounces-3954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3954-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 474BF1C21B20 for ; Tue, 30 Apr 2024 12:14:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B011C134412; Tue, 30 Apr 2024 12:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="LRlFu+ye" X-Original-To: linux-crypto@vger.kernel.org Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (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 AD25113D273 for ; Tue, 30 Apr 2024 12:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714479288; cv=none; b=cR/K7NZaP/fDPnDBp12FHaVefYsjJ91JQisO26QwcH5EI7N9P1P426oHTZYq/7DflTZ8P29XENS23Wg5kFGb/G4eJOyqwvP++ouvV57zh146fJcanbOpCtJsXhRWqVez5e3XQCSf87zb4h00Lds5p88SrMXNM/uf5qTA5rfK1HM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714479288; c=relaxed/simple; bh=cA0r+dLA1sQJPEpW4g/4pxRmcB5XcpCzgfZKe7lIN00=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S8vtUjHg+pZ4cOpOa1rYe6sKiuUbHwL8nFUNUVuu3rSte5g1XkAefm7LD6gqqDng2pOQtRjLk2M+BzgItUQBB5daVHujTOpuX3kpU9y2YJN0Mf8m6eC/+VFqXkE9ffQcZwtoHBQz6Kt+EZEYovs9jpHVqPAoBiqsQq5ZsS7QxuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=LRlFu+ye; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com 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=qv3V9v04XImJ7R SA6mxDg9I+SyYmu2l8iNOgau7ZTcc=; b=LRlFu+yeQxIZl2p3A9vuGmP8JFREUU iaXTCG9PIND+0/e9gOIs3+5HtjzRDCRgh17rXgkF7d5mHM6Xpt07W5ibCFyL2JK6 MnOaD6BLmu600/gOUctC9Q9bt01Ru32E/mnhYxKauWzqYvj/JmR70lewQuhK0tF+ LNz2oFshY+tn+fORApWK7g24dgJZsDoFuAATo+/LU+jvO01STfSx1PDfUsw0LdGL DcEaZkJLeVIlbPma9rk2B35advAOKx31H5fszpMEw7NGeJQP6wEc39VyGqnAAD6i oRumpBEzt1SYdRD0NjiCh8qmsPaREk6/yn0vIi63I4iPoepTHT9W1tug== Received: (qmail 2627840 invoked from network); 30 Apr 2024 14:14:43 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 30 Apr 2024 14:14:43 +0200 X-UD-Smtp-Session: l3s3148p1@+p6mUE8Xsuxehhrb From: Wolfram Sang To: linux-crypto@vger.kernel.org Cc: Wolfram Sang , "David S. Miller" , Herbert Xu Subject: [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions Date: Tue, 30 Apr 2024 14:14:41 +0200 Message-ID: <20240430121443.30652-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (1): crypto: api: use 'time_left' variable with wait_for_completion_killable_timeout() crypto/api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.43.0