netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: David Miller <davem@davemloft.net>,
	SocketCAN Core Mailing List <socketcan-core@lists.berlios.de>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH v3] Fix SJA1000 command register writes on SMP systems
Date: Tue, 18 May 2010 23:31:09 +0200	[thread overview]
Message-ID: <20100518213109.GA29894@merkur.ravnborg.org> (raw)
In-Reply-To: <4BF2E512.1090109@hartkopp.net>

Hi Oliver.

> diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
> index 97a622b..de8e778 100644
> --- a/drivers/net/can/sja1000/sja1000.h
> +++ b/drivers/net/can/sja1000/sja1000.h
> @@ -167,6 +167,7 @@ struct sja1000_priv {
>  
>  	void __iomem *reg_base;	 /* ioremap'ed address to registers */
>  	unsigned long irq_flags; /* for request_irq() */
> +	spinlock_t cmdreg_lock;  /* lock for concurrent cmd register writes */
>  
>  	u16 flags;		/* custom mode flags */
>  	u8 ocr;			/* output control register */

You define your spinlock inside a struct so you cannot use
DEFINE_SPINLOCK().

But then you need to use spin_lock_init() - which I fail to see
you are doing in your patch.

	Sam

  parent reply	other threads:[~2010-05-18 21:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 19:05 [PATCH v3] Fix SJA1000 command register writes on SMP systems Oliver Hartkopp
2010-05-18 21:03 ` David Miller
2010-05-18 21:31 ` Sam Ravnborg [this message]
     [not found]   ` <20100518213109.GA29894-OoSGOWW0KRunlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2010-05-19 16:23     ` Oliver Hartkopp

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=20100518213109.GA29894@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan-core@lists.berlios.de \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).