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 9A90B69954; Wed, 21 Feb 2024 13:11:03 +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=1708521063; cv=none; b=pMPOOmr9Z9Hx+IOxrbWXGfKrCtuRlfwjZ6J3Uiaz2i0IrjZ2+b7jUviqToFbZEvZdBHt9B5VYQZukArWANIcvs+0qElZOd9UYO2Uhja1wFpCGFtuTe5X+PB1MkOF47GoeYdljQwNfkVlEVu+nBf8wY0INixPZm0KHBy5entUNsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521063; c=relaxed/simple; bh=8V3HxYy4DGe5YVY24cSvjx0BM5mypUAUFi9bcMhdatY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mPtRto/GhqxxQdmSTs9Ys5nXKXYx+DLbjxtFv0pnDM6aiVNsWG4/R7uA/QuHJaHh1kS6NkhPC4obdOHYYmYFIvxm9hEDb4zEcWYr3noRbJTuPK5BSTXMKBCVP1T72smeoNRs7UL3BGUaj5/eWQUv030HYXX0pFgU6sBJPbJn5Nw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qiku6zBD; 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="qiku6zBD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D737AC433F1; Wed, 21 Feb 2024 13:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708521063; bh=8V3HxYy4DGe5YVY24cSvjx0BM5mypUAUFi9bcMhdatY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qiku6zBDwXjApWUCoKcXZO1jJFQ84dlmTgxtvNW7LH13YbhssKZ7r/8XA0uCvdiLj 3FVvraYNClwhDXdD8H0COTdb2e33XpaKT8ZStt7EtyC8WJgJRpsazeWJv3jG6DSpZ9 HjauZJrpghpsdoX8DTANGDNEKgcWQKOUnpJt0Qe0= 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 4.19 005/202] units: add the HZ macros Date: Wed, 21 Feb 2024 14:05:06 +0100 Message-ID: <20240221125931.912091066@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125931.742034354@linuxfoundation.org> References: <20240221125931.742034354@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 4.19-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