Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1992440lqa; Tue, 30 Apr 2024 05:43:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuq1TKu2R3xmwXtPJhkGPhymHhJZDdmd6DdMSBVPav/esbnyUqjs4L+Onmu70okykTpoxkQ3UB0xppzH6bThQzkO/k8xyDbQYXr8vo6Q== X-Google-Smtp-Source: AGHT+IE7oznTQViOSp2gMh8czzbjoSmdioOZc1ZHIWfxpBrgxiVw9AbKwSnuYy0ecdfIQbHob65v X-Received: by 2002:ac8:5f4b:0:b0:43a:ffa8:4a99 with SMTP id y11-20020ac85f4b000000b0043affa84a99mr4633472qta.38.1714481032505; Tue, 30 Apr 2024 05:43:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714481032; cv=pass; d=google.com; s=arc-20160816; b=RumVRAfLm1C3Cmzg4Axmcj0QZ//jJ/C2ZD0DRxahIZ/mgJdnW+incHrhObLJ1ihfOb pE1AWT9hXWoyI9tZc8oFgiLNJC/3huVOtcYpJ+tllQUPg3lxazZ7QbFB40Bce1bZWD++ SMLzCuNLLhlYWnx6FwUshxnfLPSfxQTyA8wi2FOlndeqfniem8Ys6B1jX0oSYrRbTKxy W0/afUO+IeOejO3Kyq0fi3/uh6SJIftTe+Gvk6ma7zL9vofKZDmqfY8GgikbdeaTNCHm vB+8OKC/W1kL0aExu5435cBvUL4RSOcACrrj+pUgEjs5i3STnBOmPCYOr+HxSgw1oKia Rx3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Z2cfWtBAsXqglGUC0FXhyb0s4Cp7D8stHYMoBK9Lwj4=; fh=AjgMpSJjmN8LPBqN07dGvulDUUzbPDx/Fr/m3i+8Ghk=; b=usbVXeb7PB09tlRZodHMFgKQHrX25SK1+AKXDbwAUf1ex4Cd2ADfmIHqfrvaPhIA0P fu0UjVyr5jLigkQVNJjq/P7GxEcQKk1tRXjr/cDXVc8gqS8hbuQrhA4EgI4LdkSl9vgf j5c1zLFRLDUUCqe6wGqwvXRwEBLqCgZKM769VRqngT5VaQME11bsSg4+4qSh5Xsj0Obg bw+Im4+XbTI44ueU/wRpqD6/7yHjbI4QvI7GHw3LcgSUg9Oa3ZEzeHUzby1Dxs43FqIT FU4zDvNlu+GfJ6xxALbdMbYsxrcRa9IfJWuKKfYCns13rNMfJqcheeZLy8YWxj3xFnsB LyTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zenRqpyt; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 v14-20020a05622a188e00b0043b0856e79esi3094566qtc.431.2024.04.30.05.43.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163927-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=@linaro.org header.s=google header.b=zenRqpyt; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 3F0831C21F76 for ; Tue, 30 Apr 2024 12:43:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68E6D17109F; Tue, 30 Apr 2024 12:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zenRqpyt" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E15813F43D for ; Tue, 30 Apr 2024 12:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481025; cv=none; b=rnAo8jY7HJSePISJLjDsz5lUqO2hbCkxISOUfsr+mSO+M4c/5nEZTUU716uLOgLVaJDHzYqnak+6zGao/qimEPERZ1CRgQevD/MBCVNtej4wajE7L/ca5pxGEVYgNQYTwH2ScaVIdnPUfC8EBCQqfCsHZ+BB27GXu4pHsbLuMbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481025; c=relaxed/simple; bh=VRRnaPTgYijOUmzlvv2SBU8fJEkG0dJpXrbLMcP8Rek=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EG/bGCeWKTI7iJ51wfyIMfHIHZMc4oWSLzV/5FglV8ODeEcE8UcDXiybc7fGmNUOcKlgGwJj3MPmKKJtP3dRkM5KPMxHx2Fsj43Ktoqc8QFoebKMHZj0iirRQi4fe8WTNQIw/R+xnpAknKxCenLZLg5CwQYr26i/UUD9BzC+pkY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zenRqpyt; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a55911bff66so691048766b.0 for ; Tue, 30 Apr 2024 05:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714481022; x=1715085822; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Z2cfWtBAsXqglGUC0FXhyb0s4Cp7D8stHYMoBK9Lwj4=; b=zenRqpyt06LFArtaqoHAbn+vfmoaXFEEzxcFKcHCvHXmFRhYmNVfq7cWSQYybNVVlT dlTSMsEjSmpI7QrtvKxvKfhyAmBS/N8YEjrovphUWFRuafcAoie+hbFBpesZHedIn+/l /Fw+EgZgGOXUQJQV4u+Q4+TkJlq7JCaJnj+BXiCiGto5BVEZaQIBy5RwLmew73BirDh0 nIIjNhdokLgntSyHQFiKHge6nTtHGeBsUiyKGvgNMKuA/mcjzSwgoxKI4i3D+tf8i+pm 87jHuT8peg79BqpGiXSceql74+TXzYKRTRSSftMr3CMRZsCUn5sbrjzB7f6gLyHt2Je6 r3Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481022; x=1715085822; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z2cfWtBAsXqglGUC0FXhyb0s4Cp7D8stHYMoBK9Lwj4=; b=MtkPmxvHPlO2mz4q9aDEbkmC/d+w0G/baW8PbkVwxibd0+HHpiR+FMKW+opKzV1gBg +zqdXRlczmXbEB7jP+Mln8D66qWpfBg9jUxiU6UEyVTWLJ+8YvBm33DmeIEAEB5cutmU 2t9BA/Sn14GzhiDN8kRpYpilCzTJDFYrPdCzo6f4pzas500JHfFkkxDL2pxWB9sKtle/ fp2NlJ5jKt4+sXObES6JgG0RChJ8Z74dRkXuVGoFNFRUW+/pvNMN0aOk255erb7xL8fp wUkSUjouX1XtN/O+OODWWKjWPRZRrwLEPhebssFl0UJBL0Ektxvwe5ifyH0hTL4HVlJv 0Zfg== X-Forwarded-Encrypted: i=1; AJvYcCXtRBrBrAYi/8c10yNWye1AvTpQtCknFwZ3fQeicsma1hhBn4zRpvaa+jUMjjDgn7RWlPAhuxtTGiYly896VgC7cljCfab3SUzXvinK X-Gm-Message-State: AOJu0Yz7TR36B0phLLi6nnd1BZxvjSM64XcP93cj0sTt1tXt/7ayEPhq dL5LXkvhxWSMsDCyCxyhi9Q9iQhXIFTLHZgLU82cTu0m1utJRctsoh2p0XflXWw= X-Received: by 2002:a17:906:b00d:b0:a55:5ee3:3c80 with SMTP id v13-20020a170906b00d00b00a555ee33c80mr7366326ejy.29.1714481022554; Tue, 30 Apr 2024 05:43:42 -0700 (PDT) Received: from [192.168.69.100] (mab78-h01-176-184-55-179.dsl.sta.abo.bbox.fr. [176.184.55.179]) by smtp.gmail.com with ESMTPSA id h20-20020a170906591400b00a51d3785c7bsm15006034ejq.196.2024.04.30.05.43.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 05:43:42 -0700 (PDT) Message-ID: <85cfd4f4-ce6f-4c38-8c51-25c72e3ffa9f@linaro.org> Date: Tue, 30 Apr 2024 14:43:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 11/15] i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout() To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Paul Cercueil , Andi Shyti , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240427203611.3750-1-wsa+renesas@sang-engineering.com> <20240427203611.3750-12-wsa+renesas@sang-engineering.com> Content-Language: en-US From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <20240427203611.3750-12-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 27/4/24 22:36, Wolfram Sang wrote: > There is a confusing pattern in the kernel to use a variable named 'timeout' to > store the result of wait_for_completion_timeout() 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 > self explaining. > > Fix to the proper variable type 'unsigned long' while here. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/busses/i2c-jz4780.c | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) Reviewed-by: Philippe Mathieu-Daudé