netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Rob Landley <rob@landley.net>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>,
	Rob Herring <rob.herring@calxeda.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Grant Likely <grant.likely@linaro.org>,
	Krzysztof Halasa <khc@pm.waw.pl>,
	devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	marc.balemboy@c-s.fr
Subject: Re: ping [PATCH v3] WAN: Adding support for Lantiq PEF2256 E1 chipset (FALC56)
Date: Sun, 19 Jan 2014 22:22:22 -0800	[thread overview]
Message-ID: <1390198942.2472.5.camel@joe-AO722> (raw)
In-Reply-To: <52DC72CA.3090403@landley.net>

On Sun, 2014-01-19 at 18:50 -0600, Rob Landley wrote:
> On 01/19/14 13:34, Joe Perches wrote:
> > On Sun, 2014-01-19 at 19:07 +0100, Christophe Leroy wrote:
> >> Pinging this watch as we got no feedback since 22 Nov, although we have taken
> >> into account reviews from v1 and v2.
> >>
> >> The patch adds WAN support for Lantiq FALC56 - PEF2256 E1 Chipset.
> ...
> >> +static ssize_t fs_attr_Tx_TS_store(struct device *dev,
> >> +			struct device_attribute *attr,  const char *buf,
> >> +			size_t count)
> >> +{
> >> +	struct net_device *ndev = dev_get_drvdata(dev);
> >> +	struct pef2256_dev_priv *priv = dev_to_hdlc(ndev)->priv;
> >> +	unsigned long value;
> >> +	int ret = kstrtoul(buf, 16, (long int *)&value);
> >
> > unportable cast

> How is that not portable? It's long == pointer on Linux, which supports 
> LP64 on all targets. (As do BSD, MacOSX, android, and iOS.)

Sorry, I read it wrong.
long int is the same size as long and is fine.
I thought it was just int.

Still, declaring
	unsigned long foo;
and using
	(long int *)&foo;

is mixing implicit and explicit styles and perhaps
should be avoided.

> Do you mean it's not portable to Windows?
>    http://blogs.msdn.com/oldnewthing/archive/2005/01/31/363790.aspx

I hardly remember that stuff anymore.

cheers, Joe


      reply	other threads:[~2014-01-20  6:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-19 18:07 ping [PATCH v3] WAN: Adding support for Lantiq PEF2256 E1 chipset (FALC56) Christophe Leroy
2014-01-19 19:34 ` Joe Perches
2014-01-20  0:50   ` Rob Landley
2014-01-20  6:22     ` Joe Perches [this message]

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=1390198942.2472.5.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=khc@pm.waw.pl \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.balemboy@c-s.fr \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=swarren@wwwdotorg.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).