All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf-kv+TWInifGbQT0dZR+AlfA@public.gmane.org>
To: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>,
	Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] tile: revert pr_info to printk in <asm/io.h>
Date: Mon, 4 Feb 2013 12:56:41 -0500	[thread overview]
Message-ID: <510FF659.8030905@tilera.com> (raw)
In-Reply-To: <1359758038.17807.18.camel@joe-AO722>

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-kv+TWInifGbQT0dZR+AlfA@public.gmane.org>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

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

WARNING: multiple messages have this Message-ID (diff)
From: Chris Metcalf <cmetcalf@tilera.com>
To: Joe Perches <joe@perches.com>
Cc: <linux-kernel@vger.kernel.org>, David Dillow <dillowda@ornl.gov>,
	Roland Dreier <roland@kernel.org>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH] tile: revert pr_info to printk in <asm/io.h>
Date: Mon, 4 Feb 2013 12:56:41 -0500	[thread overview]
Message-ID: <510FF659.8030905@tilera.com> (raw)
In-Reply-To: <1359758038.17807.18.camel@joe-AO722>

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


  reply	other threads:[~2013-02-04 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 17:34 [PATCH] tile: revert pr_info to printk in <asm/io.h> Chris Metcalf
     [not found] ` <201302012043.r11KhFXi024365-7SEFUyftxEZmMm5hXn6q1uQdXUR/7MFngfoxzgwHRXE@public.gmane.org>
2013-02-01 22:33   ` Joe Perches
2013-02-01 22:33     ` Joe Perches
2013-02-04 17:56     ` Chris Metcalf [this message]
2013-02-04 17:56       ` Chris Metcalf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510FF659.8030905@tilera.com \
    --to=cmetcalf-kv+twinifgbqt0dzr+alfa@public.gmane.org \
    --cc=dillowda-1Heg1YXhbW8@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.