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] [thread-next>] [day] [month] [year] [list]
Message-ID: <816cc363-5b49-9b04-54a4-be4f53001cc5@linux.intel.com>
Date:   Fri, 13 Mar 2020 11:31:01 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Vinod Koul <vkoul@...nel.org>
Cc:     alsa-devel@...a-project.org, tiwai@...e.de,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
        Hui Wang <hui.wang@...onical.com>, broonie@...nel.org,
        srinivas.kandagatla@...aro.org, jank@...ence.com,
        slawomir.blauciak@...el.com, Sanyog Kale <sanyog.r.kale@...el.com>,
        Rander Wang <rander.wang@...el.com>,
        Bard liao <yung-chuan.liao@...ux.intel.com>,
        Rander Wang <rander.wang@...ux.intel.com>
Subject: Re: [PATCH 03/16] soundwire: cadence: add interface to check clock
 status



>> +/**
>> + * sdw_cdns_is_clock_stop: Check clock status
>> + *
>> + * @cdns: Cadence instance
>> + */
>> +bool sdw_cdns_is_clock_stop(struct sdw_cdns *cdns)
>> +{
>> +	u32 status;
>> +
>> +	status = cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP;
>> +	if (status) {
>> +		dev_dbg(cdns->dev, "Clock is stopped\n");
>> +		return true;
>> +	}
> 
> This can be further optimized to:
> 
>          return !!(cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP);

The logs are very useful for debug.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ