Re: [PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

From: Philipp Zabel
Date: Fri May 29 2015 - 11:38:40 EST


Hi Vladimir,

Am Freitag, den 29.05.2015, 14:31 +0300 schrieb Vladimir Zapolskiy:
[...]
> > res->start is of type phys_addr_t (well, resource_size_t) already.
> > block->start/size and cur_start/size are just offsets added to it.
>
> I agree.
>
> > I wonder if it wouldn't be more appropriate to use resource_size_t for
> > the sram_reserve .start field.
>
> Assuming that the sram_reserve .start field represents only the difference
> of two res->start and this difference fits into u32 storage, it should be
> safe to keep it as is.
>
> In my opinion integer overflow case should not be considered or handled
> by the driver, so probably the best option would be just to drop
> phys_addr_t commit, since it attempts to solve a nonexistent problem.
>
> Please let me know your opinion, if it is fine with you, I'll remove
> "use phys_addr_t instead of u32 for physical address" commit and resend
> the series.

Yes, that's fine with me.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/