Skip to content

make clk_get_rate implementations behavior more consistent

Jonas Gorski linux-arm-kernel linux-m68k linux-mips lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ARM: ep93xx: allow NULL clock for clk_get_ratearch/arm/mach-ep93xx/clock.c+3 -01 reply
2/9ARM: mmp: allow NULL clock for clk_get_ratearch/arm/mach-mmp/clock.c+3 -10 replies
3/9blackfin: bf609: allow NULL clock for clk_get_ratearch/blackfin/mach-bf609/clock.c+1 -11 reply
4/9m68k: allow NULL clock for clk_get_ratearch/m68k/coldfire/clk.c+3 -00 replies
4/9m68k: allow NULL clock for clk_get_ratearch/m68k/coldfire/clk.c+3 -05 replies
5/9MIPS: AR7: allow NULL clock for clk_get_ratearch/mips/ar7/clock.c+3 -00 replies
6/9MIPS: BCM63XX: allow NULL clock for clk_get_ratearch/mips/bcm63xx/clk.c+3 -01 reply
7/9MIPS: Loongson 2F: allow NULL clock for clk_get_ratearch/mips/loongson64/lemote-2f/clock.c+3 -00 replies
8/9MIPS: ralink: allow NULL clock for clk_get_ratearch/mips/ralink/clk.c+3 -00 replies
9/9unicore32: allow NULL clock for clk_get_ratearch/unicore32/kernel/clock.c+3 -00 replies

Reviews trailers per patch

5 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGeert UytterhoevenGreg UngererMasahiro YamadaFlorian FainelliAlexander Sverdlin
SeriesR-b
1/9A-b
2/9
3/9R-b
4/9A-b
4/9A-b
5/9
6/9R-b
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] make clk_get_rate implementations behavior more consistent

The common clock and several other clock API implementations allow calling clk_get_rate with a NULL pointer. While not specified as expected behavior of the API, device drivers have come to rely on that, causing them to OOPS when run on a platform with a different clock API implementation.

Fix this by making sure all clk_get_rate implementations handle NULL clocks instead of OOPSing.

While some custom implementations even allow ERR_PTR()s, I decided against that as IIRC the usual idea is that errors should be handled and not silently carried over.

Cc adi-buildroot-devel at lists.sourceforge.net
Cc bcm-kernel-feedback-list at broadcom.com
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
Cc linux-m68k at lists.linux-m68k.org
Cc linux-mips at linux-mips.org

Jonas Gorski (9):
ARM: ep93xx: allow NULL clock for clk_get_rate
ARM: mmp: allow NULL clock for clk_get_rate
blackfin: bf609: allow NULL clock for clk_get_rate
m68k: allow NULL clock for clk_get_rate
MIPS: AR7: allow NULL clock for clk_get_rate
MIPS: BCM63XX: allow NULL clock for clk_get_rate
MIPS: Loongson 2F: allow NULL clock for clk_get_rate
MIPS: ralink: allow NULL clock for clk_get_rate
unicore32: allow NULL clock for clk_get_rate

 arch/arm/mach-ep93xx/clock.c           | 3 +++
 arch/arm/mach-mmp/clock.c              | 4 +++-
 arch/blackfin/mach-bf609/clock.c       | 2 +-
 arch/m68k/coldfire/clk.c               | 3 +++
 arch/mips/ar7/clock.c                  | 3 +++
 arch/mips/bcm63xx/clk.c                | 3 +++
 arch/mips/loongson64/lemote-2f/clock.c | 3 +++
 arch/mips/ralink/clk.c                 | 3 +++
 arch/unicore32/kernel/clock.c          | 3 +++
 9 files changed, 25 insertions(+), 2 deletions(-)
Signature · 1 line
2.11.0