linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 12/22] sparc: %pf is only for function pointers
@ 2015-03-12 21:45 Scott Wood
  2015-03-12 21:46 ` [PATCH v2 14/22] parisc: " Scott Wood
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Scott Wood @ 2015-03-12 21:45 UTC (permalink / raw)
  To: trivial, linux-kernel; +Cc: Scott Wood, sparclinux, Sam Ravnborg

Use %ps for actual addresses, otherwise you'll get bad output
on arches like ppc64 where %pf expects a function descriptor.  Even on
other architectures, refrain from setting a bad example that people
copy.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: sparclinux@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>
---
v2: Fix commit message to reflect that this patch is about %pf, not %pF.

 arch/sparc/kernel/ds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index f87a55d..4ff835f 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -875,7 +875,7 @@ void ldom_power_off(void)
 
 static void ds_conn_reset(struct ds_info *dp)
 {
-	printk(KERN_ERR "ds-%llu: ds_conn_reset() from %pf\n",
+	printk(KERN_ERR "ds-%llu: ds_conn_reset() from %ps\n",
 	       dp->id, __builtin_return_address(0));
 }
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 14/22] parisc: %pf is only for function pointers
  2015-03-12 21:45 [PATCH v2 12/22] sparc: %pf is only for function pointers Scott Wood
@ 2015-03-12 21:46 ` Scott Wood
  2015-03-12 21:46 ` [PATCH v2 18/22] usb: gadget: serial: " Scott Wood
  2015-03-14  7:47 ` [PATCH v2 12/22] sparc: " Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2015-03-12 21:46 UTC (permalink / raw)
  To: trivial, linux-kernel; +Cc: Scott Wood, linux-parisc, James Bottomley

Use %ps for actual addresses, otherwise you'll get bad output
on arches like parisc64 where %pf expects a function descriptor.

This wasn't normally seen on parisc64 because the code is not built
unless DEBUG_SUPERIO_INIT is manually defined.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: linux-parisc@vger.kernel.org
cc: James Bottomley <James.Bottomley@HansenPartnership.com>
---
v2: Commit message updates

 drivers/parisc/superio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index 8be2096..38c5440 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -348,7 +348,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
 		BUG();
 		return -1;
 	}
-	printk("superio_fixup_irq(%s) ven 0x%x dev 0x%x from %pf\n",
+	printk("superio_fixup_irq(%s) ven 0x%x dev 0x%x from %ps\n",
 		pci_name(pcidev),
 		pcidev->vendor, pcidev->device,
 		__builtin_return_address(0));
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 18/22] usb: gadget: serial: %pf is only for function pointers
  2015-03-12 21:45 [PATCH v2 12/22] sparc: %pf is only for function pointers Scott Wood
  2015-03-12 21:46 ` [PATCH v2 14/22] parisc: " Scott Wood
@ 2015-03-12 21:46 ` Scott Wood
  2015-03-12 22:02   ` Fabio Estevam
  2015-03-14  7:47 ` [PATCH v2 12/22] sparc: " Sam Ravnborg
  2 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2015-03-12 21:46 UTC (permalink / raw)
  To: trivial, linux-kernel
  Cc: Scott Wood, linux-usb, Felipe Balbi, Fabio Estevam, Sergei Shtylyov

Use %ps for actual addresses, otherwise you'll get bad output
on arches like ppc64 where %pf expects a function descriptor
(which is not what __builtin_return_address returns).

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: linux-usb@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Cc: Fabio Estevam <festevam@gmail.com>
CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
v2: Fix commit message to reflect that this patch is about %pf, not %pF,
and to clarify (as requested) that __builtin_return_address does not
return a function pointer.

 drivers/usb/gadget/function/u_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 491082a..89179ab 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -912,7 +912,7 @@ static int gs_put_char(struct tty_struct *tty, unsigned char ch)
 	unsigned long	flags;
 	int		status;
 
-	pr_vdebug("gs_put_char: (%d,%p) char=0x%x, called from %pf\n",
+	pr_vdebug("gs_put_char: (%d,%p) char=0x%x, called from %ps\n",
 		port->port_num, tty, ch, __builtin_return_address(0));
 
 	spin_lock_irqsave(&port->port_lock, flags);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 18/22] usb: gadget: serial: %pf is only for function pointers
  2015-03-12 21:46 ` [PATCH v2 18/22] usb: gadget: serial: " Scott Wood
@ 2015-03-12 22:02   ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2015-03-12 22:02 UTC (permalink / raw)
  To: Scott Wood; +Cc: trivial, linux-kernel, USB list, Felipe Balbi, Sergei Shtylyov

On Thu, Mar 12, 2015 at 6:46 PM, Scott Wood <scottwood@freescale.com> wrote:
> Use %ps for actual addresses, otherwise you'll get bad output
> on arches like ppc64 where %pf expects a function descriptor
> (which is not what __builtin_return_address returns).
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> Cc: linux-usb@vger.kernel.org
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Fabio Estevam <festevam@gmail.com>
> CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 12/22] sparc: %pf is only for function pointers
  2015-03-12 21:45 [PATCH v2 12/22] sparc: %pf is only for function pointers Scott Wood
  2015-03-12 21:46 ` [PATCH v2 14/22] parisc: " Scott Wood
  2015-03-12 21:46 ` [PATCH v2 18/22] usb: gadget: serial: " Scott Wood
@ 2015-03-14  7:47 ` Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2015-03-14  7:47 UTC (permalink / raw)
  To: Scott Wood; +Cc: trivial, linux-kernel, sparclinux

On Thu, Mar 12, 2015 at 04:45:59PM -0500, Scott Wood wrote:
> Use %ps for actual addresses, otherwise you'll get bad output
> on arches like ppc64 where %pf expects a function descriptor.  Even on
> other architectures, refrain from setting a bad example that people
> copy.
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> Cc: sparclinux@vger.kernel.org
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2: Fix commit message to reflect that this patch is about %pf, not %pF.
> 
>  arch/sparc/kernel/ds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
> index f87a55d..4ff835f 100644
> --- a/arch/sparc/kernel/ds.c
> +++ b/arch/sparc/kernel/ds.c
> @@ -875,7 +875,7 @@ void ldom_power_off(void)
>  
>  static void ds_conn_reset(struct ds_info *dp)
>  {
> -	printk(KERN_ERR "ds-%llu: ds_conn_reset() from %pf\n",
> +	printk(KERN_ERR "ds-%llu: ds_conn_reset() from %ps\n",
>  	       dp->id, __builtin_return_address(0));
>  }
>  
> -- 
> 2.1.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-14  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 21:45 [PATCH v2 12/22] sparc: %pf is only for function pointers Scott Wood
2015-03-12 21:46 ` [PATCH v2 14/22] parisc: " Scott Wood
2015-03-12 21:46 ` [PATCH v2 18/22] usb: gadget: serial: " Scott Wood
2015-03-12 22:02   ` Fabio Estevam
2015-03-14  7:47 ` [PATCH v2 12/22] sparc: " Sam Ravnborg

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).