Re: drm/tegra: sor: Implement sor1_brick clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 01, 2016 at 11:58:13PM +0300, Dan Carpenter wrote:
> Hello Thierry Reding,
> 
> The patch a7ba8310c7f5: "drm/tegra: sor: Implement sor1_brick clock"
> from Oct 1, 2015, leads to the following static checker warning:
> 
> 	drivers/gpu/drm/tegra/sor.c:318 tegra_clk_sor_brick_get_parent()
> 	warn: assigning (-22) to unsigned variable 'parent'
> 
> drivers/gpu/drm/tegra/sor.c
>    314  static u8 tegra_clk_sor_brick_get_parent(struct clk_hw *hw)
>                ^^
> returns u8.
> 
>    315  {
>    316          struct tegra_clk_sor_brick *brick = to_brick(hw);
>    317          struct tegra_sor *sor = brick->sor;
>    318          u8 parent = -EINVAL;

This ultimately has the effect of setting u8 to 0xff, which is the most
natural value to signify that the parent is invalid. But yeah, it's not
nice to rely on this behaviour, so I've used U8_MAX instead now.

Thanks,
Thierry

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux