RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "'Helge Deller'" <deller@xxxxxx>, "'Sergey Senozhatsky'" <sergey.senozhatsky.work@xxxxxxxxx>
- Subject: RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers
- From: David Laight <David.Laight@xxxxxxxxxx>
- Date: Wed, 20 Sep 2017 08:41:40 +0000
- Accept-language: en-GB, en-US
- Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>, "Luck, Tony" <tony.luck@xxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, Jessica Yu <jeyu@xxxxxxxxxx>, "James E . J . Bottomley" <jejb@xxxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, "Alexei Starovoitov" <ast@xxxxxxxxxx>, Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
- In-reply-to: <a7a0f1f6-781b-eba3-9b81-69b979503990@gmx.de>
- References: <20170916035347.19705-1-sergey.senozhatsky@gmail.com> <20170918174432.4fksyzco2g6gczwe@intel.com> <20170918183902.GA30752@p100.box> <20170919020537.GA16991@jagdpanzerIV.localdomain> <063D6719AE5E284EB5DD2968C1650D6DD007A0D0@AcuExch.aculab.com> <a7a0f1f6-781b-eba3-9b81-69b979503990@gmx.de>
From: Helge Deller
> Sent: 19 September 2017 21:08
...
> > Using 'unsigned long' for any kind of pointer is an accident
> > waiting do happen.
> > It also makes it difficult to typecheck the function calls.
> > Using 'void *' isn't any better.
> > Either a pointer to an undefined struct, or a struct containing
> > a single 'char' member, is likely to be safest.
>
> David, you might be right in most cases, but in this case I'd prefer
> unsigned long too. I think this will create the least amount of
> typecasts here.
I've not looked at the specifics case...
Another option is using a struct with a single member and
passing it by value.
This could be used for things like user-space pointers or
even errno values.
The only problem is old ABI where even small structures are
always passed by reference.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]