mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Colin King <colin.king@canonical.com>,
	Dave Airlie <airlied@redhat.com>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>, Sam Ravnborg <sam@ravnborg.org>,
	dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/mgag200: Fix uninitialized variable delta
Date: Tue, 17 Aug 2021 20:22:31 +0200	[thread overview]
Message-ID: <bc94e837-9b56-55ba-1e68-1cba79ac038a@suse.de> (raw)
In-Reply-To: <20210817163204.494166-1-colin.king@canonical.com>


[-- Attachment #1.1: Type: text/plain, Size: 1674 bytes --]

Hi

Am 17.08.21 um 18:32 schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable delta is not initialized and this will cause unexpected
> behaviour with the comparison of tmpdelta < delta. Fix this by setting
> it to 0xffffffff. This matches the behaviour as in the similar function
> mgag200_pixpll_compute_g200se_04.
> 
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 2545ac960364 ("drm/mgag200: Abstract pixel PLL via struct mgag200_pll")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

But the commit message needs Fixes etc. I just sent out a patch for this 
issue myself. I'd like to merge both patches' tags and commit the result 
under your name. (You were first.) Is that ok for you?

Best regards
Thomas

> ---
>   drivers/gpu/drm/mgag200/mgag200_pll.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_pll.c b/drivers/gpu/drm/mgag200/mgag200_pll.c
> index 7c903cf19c0d..18f1a6dd019a 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_pll.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_pll.c
> @@ -125,6 +125,7 @@ static int mgag200_pixpll_compute_g200se_00(struct mgag200_pll *pixpll, long clo
>   
>   	m = n = p = s = 0;
>   	permitteddelta = clock * 5 / 1000;
> +	delta = 0xffffffff;
>   
>   	for (testp = 8; testp > 0; testp /= 2) {
>   		if (clock * testp > vcomax)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2021-08-17 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 16:32 Colin King
2021-08-17 18:22 ` Thomas Zimmermann [this message]
2021-08-17 20:11   ` Colin Ian King

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=bc94e837-9b56-55ba-1e68-1cba79ac038a@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=colin.king@canonical.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®