OSDN Git Service

rtc: rx8010: don't use magic values for time buffer length
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Sep 2020 15:45:54 +0000 (17:45 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Sep 2020 08:50:37 +0000 (10:50 +0200)
commitf702699c67d315e4a232c64801b2de9af87fd9f4
tree514876f065975bb6710ccc380ec739abf29253f5
parent13952c9e35384fd7f63a5ce8261108695491bb56
rtc: rx8010: don't use magic values for time buffer length

The time buffer len is used directly in this driver. For readability
it's better to define it as the difference between the date register
offsets and use sizeof() whenever referencing it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200914154601.32245-8-brgl@bgdev.pl
drivers/rtc/rtc-rx8010.c