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 212B27BB1F; Wed, 21 Feb 2024 14:15:48 +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=1708524948; cv=none; b=hmO9St8LokgjVc8rZT+xblz6Z973IlbvR5n9+KPMWWw2TW8NYrF5SGdB0XhyYPtokWfBjZ7MlxOJuogGORpgJGH6IoENIqWGLqFG2lLo0UeZiAurYNrRdzKX7IEwqu/ZJQUvwiy4lHhQx4xZSqKnD1vBCoJmdxlUgG773L6InD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708524948; c=relaxed/simple; bh=4zKIUcfsPfQkYowtx5OsnIlq00Bbcq1Okb5McTTp3SU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gdO4k4y3CyKhPgsfgSga/bgftaBdYss3J7p87Zf13YGkMwqZmO/wPcUywF41lqAiiIVsRd70AjSxx8IH2f4lA1adpfyhezEN03kYCicC/97K4HEa1hXUAKwIlngAufbIYOmBm86JDxZYFXi8yUoNgUoOSlxxh6qOEHtjkdWWmuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Sf8o+9F+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Sf8o+9F+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 589B8C433F1; Wed, 21 Feb 2024 14:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708524948; bh=4zKIUcfsPfQkYowtx5OsnIlq00Bbcq1Okb5McTTp3SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sf8o+9F+REUH5ve9DwNrBjr4CzvcwcH2w2PianJlDwiKZcMg35n4EAoU/3zdGe0Bh 54RKhhm5nkC2hREp2apOZpRvmon94C+kZ7JNCx21kjRGFAeBGfA0lf4HLZNS5CVfg/ goabW29R+yy59M1krmeCE+mmQjKcydAcRHpESgOA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Lezcano , Christian Eggers , Andy Shevchenko , Chanwoo Choi , Guenter Roeck , Jonathan Cameron , Jonathan Cameron , Kyungmin Park , Lars-Peter Clausen , Lukasz Luba , Maxime Coquelin , Miquel Raynal , MyungJoo Ham , Peter Meerwald , "Rafael J. Wysocki" , Zhang Rui , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.4 005/267] units: add the HZ macros Date: Wed, 21 Feb 2024 14:05:46 +0100 Message-ID: <20240221125940.233681045@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125940.058369148@linuxfoundation.org> References: <20240221125940.058369148@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Lezcano [ Upstream commit e2c77032fcbe515194107994d12cd72ddb77b022 ] The macros for the unit conversion for frequency are duplicated in different places. Provide these macros in the 'units' header, so they can be reused. Link: https://lkml.kernel.org/r/20210816114732.1834145-3-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano Reviewed-by: Christian Eggers Reviewed-by: Andy Shevchenko Cc: Chanwoo Choi Cc: Guenter Roeck Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kyungmin Park Cc: Lars-Peter Clausen Cc: Lukasz Luba Cc: Maxime Coquelin Cc: Miquel Raynal Cc: MyungJoo Ham Cc: Peter Meerwald Cc: "Rafael J. Wysocki" Cc: Zhang Rui Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Stable-dep-of: 3ef79cd14122 ("serial: sc16is7xx: set safe default SPI clock frequency") Signed-off-by: Sasha Levin --- include/linux/units.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/units.h b/include/linux/units.h index 4a23e39acc7b..a0af6d2ef4e5 100644 --- a/include/linux/units.h +++ b/include/linux/units.h @@ -4,6 +4,10 @@ #include +#define HZ_PER_KHZ 1000UL +#define KHZ_PER_MHZ 1000UL +#define HZ_PER_MHZ 1000000UL + #define MILLIWATT_PER_WATT 1000UL #define MICROWATT_PER_MILLIWATT 1000UL #define MICROWATT_PER_WATT 1000000UL -- 2.43.0