* [PATCH] tile: revert pr_info to printk in <asm/io.h>
@ 2013-02-01 17:34 Chris Metcalf
2013-02-01 22:33 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Chris Metcalf @ 2013-02-01 17:34 UTC (permalink / raw)
To: linux-kernel
Using pr_info in a header exposes us to potential trouble from
subsystems that define pr_fmt. This change fixes:
In file included from include/linux/scatterlist.h:10,
from include/scsi/scsi.h:12,
from drivers/infiniband/ulp/srp/ib_srp.c:46:
arch/tile/include/asm/io.h: In function ‘ioport_map’:
arch/tile/include/asm/io.h:296: error: expected ‘)’ before ‘PFX’
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
arch/tile/include/asm/io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/tile/include/asm/io.h b/arch/tile/include/asm/io.h
index 2a9b293..865e529 100644
--- a/arch/tile/include/asm/io.h
+++ b/arch/tile/include/asm/io.h
@@ -292,7 +292,7 @@ static inline long ioport_panic(void)
static inline void __iomem *ioport_map(unsigned long port, unsigned int len)
{
- pr_info("ioport_map: mapping IO resources is unsupported on tile.\n");
+ printk("ioport_map: mapping IO resources is unsupported on tile.\n");
return NULL;
}
--
1.7.10.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] tile: revert pr_info to printk in <asm/io.h> 2013-02-01 17:34 [PATCH] tile: revert pr_info to printk in <asm/io.h> Chris Metcalf @ 2013-02-01 22:33 ` Joe Perches 2013-02-04 17:56 ` Chris Metcalf 0 siblings, 1 reply; 3+ messages in thread From: Joe Perches @ 2013-02-01 22:33 UTC (permalink / raw) To: Chris Metcalf Cc: linux-kernel, David Dillow, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma On Fri, 2013-02-01 at 12:34 -0500, Chris Metcalf wrote: > Using pr_info in a header exposes us to potential trouble from > subsystems that define pr_fmt. This change fixes: > > In file included from include/linux/scatterlist.h:10, > from include/scsi/scsi.h:12, > from drivers/infiniband/ulp/srp/ib_srp.c:46: > arch/tile/include/asm/io.h: In function ‘ioport_map’: > arch/tile/include/asm/io.h:296: error: expected ‘)’ before ‘PFX’ Interesting. > diff --git a/arch/tile/include/asm/io.h b/arch/tile/include/asm/io.h [] > @@ -292,7 +292,7 @@ static inline long ioport_panic(void) > > static inline void __iomem *ioport_map(unsigned long port, unsigned int len) > { > - pr_info("ioport_map: mapping IO resources is unsupported on tile.\n"); > + printk("ioport_map: mapping IO resources is unsupported on tile.\n"); It'd be nicer to add an appropriate KERN_<LEVEL> here. My preference would be to change ib_srp.c (and ib_srpt) like: --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index d5088ce..59bf409 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -30,7 +30,7 @@ * SOFTWARE. */ -#define pr_fmt(fmt) PFX fmt +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/module.h> #include <linux/init.h> ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tile: revert pr_info to printk in <asm/io.h> 2013-02-01 22:33 ` Joe Perches @ 2013-02-04 17:56 ` Chris Metcalf 0 siblings, 0 replies; 3+ messages in thread From: Chris Metcalf @ 2013-02-04 17:56 UTC (permalink / raw) To: Joe Perches Cc: linux-kernel, David Dillow, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma On 2/1/2013 5:33 PM, Joe Perches wrote: > On Fri, 2013-02-01 at 12:34 -0500, Chris Metcalf wrote: >> Using pr_info in a header exposes us to potential trouble from >> subsystems that define pr_fmt. This change fixes: >> >> In file included from include/linux/scatterlist.h:10, >> from include/scsi/scsi.h:12, >> from drivers/infiniband/ulp/srp/ib_srp.c:46: >> arch/tile/include/asm/io.h: In function ‘ioport_map’: >> arch/tile/include/asm/io.h:296: error: expected ‘)’ before ‘PFX’ > Interesting. > >> diff --git a/arch/tile/include/asm/io.h b/arch/tile/include/asm/io.h > [] >> @@ -292,7 +292,7 @@ static inline long ioport_panic(void) >> >> static inline void __iomem *ioport_map(unsigned long port, unsigned int len) >> { >> - pr_info("ioport_map: mapping IO resources is unsupported on tile.\n"); >> + printk("ioport_map: mapping IO resources is unsupported on tile.\n"); > It'd be nicer to add an appropriate KERN_<LEVEL> here. > > My preference would be to change ib_srp.c (and ib_srpt) like: > --- > drivers/infiniband/ulp/srp/ib_srp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index d5088ce..59bf409 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -30,7 +30,7 @@ > * SOFTWARE. > */ > > -#define pr_fmt(fmt) PFX fmt > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > #include <linux/module.h> > #include <linux/init.h> > Makes sense to me, and it does fix the compile failure. I've pulled my original change from my tree and instead, for the change above (assuming Joe is implicitly providing a Signed-off-by on this patch): Acked-by: Chris Metcalf <cmetcalf@tilera.com> -- Chris Metcalf, Tilera Corp. http://www.tilera.com ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-04 17:56 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-01 17:34 [PATCH] tile: revert pr_info to printk in <asm/io.h> Chris Metcalf 2013-02-01 22:33 ` Joe Perches 2013-02-04 17:56 ` Chris Metcalf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox