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: <20180301210428.GS12864@sirena.org.uk>
Date:   Thu, 1 Mar 2018 21:04:28 +0000
From:   Mark Brown <broonie@...nel.org>
To:     srinivas.kandagatla@...aro.org
Cc:     andy.gross@...aro.org, linux-arm-msm@...r.kernel.org,
        alsa-devel@...a-project.org, david.brown@...aro.org,
        robh+dt@...nel.org, mark.rutland@....com, lgirdwood@...il.com,
        plai@...eaurora.org, bgoswami@...eaurora.org, perex@...ex.cz,
        tiwai@...e.com, linux-soc@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, rohkumar@....qualcomm.com,
        spatakok@....qualcomm.com
Subject: Re: [PATCH v3 03/25] ASoC: qcom: qdsp6: Add common qdsp6 helper
 functions

On Tue, Feb 13, 2018 at 04:58:15PM +0000, srinivas.kandagatla@...aro.org wrote:

> +config SND_SOC_QDSP6_COMMON
> +	tristate
> +	default n
> +

Ah, the other default n that had snuck in was actually in an earlier
patch in the series!  I'm fairly sure this has come up with earlier
drivers you've submitted...

> +int q6dsp_map_channels(u8 ch_map[PCM_FORMAT_MAX_NUM_CHANNEL], int ch)
> +{
> +	memset(ch_map, 0, PCM_FORMAT_MAX_NUM_CHANNEL);
> +
> +	switch (ch) {
> +	case 1:
> +			ch_map[0] = PCM_CHANNEL_FC;
> +		break;
> +	case 2:
> +			ch_map[0] = PCM_CHANNEL_FL;
> +			ch_map[1] = PCM_CHANNEL_FR;
> +		break;

That's some really funky indentation there...

> +static inline int q6dsp_errno(u32 error)
> +{
> +	int ret = -EINVAL;
> +
> +	if (error <= ARRAY_SIZE(q6dsp_err_codes))
> +		ret = q6dsp_err_codes[error].lnx_err_code;
> +
> +	return ret;
> +}

Is the error handling such a hot path that we need to make the lookup
functions (and the data table with the lookups) static inlines in a
header or could we just move the functions and the data into a C file?
Especially given the string lookups for the errors (which are really
nice to have) it seems wasteful.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ