linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Gross <agross@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	"linux-soc@vger.kernel.org" <linux-soc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/6] soc: qcom: gsbi: Add support for ADM CRCI muxing
Date: Wed, 28 Jan 2015 11:26:21 -0600	[thread overview]
Message-ID: <20150128172621.GA17315@qualcomm.com> (raw)
In-Reply-To: <20150128031149.GM11960@sonymobile.com>

On Tue, Jan 27, 2015 at 07:11:50PM -0800, Bjorn Andersson wrote:
> On Tue 27 Jan 14:10 PST 2015, Andy Gross wrote:
> 
> This solution looks good, just some style things.
> 
> > diff --git a/drivers/soc/qcom/qcom_gsbi.c b/drivers/soc/qcom/qcom_gsbi.c
> [..]
> > +#define MAX_GSBI		12
> > +
> > +#define TCSR_ADM_CRCI_BASE	0x70
> > +
> > +struct crci_config {
> > +	u32 num_rows;
> > +	const u32 *array;
> 
> Making this:
>  const u32 (*array)[MAX_GSBI];

ok, i'll switch to do this instead and change the usage down below.

<snip>

> > +			else
> > +				val = 0;
> > +
> > +			regmap_update_bits(gsbi->tcsr,
> > +				TCSR_ADM_CRCI_BASE + 0x4*i,
> > +				config->array[i*MAX_GSBI + gsbi_num - 1], val);
> 
> To me this would be cleaner:
> 
> mask = config->array[i][gsbi_num - 1];
> if (gsbi->mode == GSBI_PRO_SPI)
> 	regmap_update_bits(gsbi->tcsr, TCSR_ADM_CRCI_BASE + i * 4, mask, mask);
> else
> 	regmap_update_bits(gsbi->tcsr, TCSR_ADM_CRCI_BASE + i * 4, mask, 0);

i had considered doing something similar.  It does make it cleaner, so I'll do
this.

> > +		}
> > +
> There should be an extra set of {} around the if statment body.

done


-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


  reply	other threads:[~2015-01-29  1:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 22:10 [PATCH 0/6] GSBI CRCI Autoconfiguration Support Andy Gross
2015-01-27 22:10 ` [PATCH 1/6] soc: qcom: gsbi: Add support for ADM CRCI muxing Andy Gross
2015-01-28  3:11   ` Bjorn Andersson
2015-01-28 17:26     ` Andy Gross [this message]
2015-01-28  9:05   ` Stanimir Varbanov
2015-01-28 17:27     ` Andy Gross
2015-01-29  2:11   ` Stephen Boyd
2015-01-29  5:41     ` Andy Gross
2015-01-29  6:45       ` Stephen Boyd
2015-01-27 22:10 ` [PATCH 2/6] mfd: qcom,tcsr: Add device tree binding for TCSR Andy Gross
2015-01-27 22:10 ` [PATCH 3/6] ARM: DT: apq8064: Add TCSR support Andy Gross
2015-01-27 22:10 ` [PATCH 4/6] ARM: DT: ipq8064: " Andy Gross
2015-01-27 22:10 ` [PATCH 5/6] ARM: DT: msm8660: " Andy Gross
2015-01-27 22:10 ` [PATCH 6/6] ARM: DT: msm8960: " Andy Gross

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=20150128172621.GA17315@qualcomm.com \
    --to=agross@codeaurora.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).