Skip to content

Commit a0143f5

Browse files
krzkdlezcano
authored andcommitted
clocksource/drivers/samsung_pwm: Minor whitespace cleanup
Cleanup the code to be slightly more readable and follow coding convention - only whitespace. This fixes checkpatch warnings: WARNING: Block comments should align the * on each line WARNING: please, no space before tabs WARNING: Missing a blank line after declarations CHECK: Alignment should match open parenthesis Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210506202729.157260-1-krzysztof.kozlowski@canonical.com
1 parent 4f9f4f0 commit a0143f5

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

drivers/clocksource/samsung_pwm_timer.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* http://www.samsung.com/
55
*
66
* samsung - Common hr-timer support (s3c and s5p)
7-
*/
7+
*/
88

99
#include <linux/interrupt.h>
1010
#include <linux/irq.h>
@@ -22,7 +22,6 @@
2222

2323
#include <clocksource/samsung_pwm.h>
2424

25-
2625
/*
2726
* Clocksource driver
2827
*/
@@ -38,8 +37,8 @@
3837
#define TCFG0_PRESCALER_MASK 0xff
3938
#define TCFG0_PRESCALER1_SHIFT 8
4039

41-
#define TCFG1_SHIFT(x) ((x) * 4)
42-
#define TCFG1_MUX_MASK 0xf
40+
#define TCFG1_SHIFT(x) ((x) * 4)
41+
#define TCFG1_MUX_MASK 0xf
4342

4443
/*
4544
* Each channel occupies 4 bits in TCON register, but there is a gap of 4
@@ -183,7 +182,7 @@ static void samsung_time_start(unsigned int channel, bool periodic)
183182
}
184183

185184
static int samsung_set_next_event(unsigned long cycles,
186-
struct clock_event_device *evt)
185+
struct clock_event_device *evt)
187186
{
188187
/*
189188
* This check is needed to account for internal rounding
@@ -225,6 +224,7 @@ static void samsung_clockevent_resume(struct clock_event_device *cev)
225224

226225
if (pwm.variant.has_tint_cstat) {
227226
u32 mask = (1 << pwm.event_id);
227+
228228
writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT);
229229
}
230230
}
@@ -248,6 +248,7 @@ static irqreturn_t samsung_clock_event_isr(int irq, void *dev_id)
248248

249249
if (pwm.variant.has_tint_cstat) {
250250
u32 mask = (1 << pwm.event_id);
251+
251252
writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT);
252253
}
253254

@@ -272,7 +273,7 @@ static void __init samsung_clockevent_init(void)
272273

273274
time_event_device.cpumask = cpumask_of(0);
274275
clockevents_config_and_register(&time_event_device,
275-
clock_rate, 1, pwm.tcnt_max);
276+
clock_rate, 1, pwm.tcnt_max);
276277

277278
irq_number = pwm.irq[pwm.event_id];
278279
if (request_irq(irq_number, samsung_clock_event_isr,
@@ -282,6 +283,7 @@ static void __init samsung_clockevent_init(void)
282283

283284
if (pwm.variant.has_tint_cstat) {
284285
u32 mask = (1 << pwm.event_id);
286+
285287
writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT);
286288
}
287289
}
@@ -347,7 +349,7 @@ static int __init samsung_clocksource_init(void)
347349
pwm.source_reg = pwm.base + pwm.source_id * 0x0c + 0x14;
348350

349351
sched_clock_register(samsung_read_sched_clock,
350-
pwm.variant.bits, clock_rate);
352+
pwm.variant.bits, clock_rate);
351353

352354
samsung_clocksource.mask = CLOCKSOURCE_MASK(pwm.variant.bits);
353355
return clocksource_register_hz(&samsung_clocksource, clock_rate);
@@ -398,7 +400,8 @@ static int __init _samsung_pwm_clocksource_init(void)
398400
}
399401

400402
void __init samsung_pwm_clocksource_init(void __iomem *base,
401-
unsigned int *irqs, struct samsung_pwm_variant *variant)
403+
unsigned int *irqs,
404+
struct samsung_pwm_variant *variant)
402405
{
403406
pwm.base = base;
404407
memcpy(&pwm.variant, variant, sizeof(pwm.variant));

include/clocksource/samsung_pwm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct samsung_pwm_variant {
2727
};
2828

2929
void samsung_pwm_clocksource_init(void __iomem *base,
30-
unsigned int *irqs, struct samsung_pwm_variant *variant);
30+
unsigned int *irqs,
31+
struct samsung_pwm_variant *variant);
3132

3233
#endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */

0 commit comments

Comments
 (0)