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] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <CO6PR18MB40986EC61B5D226FF562AA02B0FB2@CO6PR18MB4098.namprd18.prod.outlook.com>
Date: Fri, 7 Jun 2024 15:14:45 +0000
From: Witold Sadowski <wsadowski@...vell.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
        "oe-kbuild@...ts.linux.dev"
	<oe-kbuild@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "linux-spi@...r.kernel.org"
	<linux-spi@...r.kernel.org>,
        "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>
CC: "lkp@...el.com" <lkp@...el.com>,
        "oe-kbuild-all@...ts.linux.dev"
	<oe-kbuild-all@...ts.linux.dev>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "robh@...nel.org" <robh@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org"
	<krzysztof.kozlowski+dt@...aro.org>,
        "conor+dt@...nel.org"
	<conor+dt@...nel.org>,
        "pthombar@...ence.com" <pthombar@...ence.com>
Subject: RE: [EXTERNAL] Re: [PATCH v7 2/4] spi: cadence: Add Marvell xSPI IP
 overlay changes

> 5828a861b01b62 Witold Sadowski 2024-05-29  302  static bool
> cdns_xspi_reset_dll(struct cdns_xspi_dev *cdns_xspi)
> 5828a861b01b62 Witold Sadowski 2024-05-29  303  {
> 5828a861b01b62 Witold Sadowski 2024-05-29  304  	u32 dll_cntrl =
> readl(cdns_xspi->iobase +
> 5828a861b01b62 Witold Sadowski 2024-05-29  305
> CDNS_XSPI_RF_MINICTRL_REGS_DLL_PHY_CTRL);
> 5828a861b01b62 Witold Sadowski 2024-05-29  306  	u32 dll_lock;
> 5828a861b01b62 Witold Sadowski 2024-05-29  307
> 5828a861b01b62 Witold Sadowski 2024-05-29  308  	/* Reset DLL */
> 5828a861b01b62 Witold Sadowski 2024-05-29  309  	dll_cntrl |=
> CDNS_XSPI_DLL_RST_N;
> 5828a861b01b62 Witold Sadowski 2024-05-29  310  	writel(dll_cntrl,
> cdns_xspi->iobase +
> 5828a861b01b62 Witold Sadowski 2024-05-29  311
> CDNS_XSPI_RF_MINICTRL_REGS_DLL_PHY_CTRL);
> 5828a861b01b62 Witold Sadowski 2024-05-29  312
> 5828a861b01b62 Witold Sadowski 2024-05-29  313  	/* Wait for DLL lock
> */
> 5828a861b01b62 Witold Sadowski 2024-05-29 @314  	return
> readl_relaxed_poll_timeout(cdns_xspi->iobase +
> 5828a861b01b62 Witold Sadowski 2024-05-29  315
> 	CDNS_XSPI_INTR_STATUS_REG,
> 5828a861b01b62 Witold Sadowski 2024-05-29  316  		dll_lock,
> ((dll_lock & CDNS_XSPI_DLL_LOCK) == 1), 10, 10000);
> 
> Functions which return true/false should have names which say what the
> return means.  Like access_ok() or is_something().  Returning true for
> failure and false for success is a backwards anti-pattern.  This error
> return value gets propagated back until it is eventually ignored so it
> doesn't affect runtime.

Ok, I will rework dll reset and lock into separate functions.

> 
> 5828a861b01b62 Witold Sadowski 2024-05-29  317  }
> 
> --
> 0-DAY CI Kernel Test Service
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_intel_lkp-
> 2Dtests_wiki&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=GKgcn-g6ZX-
> JmCL3S2qKgVQhvhv7hu2n8En-
> dZbLTa8&m=2Tyu1l8OLops5Wk0jhMClv2KWeHzTLpsaAhANwtcG2B1koElBL9h8zS_z_-
> T8On7&s=01Illw-eCdS6pP0W-BnXjtntuLsuJSnvQTwS_t_TVcc&e=

Regards
Witek


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ