lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 24 Jul 2017 07:07:00 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Colin King <colin.king@...onical.com>
Cc:     kbuild-all@...org, Mauro Carvalho Chehab <mchehab@...nel.org>,
        Max Kellermann <max.kellermann@...il.com>,
        Ingo Molnar <mingo@...nel.org>,
        Markus Elfring <elfring@...rs.sourceforge.net>,
        Shuah Khan <shuah@...nel.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dvb_frontend: initialize variable s with FE_NONE instead
 of 0

Hi Colin,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.13-rc1 next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Colin-King/dvb_frontend-initialize-variable-s-with-FE_NONE-instead-of-0/20170724-063439
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-x019-201730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/media/dvb-core/dvb_frontend.c: In function 'dvb_frontend_swzigzag':
>> drivers/media/dvb-core/dvb_frontend.c:463:21: error: 'FE_NONE' undeclared (first use in this function)
     enum fe_status s = FE_NONE;
                        ^~~~~~~
   drivers/media/dvb-core/dvb_frontend.c:463:21: note: each undeclared identifier is reported only once for each function it appears in

vim +/FE_NONE +463 drivers/media/dvb-core/dvb_frontend.c

   460	
   461	static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
   462	{
 > 463		enum fe_status s = FE_NONE;
   464		int retval = 0;
   465		struct dvb_frontend_private *fepriv = fe->frontend_priv;
   466		struct dtv_frontend_properties *c = &fe->dtv_property_cache, tmp;
   467	
   468		/* if we've got no parameters, just keep idling */
   469		if (fepriv->state & FESTATE_IDLE) {
   470			fepriv->delay = 3*HZ;
   471			fepriv->quality = 0;
   472			return;
   473		}
   474	
   475		/* in SCAN mode, we just set the frontend when asked and leave it alone */
   476		if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) {
   477			if (fepriv->state & FESTATE_RETUNE) {
   478				tmp = *c;
   479				if (fe->ops.set_frontend)
   480					retval = fe->ops.set_frontend(fe);
   481				*c = tmp;
   482				if (retval < 0)
   483					fepriv->state = FESTATE_ERROR;
   484				else
   485					fepriv->state = FESTATE_TUNED;
   486			}
   487			fepriv->delay = 3*HZ;
   488			fepriv->quality = 0;
   489			return;
   490		}
   491	
   492		/* get the frontend status */
   493		if (fepriv->state & FESTATE_RETUNE) {
   494			s = 0;
   495		} else {
   496			if (fe->ops.read_status)
   497				fe->ops.read_status(fe, &s);
   498			if (s != fepriv->status) {
   499				dvb_frontend_add_event(fe, s);
   500				fepriv->status = s;
   501			}
   502		}
   503	
   504		/* if we're not tuned, and we have a lock, move to the TUNED state */
   505		if ((fepriv->state & FESTATE_WAITFORLOCK) && (s & FE_HAS_LOCK)) {
   506			dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
   507			fepriv->state = FESTATE_TUNED;
   508	
   509			/* if we're tuned, then we have determined the correct inversion */
   510			if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) &&
   511			    (c->inversion == INVERSION_AUTO)) {
   512				c->inversion = fepriv->inversion;
   513			}
   514			return;
   515		}
   516	
   517		/* if we are tuned already, check we're still locked */
   518		if (fepriv->state & FESTATE_TUNED) {
   519			dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
   520	
   521			/* we're tuned, and the lock is still good... */
   522			if (s & FE_HAS_LOCK) {
   523				return;
   524			} else { /* if we _WERE_ tuned, but now don't have a lock */
   525				fepriv->state = FESTATE_ZIGZAG_FAST;
   526				fepriv->started_auto_step = fepriv->auto_step;
   527				fepriv->check_wrapped = 0;
   528			}
   529		}
   530	
   531		/* don't actually do anything if we're in the LOSTLOCK state,
   532		 * the frontend is set to FE_CAN_RECOVER, and the max_drift is 0 */
   533		if ((fepriv->state & FESTATE_LOSTLOCK) &&
   534		    (fe->ops.info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) {
   535			dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
   536			return;
   537		}
   538	
   539		/* don't do anything if we're in the DISEQC state, since this
   540		 * might be someone with a motorized dish controlled by DISEQC.
   541		 * If its actually a re-tune, there will be a SET_FRONTEND soon enough.	*/
   542		if (fepriv->state & FESTATE_DISEQC) {
   543			dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
   544			return;
   545		}
   546	
   547		/* if we're in the RETUNE state, set everything up for a brand
   548		 * new scan, keeping the current inversion setting, as the next
   549		 * tune is _very_ likely to require the same */
   550		if (fepriv->state & FESTATE_RETUNE) {
   551			fepriv->lnb_drift = 0;
   552			fepriv->auto_step = 0;
   553			fepriv->auto_sub_step = 0;
   554			fepriv->started_auto_step = 0;
   555			fepriv->check_wrapped = 0;
   556		}
   557	
   558		/* fast zigzag. */
   559		if ((fepriv->state & FESTATE_SEARCHING_FAST) || (fepriv->state & FESTATE_RETUNE)) {
   560			fepriv->delay = fepriv->min_delay;
   561	
   562			/* perform a tune */
   563			retval = dvb_frontend_swzigzag_autotune(fe,
   564								fepriv->check_wrapped);
   565			if (retval < 0) {
   566				return;
   567			} else if (retval) {
   568				/* OK, if we've run out of trials at the fast speed.
   569				 * Drop back to slow for the _next_ attempt */
   570				fepriv->state = FESTATE_SEARCHING_SLOW;
   571				fepriv->started_auto_step = fepriv->auto_step;
   572				return;
   573			}
   574			fepriv->check_wrapped = 1;
   575	
   576			/* if we've just retuned, enter the ZIGZAG_FAST state.
   577			 * This ensures we cannot return from an
   578			 * FE_SET_FRONTEND ioctl before the first frontend tune
   579			 * occurs */
   580			if (fepriv->state & FESTATE_RETUNE) {
   581				fepriv->state = FESTATE_TUNING_FAST;
   582			}
   583		}
   584	
   585		/* slow zigzag */
   586		if (fepriv->state & FESTATE_SEARCHING_SLOW) {
   587			dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
   588	
   589			/* Note: don't bother checking for wrapping; we stay in this
   590			 * state until we get a lock */
   591			dvb_frontend_swzigzag_autotune(fe, 0);
   592		}
   593	}
   594	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (30572 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ