Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735634

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers
Date 2017-09-20 10:50 +0200
Message-ID <urIRH-Bk-1@gated-at.bofh.it> (permalink)
References (1 earlier) <ur8lc-TR-7@gated-at.bofh.it> <ur97A-1vB-25@gated-at.bofh.it> <urg94-6pO-13@gated-at.bofh.it> <urqUN-62D-11@gated-at.bofh.it> <urx0f-1wo-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
  [PATCH 5/5] symbol lookup: use new kernel and module dereference functions Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
  [PATCH 1/5] sections: split dereference_function_descriptor() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
  [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
    Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor  dereference "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-09-16 11:50 +0200
      Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor  dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 13:40 +0200
      Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Michael Ellerman <mpe@ellerman.id.au> - 2017-09-19 12:30 +0200
        Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor  dereference Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 12:40 +0200
          Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference Michael Ellerman <mpe@ellerman.id.au> - 2017-09-20 04:00 +0200
            Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor  dereference Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-20 08:20 +0200
  [PATCH 4/5] parisc64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
  [PATCH 2/5] ia64: Add .opd based function descriptor dereference Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-16 06:00 +0200
  Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers "Luck, Tony" <tony.luck@intel.com> - 2017-09-18 19:50 +0200
    Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-18 20:40 +0200
      Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 04:10 +0200
        RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers David Laight <David.Laight@ACULAB.COM> - 2017-09-19 15:40 +0200
          Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 22:10 +0200
            RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers David Laight <David.Laight@ACULAB.COM> - 2017-09-20 10:50 +0200
              Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-20 12:30 +0200
                Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-20 18:40 +0200
        Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 16:10 +0200
          Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Helge Deller <deller@gmx.de> - 2017-09-19 22:10 +0200
            Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-20 02:50 +0200
    Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate  %pF/%pf printk specifiers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-19 04:10 +0200

csiph-web