public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: drm/tegra: sor: Implement sor1_brick clock
Date: Thu, 14 Jul 2016 14:56:12 +0200	[thread overview]
Message-ID: <20160714125611.GB3189@ulmo.ba.sec> (raw)
In-Reply-To: <20160701205813.GA12447@mwanda>

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-07-14 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 20:58 drm/tegra: sor: Implement sor1_brick clock Dan Carpenter
2016-07-14 12:56 ` Thierry Reding [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160714125611.GB3189@ulmo.ba.sec \
    --to=treding-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox