All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: Resolve some coding specification issues about spaces
@ 2022-08-01 11:38 l00581214
  0 siblings, 0 replies; 2+ messages in thread
From: l00581214 @ 2022-08-01 11:38 UTC (permalink / raw)
  To: jstultz, tglx, sboyd; +Cc: linux-doc, linux-kernel, hewenliang4, linfeilong

From: Tie Liu <liutie4@huawei.com>

When I read the code, I noticed that some spaces were not used in accordance with current encoding specifications, so I tried to modify them.

Signed-off-by: Liu Tie <liutie4@huawei.com>
---
 kernel/time/clocksource.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index cee5da1e5..46b738696 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -47,7 +47,7 @@ void
 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec)
 {
 	u64 tmp;
-	u32 sft, sftacc= 32;
+	u32 sft, sftacc = 32;
 
 	/*
 	 * Calculate the shift factor which is limiting the conversion
@@ -55,7 +55,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec)
 	 */
 	tmp = ((u64)maxsec * from) >> 32;
 	while (tmp) {
-		tmp >>=1;
+		tmp >>= 1;
 		sftacc--;
 	}
 
@@ -863,7 +863,7 @@ static u32 clocksource_max_adjustment(struct clocksource *cs)
 	 * We won't try to correct for more than 11% adjustments (110,000 ppm),
 	 */
 	ret = (u64)cs->mult * 11;
-	do_div(ret,100);
+	do_div(ret, 100);
 	return (u32)ret;
 }
 
@@ -1446,7 +1446,7 @@ device_initcall(init_clocksource_sysfs);
  * Takes a clocksource= boot argument and uses it
  * as the clocksource override name.
  */
-static int __init boot_override_clocksource(char* str)
+static int __init boot_override_clocksource(char *str)
 {
 	mutex_lock(&clocksource_mutex);
 	if (str)
@@ -1464,7 +1464,7 @@ __setup("clocksource=", boot_override_clocksource);
  * DEPRECATED! Takes a clock= boot argument and uses it
  * as the clocksource override name
  */
-static int __init boot_override_clock(char* str)
+static int __init boot_override_clock(char *str)
 {
 	if (!strcmp(str, "pmtmr")) {
 		pr_warn("clock=pmtmr is deprecated - use clocksource=acpi_pm\n");
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] clocksource: Resolve some coding specification issues about spaces
@ 2022-08-02  3:07 Tie Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Tie Liu @ 2022-08-02  3:07 UTC (permalink / raw)
  To: jstultz, tglx, sboyd; +Cc: linux-doc, linux-kernel, hewenliang4, linfeilong

Some spaces were not used in accordance with current 
encoding specifications, so I tried to modify them.

Signed-off-by: Liu Tie <liutie4@huawei.com>
---
 kernel/time/clocksource.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index cee5da1e5..46b738696 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -47,7 +47,7 @@ void
 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec)
 {
 	u64 tmp;
-	u32 sft, sftacc= 32;
+	u32 sft, sftacc = 32;
 
 	/*
 	 * Calculate the shift factor which is limiting the conversion
@@ -55,7 +55,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec)
 	 */
 	tmp = ((u64)maxsec * from) >> 32;
 	while (tmp) {
-		tmp >>=1;
+		tmp >>= 1;
 		sftacc--;
 	}
 
@@ -863,7 +863,7 @@ static u32 clocksource_max_adjustment(struct clocksource *cs)
 	 * We won't try to correct for more than 11% adjustments (110,000 ppm),
 	 */
 	ret = (u64)cs->mult * 11;
-	do_div(ret,100);
+	do_div(ret, 100);
 	return (u32)ret;
 }
 
@@ -1446,7 +1446,7 @@ device_initcall(init_clocksource_sysfs);
  * Takes a clocksource= boot argument and uses it
  * as the clocksource override name.
  */
-static int __init boot_override_clocksource(char* str)
+static int __init boot_override_clocksource(char *str)
 {
 	mutex_lock(&clocksource_mutex);
 	if (str)
@@ -1464,7 +1464,7 @@ __setup("clocksource=", boot_override_clocksource);
  * DEPRECATED! Takes a clock= boot argument and uses it
  * as the clocksource override name
  */
-static int __init boot_override_clock(char* str)
+static int __init boot_override_clock(char *str)
 {
 	if (!strcmp(str, "pmtmr")) {
 		pr_warn("clock=pmtmr is deprecated - use clocksource=acpi_pm\n");
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-02  3:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 11:38 [PATCH] clocksource: Resolve some coding specification issues about spaces l00581214
2022-08-02  3:07 Tie Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.