Linux wireless drivers development
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Cc: linux-wireless@vger.kernel.org, johannes.berg@intel.com,
	hofrat@osadl.org, xypron.glpk@gmx.de,
	prameela.garnepudi@redpinesignals.com
Subject: Re: [PATCH 3/3] rsi: Updated boot parameters
Date: Thu, 13 Oct 2016 15:45:37 +0300	[thread overview]
Message-ID: <87vawwct8u.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1476358025-15576-1-git-send-email-prameela.j04cs@gmail.com> (Prameela Rani Garnepudi's message of "Thu, 13 Oct 2016 16:57:05 +0530")

Prameela Rani Garnepudi <prameela.j04cs@gmail.com> writes:

> * Switch clock info is divided in to different clock information fields for
>   readability and synchronization with firmware code.
> * Other parameters are added for future use and to make the frame size in sync
>   with latest firmware. Otherwise firmware will discard the frame considering
>   corrupted frame.
>
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

Thanks, this is much easier to review now that the style changes are gone.

>  /* structure to store configs related to UMAC clk programming */
>  struct switch_clk {
> -	__le16 switch_clk_info;
> +	__le16 switch_umac_clk : 1; /* If set rest is valid */
> +	__le16 switch_qspi_clk : 1; /* If set qspi clk will be changed */
> +	__le16 switch_slp_clk_2_32 : 1;
> +	__le16 switch_bbp_lmac_clk_reg : 1;
> +	__le16 switch_mem_ctrl_cfg : 1;
> +	__le16 reserved : 11;

This immediately caugh my eye. Are you sure this works on big endian
machines? I have never seen __le16 mixed with bitfields so I'm skeptical
that this will even work, but I don't have time to really check. Anyone
else know?

Anyway, the original code used the preferred format:

-			.switch_clk_info = cpu_to_le16(BIT(3)),

That is use BIT() or GENMASK()/FIELD_PREP() to create the bitmask in cpu
native format and then convert it with cpu_to_le*() family of functions.

-- 
Kalle Valo

  reply	other threads:[~2016-10-13 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 11:27 [PATCH 3/3] rsi: Updated boot parameters Prameela Rani Garnepudi
2016-10-13 12:45 ` Kalle Valo [this message]
2016-11-09  1:08 ` [3/3] " Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vawwct8u.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=hofrat@osadl.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=prameela.garnepudi@redpinesignals.com \
    --cc=prameela.j04cs@gmail.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox