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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180727111034.f42dhlwijthxfp3n@localhost.localdomain>
Date:   Fri, 27 Jul 2018 14:10:34 +0300
From:   Ivan Bornyakov <brnkv.i1@...il.com>
To:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Cc:     mchehab@...nel.org, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: stv090x: fix if-else order

On Thu, Jul 26, 2018 at 04:26:07PM -0300, Mauro Carvalho Chehab wrote:
> Em Fri,  1 Jun 2018 19:12:21 +0300
> Ivan Bornyakov <brnkv.i1@...il.com> escreveu:
> 
> > There is this code:
> > 
> > 	if (v >= 0x20) {
> > 		...
> > 	} else if (v < 0x20) {
> > 		...
> > 	} else if (v > 0x30) {
> > 		/* this branch is impossible */
> > 	}
> > 
> > It would be sensibly for last branch to be on the top.
> 
> Have you tested it and check at the datasheets if dev_ver > 0x30 makes
> sense?
> 
> If not, I would prefer, instead, to remove the dead code, as this
> patch may cause regressions (adding a FIXME comment about this
> special case).
> 

Hi, Mauro!

Actually, I did not test it, because I did not have the hardware.
But, in the other places of the code, the same if cases are used.

Here are a couple examples:

  static int stv090x_dvbs_track_crl(struct stv090x_state *state)
  {
          if (state->internal->dev_ver >= 0x30) {
                  ...
	  } else {
	          ...
	  }

	  ...
  }

  static u32 stv090x_srate_srch_coarse(struct stv090x_state *state)
  {
	...

	if (state->internal->dev_ver >= 0x30) {
                ...
	} else if (state->internal->dev_ver >= 0x20) {
	        ...
	}

	...
  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ