From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0DDCB1B219B; Tue, 15 Oct 2024 13:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729000468; cv=none; b=VLuqdWn5ZkUSQ0+RgBAsFyHcoms1ObvX8WBXWHdRB2hoLX6pssq3284OmON7o0FORvEd94vVNAiRufvaRSC+M3By+K0UoXdGgjdhoppTdvLhTiwF8wYMZ0575Kx/oBEmuNK6O9IaFn/9gt2R8qnUrAxBMJNlN07HGKmdZS5bo/w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729000468; c=relaxed/simple; bh=tIsMM7fX/CrMgwmOAdB9kTlSRTDalPOoc2fQSb66mKU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZnPcftpt2MW80PGL6dHeirerFI4VSM0BfK8A/f21UCqefx82vpzMlyfJThjNqLT3lunuO5yJjadsVwElmPTy6u1DlAbrZP0zsotQHl+64ibciPwHTJZ8RbzvMRmo3266QWIoIdVEKZGGHgkDhua/LbEInGEEZAApMMPDtvESe5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCbD61NR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCbD61NR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1939CC4CED1; Tue, 15 Oct 2024 13:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729000467; bh=tIsMM7fX/CrMgwmOAdB9kTlSRTDalPOoc2fQSb66mKU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eCbD61NRnFFntH0NX/eddn0x3225iMNzntGFOyJjmbT0eiLZZqww1thuJSGRYKhed FudtrU9x5Dsav8253kwjtRDC4ZBzU5+xUztMMfCSe7CwydaW2FTWlc0IEKCTZhXwvn skdjHbSevEY2qixx8NLqs81jFKDTLDMEBwLa2IitGijMQiKJT529jWcvWzhyBlH20/ bot7hNxRjEZEl4zX/MPLwAdjEfLCqHd1pgXRIL7j1Tc2vO+m8ZE85ctmPIJOLJW4QH 9vITjCng2aWpnvEa6mZYZqWfvSpgDPMlW4HSlRVj7rxYrnnTtaGigwPyGO5jxyzD8B qHy1KoUQBXKFA== Date: Tue, 15 Oct 2024 15:54:24 +0200 From: Frederic Weisbecker To: Anna-Maria Behnsen Cc: Thomas Gleixner , Jonathan Corbet , linux-kernel@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, Alice Ryhl , FUJITA Tomonori , Andrew Lunn , Miguel Ojeda Subject: Re: [PATCH v3 09/16] timers: Add a warning to usleep_range_state() for wrong order of arguments Message-ID: References: <20241014-devel-anna-maria-b4-timers-flseep-v3-0-dc8b907cb62f@linutronix.de> <20241014-devel-anna-maria-b4-timers-flseep-v3-9-dc8b907cb62f@linutronix.de> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241014-devel-anna-maria-b4-timers-flseep-v3-9-dc8b907cb62f@linutronix.de> Le Mon, Oct 14, 2024 at 10:22:26AM +0200, Anna-Maria Behnsen a écrit : > There is a warning in checkpatch script that triggers, when min and max > arguments of usleep_range_state() are in reverse order. This check does > only cover callsites which uses constants. Add this check into the code as > a WARN_ON_ONCE() to also cover callsites not using constants and fix the > miss usage by resetting the delta to 0. > > Signed-off-by: Anna-Maria Behnsen Reviewed-by: Frederic Weisbecker