linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3 01/34] clk_ops: change round_rate() to return unsigned long
       [not found] ` <1514835793-1104-2-git-send-email-pure.logic@nexus-software.ie>
@ 2018-01-03 10:07   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; only message in thread
From: Mauro Carvalho Chehab @ 2018-01-03 10:07 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: mturquette, sboyd, linux-kernel, linux-clk, linux-omap,
	linux-arm-kernel, linux-mips, linux-rpi-kernel, patches,
	uclinux-h8-devel, linux-amlogic, linux-arm-msm, linux-soc,
	linux-renesas-soc, linux-rockchip, linux-samsung-soc, linux-tegra,
	dri-devel, linux-mediatek, freedreno, linux-media, linux-rtc

Em Mon,  1 Jan 2018 19:42:40 +0000
Bryan O'Donoghue <pure.logic@nexus-software.ie> escreveu:

> Right now it is not possible to return a value larger than LONG_MAX on 32
> bit systems. You can pass a rate of ULONG_MAX but can't return anything
> past LONG_MAX due to the fact both the rounded_rate and negative error
> codes are represented in the return value of round_rate().
> 
> Most implementations either return zero on error or don't return error
> codes at all. A minority of implementations do return a negative number -
> typically -EINVAL or -ENODEV.
> 
> At the higher level then callers of round_rate() typically and rightly
> check for a value of <= 0.
> 
> It is possible then to convert round_rate() to an unsigned long return
> value and change error code indication for the minority from -ERRORCODE to
> a simple 0.
> 
> This patch is the first step in making it possible to scale round_rate past
> LONG_MAX, later patches will change the previously mentioned minority of
> round_rate() implementations to return zero only on error if those
> implementations currently return a negative error number. Implementations
> that do not return an error code of < 0 will be left as-is.
> 

>  drivers/media/platform/omap3isp/isp.c           |  4 ++--

Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

Thanks,
Mauro

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-03 10:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1514835793-1104-1-git-send-email-pure.logic@nexus-software.ie>
     [not found] ` <1514835793-1104-2-git-send-email-pure.logic@nexus-software.ie>
2018-01-03 10:07   ` [PATCH v3 01/34] clk_ops: change round_rate() to return unsigned long Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).