linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jason Yan <yanaijie@huawei.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	b.zolnierkie@samsung.com
Subject: Re: [PATCH] video: fbdev: matroxfb: remove dead code and set but not used variable
Date: Wed, 08 Apr 2020 10:18:52 +0000	[thread overview]
Message-ID: <20200408101852.GC20795@ravnborg.org> (raw)
In-Reply-To: <20200403021609.20968-1-yanaijie@huawei.com>

Hi Jason.

On Fri, Apr 03, 2020 at 10:16:09AM +0800, Jason Yan wrote:
> Fix the following gcc warning:
> 
> drivers/video/fbdev/matrox/g450_pll.c:336:15: warning: variable
> ‘pixel_vco’ set but not used [-Wunused-but-set-variable]
>   unsigned int pixel_vco;
>                ^~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Thanks, committed and pushed to drm-misc-next.
The fix will show up in upstream kernel at the next
merge window.

	Sam

> ---
>  drivers/video/fbdev/matrox/g450_pll.c | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/drivers/video/fbdev/matrox/g450_pll.c b/drivers/video/fbdev/matrox/g450_pll.c
> index c15f8a57498e..ff8e321a22ce 100644
> --- a/drivers/video/fbdev/matrox/g450_pll.c
> +++ b/drivers/video/fbdev/matrox/g450_pll.c
> @@ -333,11 +333,9 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
>  			 unsigned int *deltaarray)
>  {
>  	unsigned int mnpcount;
> -	unsigned int pixel_vco;
>  	const struct matrox_pll_limits* pi;
>  	struct matrox_pll_cache* ci;
>  
> -	pixel_vco = 0;
>  	switch (pll) {
>  		case M_PIXEL_PLL_A:
>  		case M_PIXEL_PLL_B:
> @@ -420,7 +418,6 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
>  				
>  				mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16;
>  				mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8;
> -				pixel_vco = g450_mnp2vco(minfo, mnp);
>  				matroxfb_DAC_unlock_irqrestore(flags);
>  			}
>  			pi = &minfo->limits.video;
> @@ -441,25 +438,6 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
>  			unsigned int delta;
>  
>  			vco = g450_mnp2vco(minfo, mnp);
> -#if 0			
> -			if (pll = M_VIDEO_PLL) {
> -				unsigned int big, small;
> -
> -				if (vco < pixel_vco) {
> -					small = vco;
> -					big = pixel_vco;
> -				} else {
> -					small = pixel_vco;
> -					big = vco;
> -				}
> -				while (big > small) {
> -					big >>= 1;
> -				}
> -				if (big = small) {
> -					continue;
> -				}
> -			}
> -#endif			
>  			delta = pll_freq_delta(fout, g450_vco2f(mnp, vco));
>  			for (idx = mnpcount; idx > 0; idx--) {
>  				/* = is important; due to nextpll algorithm we get
> -- 
> 2.17.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2020-04-08 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  2:16 [PATCH] video: fbdev: matroxfb: remove dead code and set but not used variable Jason Yan
2020-04-08 10:18 ` Sam Ravnborg [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=20200408101852.GC20795@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=yanaijie@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).