Re: ping [PATCH v3] WAN: Adding support for Lantiq PEF2256 E1 chipset (FALC56)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux