public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: eduardo.valentin@nokia.com
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"Ujfalusi Peter (Nokia-D/Tampere)" <peter.ujfalusi@nokia.com>
Subject: Re: [PATCH 1/3] OMAP: McBSP: Use textual values in DMA operating mode sysfs files
Date: Mon, 24 Aug 2009 10:35:03 +0300	[thread overview]
Message-ID: <20090824103503.2ce92c16.jhnikula@gmail.com> (raw)
In-Reply-To: <20090824064941.GA24398@esdhcp037198.research.nokia.com>

On Mon, 24 Aug 2009 09:49:41 +0300
Eduardo Valentin <eduardo.valentin@nokia.com> wrote:

> > +			len += sprintf(buf + len, "[%s] ", *s);
> > +		else
> > +			len += sprintf(buf + len, "%s ", *s);
> > +	}
> > +	len += sprintf(len+buf, "\n");
> 
> Just a tiny thing, add spaces before and after + operator:
> +	len += sprintf(len + buf, "\n");
> 
> > +	p = memchr(buf, '\n', size);
> > +	len = p ? p - buf : size;
> 
> I guess here we have two better options, please use one of these:
> * strstrip
> * sysfs_streq
> 
Thanks Eduardo. I'll fix the first the one and use the sysfs_streq as
it's much cleaner to use.

> >  
> > -	spin_lock_irq(&mcbsp->lock);
> > +	for (s = &dma_op_modes[i]; i < ARRAY_SIZE(dma_op_modes); s++, i++)
> > +		if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
> 
> how about using strnicmp ??
> 
Are there need for case insensitive check? The sysfs_streq is not.

I'll send a new version later this day.


-- 
Jarkko

  reply	other threads:[~2009-08-24  7:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-23  9:24 [PATCH 0/3] Few patches to recent OMAP McBSP and ASoC changes Jarkko Nikula
2009-08-23  9:24 ` [PATCH 1/3] OMAP: McBSP: Use textual values in DMA operating mode sysfs files Jarkko Nikula
2009-08-24  6:49   ` Eduardo Valentin
2009-08-24  7:35     ` Jarkko Nikula [this message]
     [not found]       ` <20090824073422.GA27298@esdhcp037198.research.nokia.com>
2009-08-24 14:45         ` Jarkko Nikula
2009-08-25  6:25           ` Eduardo Valentin
2009-08-23  9:24 ` [PATCH 2/3] ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI Jarkko Nikula
2009-08-25  6:26   ` Eduardo Valentin
2009-08-23  9:24 ` [PATCH 3/3] ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop Jarkko Nikula
2009-08-25  6:26   ` Eduardo Valentin
2009-08-24 13:17 ` [PATCH 0/3] Few patches to recent OMAP McBSP and ASoC changes Eduardo Valentin
2009-08-25  9:21 ` Mark Brown

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=20090824103503.2ce92c16.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=eduardo.valentin@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@nokia.com \
    --cc=tony@atomide.com \
    /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