Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1332524lqe; Mon, 8 Apr 2024 06:13:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgREF8qKRMoKkrSxHt4U0XriAweJRQhcsW/Zpajz5SA6fXJ+/pcHux4tqz/3S2kpIHdBKrVXCoikMkmT1/vrWT/CrdatjxTj6hOGRc1A== X-Google-Smtp-Source: AGHT+IGZP/iPaUqrOXe5cszsiehASg/68MDdIUsk41uhKjsMqvFKxRT+uIPkNlLdp+wpm4Z7iVdv X-Received: by 2002:a17:906:c104:b0:a51:90af:27ca with SMTP id do4-20020a170906c10400b00a5190af27camr7400345ejc.55.1712582036316; Mon, 08 Apr 2024 06:13:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712582036; cv=pass; d=google.com; s=arc-20160816; b=nexM/WE5Gq75T3lhqUUI2pSjntIZ/u89sif50VqlZzJl7Q9H8R1nlGCLTAWkGGSYDO G/Q/hlOL/BL2UjlINuMg/sMJOyoREPJMh8i7w/yUC/q/8ULiMeYTU+VNPJwJOuhRpAEH SBwO8SrSsBorouXzaqOR5xUkQXChQpRXoAewzhEyzHVfAukSBvDp+YNFKgeRKdFQaElE ydm/dm2aKflBLS/gfi6XQ+X84tKFY42Xz7KZEEbsg3Pf+GaKRWZu8tlxOqgbyNWngiIl eCKYZ++5ZsHA4OvkxsT/pgKPnmVUrlDrMyiss4e3vWT6XRSc1axldWFJQfrY1TQHhrGq vEfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=iwGjD8fVTIf+EolXJYDumXYNYzSuRgEAsH/qeqNkA9U=; fh=HIrP3i0WQwu8zLnKtb1acHgteo695uCSG6Yk5OndRkw=; b=RVgxej+Yv3fssf3bBkHXkVid8BG8/Y//09C6JgPgOR6mxSBjSwbyQJSPgICGK+xFks kPp3aDM8TpC0Byg/YNIS00XP5eqtC9AY5Jh2CMVvHdH7WJmQrjo6XoZwANMr/3VAtwnv c0KVeEUNnEh4jnROTlxNJBD4RDiEoOoerwm+e4FM1WC/h+RqnlUm6+XpNHH4LxcnhVb4 oMONJIlzS3ttGmAhrDr6D+5u6W1/H1ykC1D/eVPulLTQ9hScMQWDYZ2uN3gLwc6RLSjg 4npaI4XzacagCcvndlhQGVkYVHFsTRzVcCYHDw2XkFtwwGdPc/XjJ8jdoRaUoete6FAz gqJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1dZY2sWX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-135403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ov10-20020a170906fc0a00b00a4e70eec860si3593038ejb.451.2024.04.08.06.13.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 06:13:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1dZY2sWX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-135403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 94E6E1F229BE for ; Mon, 8 Apr 2024 13:13:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CC718121A; Mon, 8 Apr 2024 13:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1dZY2sWX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oAhgcmBO" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 DDFB87FBB3; Mon, 8 Apr 2024 13:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712581846; cv=none; b=h5e/tr7op92qSNaUUMFNfxXOGZE+ey6pBAdLzpI6cpyE//x0RoCQJXFT5JHNEcc+rbSQfJb+HXrGicDSdWd34yDrL4oiY3H+ZURS7LCoTznhINrAo9H94cJR5u1XAgeKvwgpm+x90bCynvYwib3CYy2vj+J7EKOuqx/DdYcAx+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712581846; c=relaxed/simple; bh=f0UdJBOu3zymVKe/XKjuEStwE20mNSGudtg3X6ITSG0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=paKr7S7Lo2pRu93adDd8Qwre5CoYt63K2ZrB2juYIfmy5Lm/mh6ROk1fC7m/+MBSAG/2mx5TIsbNtw7sXxoLBWhFuGPA9K/1Go1wWil4wbcxQW+HKdb621GNdHIC6ZeOaR1aNCssGCxEE4v3RNox37BCsm5NZMXFjdNPm1FLZjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1dZY2sWX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oAhgcmBO; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 08 Apr 2024 13:10:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712581843; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iwGjD8fVTIf+EolXJYDumXYNYzSuRgEAsH/qeqNkA9U=; b=1dZY2sWXkYt3THPoQ+KJSCMHHIxCkr886+ER09AIspzJzkQ51QDETtDp48PFcjobh8LcqW ia30x2ZN3ZUu94d+7exL2P+0rrOvNb1+cmD1WDDECdCTpklZ44lcc4vF26LYF4eRH4d0lB Zi6Fjyr/SY+C9b3Y5iWbD5MwTdvK6Nve46xjNBsm/0Tg+3T7cgglvf47DsAqc3+HtADQ/H hm4NvPEtNOTs1tdN8JFCoXIlidmx6kiz5IIIkMqwro0XuafVwMX+4ieshte6yHECTiVAlb TKmAuxBJWwDEt1CDXQcDx4npLDyea6/S1Uc+HSMNOFEHSBSLpd7HRf6nNzqN5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712581843; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iwGjD8fVTIf+EolXJYDumXYNYzSuRgEAsH/qeqNkA9U=; b=oAhgcmBO5SHyF3gcNmVJl4SCzsG0zjfvv44Qx3TiSH54NLCwDjfqCm+U6Xag69c4uixh6H tMoxWBhlFqOg44Dg== From: "tip-bot2 for Adrian Hunter" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] math64: Tidy up mul_u64_u32_shr() Cc: Thomas Gleixner , Adrian Hunter , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240325064023.2997-5-adrian.hunter@intel.com> References: <20240325064023.2997-5-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171258184265.10875.9822422804315388290.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 5e5e51422cd189bc1b627f619f0f99324e6e4de9 Gitweb: https://git.kernel.org/tip/5e5e51422cd189bc1b627f619f0f99324e6e4de9 Author: Adrian Hunter AuthorDate: Mon, 25 Mar 2024 08:40:08 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 08 Apr 2024 15:03:06 +02:00 math64: Tidy up mul_u64_u32_shr() Put together declaration and initialization of local variables. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240325064023.2997-5-adrian.hunter@intel.com --- include/linux/math64.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/linux/math64.h b/include/linux/math64.h index bf74478..fd13622 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h @@ -179,16 +179,12 @@ static __always_inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift) #ifndef mul_u64_u32_shr static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) { - u32 ah, al; + u32 ah = a >> 32, al = a; u64 ret; - al = a; - ah = a >> 32; - ret = mul_u32_u32(al, mul) >> shift; if (ah) ret += mul_u32_u32(ah, mul) << (32 - shift); - return ret; } #endif /* mul_u64_u32_shr */