Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: at91sam9: correct trivial checkpatch warnings

Correct trivial checkpatch warnings, mostly whitespace issues and
unbalanced braces.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+20 -20
+20 -20
drivers/rtc/rtc-at91sam9.c
··· 43 43 * registers available, likewise usable for more than "RTC" support. 44 44 */ 45 45 46 - #define AT91_RTT_MR 0x00 /* Real-time Mode Register */ 47 - #define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */ 48 - #define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ 49 - #define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ 50 - #define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */ 46 + #define AT91_RTT_MR 0x00 /* Real-time Mode Register */ 47 + #define AT91_RTT_RTPRES (0xffff << 0) /* Timer Prescaler Value */ 48 + #define AT91_RTT_ALMIEN BIT(16) /* Alarm Interrupt Enable */ 49 + #define AT91_RTT_RTTINCIEN BIT(17) /* Increment Interrupt Enable */ 50 + #define AT91_RTT_RTTRST BIT(18) /* Timer Restart */ 51 51 52 - #define AT91_RTT_AR 0x04 /* Real-time Alarm Register */ 53 - #define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ 52 + #define AT91_RTT_AR 0x04 /* Real-time Alarm Register */ 53 + #define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ 54 54 55 - #define AT91_RTT_VR 0x08 /* Real-time Value Register */ 56 - #define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ 55 + #define AT91_RTT_VR 0x08 /* Real-time Value Register */ 56 + #define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ 57 57 58 - #define AT91_RTT_SR 0x0c /* Real-time Status Register */ 59 - #define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */ 60 - #define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */ 58 + #define AT91_RTT_SR 0x0c /* Real-time Status Register */ 59 + #define AT91_RTT_ALMS BIT(0) /* Alarm Status */ 60 + #define AT91_RTT_RTTINC BIT(1) /* Timer Increment */ 61 61 62 62 /* 63 63 * We store ALARM_DISABLED in ALMV to record that no alarm is set. ··· 65 65 */ 66 66 #define ALARM_DISABLED ((u32)~0) 67 67 68 - 69 68 struct sam9_rtc { 70 69 void __iomem *rtt; 71 70 struct rtc_device *rtcdev; 72 71 u32 imr; 73 72 struct regmap *gpbr; 74 73 unsigned int gpbr_offset; 75 - int irq; 74 + int irq; 76 75 struct clk *sclk; 77 76 bool suspended; 78 77 unsigned long events; ··· 252 253 u32 mr = rtt_readl(rtc, MR); 253 254 254 255 seq_printf(seq, "update_IRQ\t: %s\n", 255 - (mr & AT91_RTT_RTTINCIEN) ? "yes" : "no"); 256 + (mr & AT91_RTT_RTTINCIEN) ? "yes" : "no"); 256 257 return 0; 257 258 } 258 259 ··· 288 289 rtc->events = 0; 289 290 290 291 pr_debug("%s: num=%ld, events=0x%02lx\n", __func__, 291 - rtc->events >> 8, rtc->events & 0x000000FF); 292 + rtc->events >> 8, rtc->events & 0x000000FF); 292 293 } 293 294 294 295 /* ··· 366 367 return PTR_ERR(rtc->rtt); 367 368 368 369 ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node, 369 - "atmel,rtt-rtc-time-reg", 1, 0, 370 - &args); 370 + "atmel,rtt-rtc-time-reg", 1, 0, 371 + &args); 371 372 if (ret) 372 373 return ret; 373 374 ··· 433 434 434 435 if (gpbr_readl(rtc) == 0) 435 436 dev_warn(&pdev->dev, "%s: SET TIME!\n", 436 - dev_name(&rtc->rtcdev->dev)); 437 + dev_name(&rtc->rtcdev->dev)); 437 438 438 439 return rtc_register_device(rtc->rtcdev); 439 440 ··· 493 494 /* don't let RTTINC cause wakeups */ 494 495 if (mr & AT91_RTT_RTTINCIEN) 495 496 rtt_writel(rtc, MR, mr & ~AT91_RTT_RTTINCIEN); 496 - } else 497 + } else { 497 498 rtt_writel(rtc, MR, mr & ~rtc->imr); 499 + } 498 500 } 499 501 500 502 return 0;