All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark yao <mark.yao@rock-chips.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	list@263.net,
	DRM DRIVERS FOR ROCKCHIP <dri-devel@lists.freedesktop.org>,
	ARM/Rockchip SoC support <linux-rockchip@lists.infradead.org>,
	open@263.net, Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp result
Date: Mon, 18 Jan 2016 08:46:10 +0800	[thread overview]
Message-ID: <569C35D2.5060709@rock-chips.com> (raw)
In-Reply-To: <1452761942-23864-1-git-send-email-a.hajda@samsung.com>

On 2016年01月14日 16:59, Andrzej Hajda wrote:
> The function can return negative value so it should be assigned to signed
> variable.
>
> The problem has been detected using patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>   drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 7bfe243..f8f8f29 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -461,10 +461,11 @@ static int dw_mipi_dsi_phy_init(struct dw_mipi_dsi *dsi)
>   
>   static int dw_mipi_dsi_get_lane_bps(struct dw_mipi_dsi *dsi)
>   {
> -	unsigned int bpp, i, pre;
> +	unsigned int i, pre;
>   	unsigned long mpclk, pllref, tmp;
>   	unsigned int m = 1, n = 1, target_mbps = 1000;
>   	unsigned int max_mbps = dptdin_map[ARRAY_SIZE(dptdin_map) - 1].max_mbps;
> +	int bpp;
>   
>   	bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
>   	if (bpp < 0) {

Looks good for me, Applied to my drm-next branch. :-)

Thanks.

-- 
Mark Yao


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2016-01-18  0:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  8:59 [PATCH] drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp result Andrzej Hajda
2016-01-15  1:04 ` Chris Zhong
2016-01-18  0:46 ` Mark yao [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=569C35D2.5060709@rock-chips.com \
    --to=mark.yao@rock-chips.com \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=list@263.net \
    --cc=m.szyprowski@samsung.com \
    --cc=open@263.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.