alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Hardik Shah <hardik.t.shah@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	tiwai@suse.de, pierre-louis.bossart@linux.intel.com,
	lgirdwood@gmail.com, plai@codeaurora.org,
	patches.audio@intel.com, Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [RFC 12/14] regmap: SoundWire: Add regmap support for SoundWire bus
Date: Wed, 2 Nov 2016 13:41:31 +0530	[thread overview]
Message-ID: <20161102081131.GA31046@intel.com> (raw)
In-Reply-To: <20161028180355.o7byx4llwurfpnut@sirena.org.uk>

On Fri, Oct 28, 2016 at 07:03:55PM +0100, Mark Brown wrote:
> On Fri, Oct 21, 2016 at 06:11:10PM +0530, Hardik Shah wrote:
> 
> > +static inline void get_t_size(size_t *t_val_size, size_t *t_size,
> > +						int *reg_addr,
> > +						int *offset,
> > +						size_t *val_size)
> > +{
> > +
> > +		*t_val_size += *t_size;
> > +		*offset += *t_size;
> 
> So, I started by taking a look at this patch to get a sense of what the
> API would look like and I see that we're not following CodingStyle with
> everything indented twice :(
> 

Sorry Mark for delayed response, there was festival holidays in India, so I
was not able to reply. 

Regarding two tabs, it got missed for this function somehow, I will fix it
in next patchset.

> > +static int regmap_sdw_gather_write(void *context,
> > +			   const void *reg, size_t reg_size,
> > +			   const void *val, size_t val_size)
> > +{
> 
> > +	if (!sdw)
> > +		return 0;
> 
> Silently ignoring errors :(
> 

This should never happen ideally. This was extra check to make sure there is
not kernel crash. I can remove it as well.

> > +	if (val_size > SDW_MAX_REG_ADDR)
> > +		t_size = SDW_MAX_REG_ADDR - reg_command;
> > +	else
> > +		t_size = val_size;
> 
> This needs at least some kind of comment?


I will add few comments here.


-- 

  reply	other threads:[~2016-11-02  8:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 12:40 [RFC 00/14] SoundWire bus driver Hardik Shah
2016-10-21 12:40 ` [RFC 01/14] SoundWire: Add SoundWire bus driver documentation Hardik Shah
2016-11-14 14:15   ` Charles Keepax
2016-11-15 14:29     ` Vinod Koul
2016-11-16 17:59       ` Mark Brown
2016-11-17  5:05         ` Vinod Koul
2016-10-21 12:41 ` [RFC 02/14] SoundWire: Add SoundWire stream documentation Hardik Shah
2016-11-14 15:31   ` Charles Keepax
2016-11-14 16:50     ` Pierre-Louis Bossart
2016-11-14 17:04       ` Charles Keepax
2016-10-21 12:41 ` [RFC 03/14] SoundWire: Add error handling and locking documentation Hardik Shah
2016-11-14 15:44   ` Charles Keepax
2016-11-15 14:42     ` Vinod Koul
2016-10-21 12:41 ` [RFC 04/14] SoundWire: Add device_id table for SoundWire bus Hardik Shah
2016-10-21 12:41 ` [RFC 05/14] SoundWire: Add SoundWire bus driver interfaces Hardik Shah
2016-11-14 13:17   ` Mark Brown
2016-11-14 17:28     ` [alsa-devel] " Pierre-Louis Bossart
2016-10-21 12:41 ` [RFC 06/14] SoundWire: Add register/unregister APIs Hardik Shah
2016-11-14 13:37   ` Mark Brown
2016-11-15 13:55     ` Vinod Koul
2016-10-21 12:41 ` [RFC 07/14] SoundWire: Add SoundWire Slaves register definitions Hardik Shah
2016-10-21 12:41 ` [RFC 08/14] SoundWire: Add API for Slave registers read/write Hardik Shah
2016-10-21 12:41 ` [RFC 09/14] SoundWire: Add support to handle Slave status change Hardik Shah
2016-11-14 16:08   ` Charles Keepax
2016-11-14 17:38     ` [alsa-devel] " Pierre-Louis Bossart
2016-11-15  9:56       ` Charles Keepax
2016-10-21 12:41 ` [RFC 10/14] SoundWire: Add support for clock stop Hardik Shah
2016-10-21 12:41 ` [RFC 11/14] SoundWire: Add tracing for Slave register read/write Hardik Shah
2016-10-21 12:41 ` [RFC 12/14] regmap: SoundWire: Add regmap support for SoundWire bus Hardik Shah
2016-10-28 18:03   ` Mark Brown
2016-11-02  8:11     ` Hardik Shah [this message]
2016-10-21 12:41 ` [RFC 13/14] SoundWire: Add stream and port configuration Hardik Shah
2016-10-21 12:41 ` [RFC 14/14] SoundWire: Add support for SoundWire stream management Hardik Shah
2016-11-14 12:11 ` [RFC 00/14] SoundWire bus driver Mark Brown
2016-11-15 13:37   ` Vinod Koul

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=20161102081131.GA31046@intel.com \
    --to=hardik.t.shah@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches.audio@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=plai@codeaurora.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).