All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: "Sørensen, Stefan" <Stefan.Sorensen@spectralink.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bhutchings@solarflare.com" <bhutchings@solarflare.com>,
	"christian.riesch@omicron.at" <christian.riesch@omicron.at>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH RFC net-next v1 1/9] ptp: introduce programmable pins.
Date: Mon, 10 Mar 2014 14:32:15 +0100	[thread overview]
Message-ID: <20140310133215.GA19781@netboy> (raw)
In-Reply-To: <1394455989.2296.23.camel@e37108.spectralink.com>

On Mon, Mar 10, 2014 at 12:53:09PM +0000, Sørensen, Stefan wrote:
> On Sat, 2014-03-08 at 20:42 +0100, Richard Cochran wrote:

> > +int ptp_find_pin(struct ptp_clock *ptp,
> > +		 enum ptp_pin_function func, unsigned int chan)
> > +{
> > +	struct ptp_pin_desc *pin = NULL;
> > +	int i;
> > +
> > +	mutex_lock(&ptp->pincfg_mux);
> > +	for (i = 0; i < ptp->info->n_pins; i++) {
> > +		if (ptp->info->pin_config[i].func == func &&
> > +		    ptp->info->pin_config[i].chan == chan) {
> > +			pin = &ptp->info->pin_config[i];
> > +			break;
> > +		}
> > +	}
> > +	mutex_unlock(&ptp->pincfg_mux);
> > +
> > +	return pin ? pin - ptp->info->pin_config : -1;
> > +}
> 
> Maybe replace 'pin - ptp->info->pin_config' with 'i'?

Yes, of course.

Thanks,
Richard

  reply	other threads:[~2014-03-10 13:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 19:42 [PATCH RFC net-next v1 0/9] ptp: dynamic pin control Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 1/9] ptp: introduce programmable pins Richard Cochran
2014-03-10 12:53   ` Sørensen, Stefan
2014-03-10 12:53     ` Sørensen, Stefan
2014-03-10 13:32     ` Richard Cochran [this message]
2014-03-11  7:58   ` Christian Riesch
2014-03-11 10:08     ` Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 2/9] ptp: add the pin GET/SETFUNC ioctls to the testptp program Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 3/9] ptp: expose the programmable pins via sysfs Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 4/9] ptp: drivers: set the number of programmable pins Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 5/9] dp83640: trivial fixes Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 6/9] dp83640: correct the periodic output frequency Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 7/9] dp83640: implement programmable pin functions Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 8/9] dp83640: let external input pins from the module parameters be defaults Richard Cochran
2014-03-08 19:42 ` [PATCH RFC net-next v1 9/9] dp83640: let the periodic pin from the module parameter be a default Richard Cochran
2014-03-10 12:52 ` [PATCH RFC net-next v1 0/9] ptp: dynamic pin control Sørensen, Stefan
2014-03-10 12:52   ` Sørensen, Stefan
2014-03-10 13:42   ` Richard Cochran
2014-03-12  6:58     ` Christian Riesch
2014-03-12 14:22       ` Richard Cochran
2014-03-10 14:05   ` Richard Cochran
2014-03-12  8:21 ` Christian Riesch
2014-03-12 14:46   ` Richard Cochran

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=20140310133215.GA19781@netboy \
    --to=richardcochran@gmail.com \
    --cc=Stefan.Sorensen@spectralink.com \
    --cc=bhutchings@solarflare.com \
    --cc=christian.riesch@omicron.at \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.