mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Joe Perches <joe@perches.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] md: Fix single printks with multiple KERN_<level>s
Date: Wed, 24 Nov 2010 16:16:32 +1100	[thread overview]
Message-ID: <20101124161632.27a05405@notabene.brown> (raw)
In-Reply-To: <1290560260.11971.5.camel@Joe-Laptop>

On Tue, 23 Nov 2010 16:57:40 -0800
Joe Perches <joe@perches.com> wrote:

> Noticed-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Joe Perches <joe@perches.com>

Applied by: NeilBrown

Thanks a lot!

NeilBrown


> ---
> > Note that KERN_foo in the middle of strings, even after a newline are
> > preserved in the output.  So:
> > 
> >                 printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory.  This leads\n"
> >                        KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"
> >                        KERN_WARNING "will fail in the next kernel release.  Please fix your driver.\n");
> > 
> > results in <4>'s appearing on the console.  I've always written code
> > over the last 15 years assuming that after any newline in printk output,
> > the log level gets reset and so needs a new log level specifier.
> > 
> > Sounds like this is something which needs auditing as a result of your
> > change, and sounds like its something that kernelnewbies people could
> > do.  My own greps haven't revealed any cases though.
> 
>  drivers/md/raid1.c  |    5 +++--
>  drivers/md/raid10.c |    5 +++--
>  drivers/md/raid5.c  |    1 -
>  3 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index 45f8324..e05381b 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -1027,8 +1027,9 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
>  	} else
>  		set_bit(Faulty, &rdev->flags);
>  	set_bit(MD_CHANGE_DEVS, &mddev->flags);
> -	printk(KERN_ALERT "md/raid1:%s: Disk failure on %s, disabling device.\n"
> -	       KERN_ALERT "md/raid1:%s: Operation continuing on %d devices.\n",
> +	printk(KERN_ALERT
> +	       "md/raid1:%s: Disk failure on %s, disabling device.\n"
> +	       "md/raid1:%s: Operation continuing on %d devices.\n",
>  	       mdname(mddev), bdevname(rdev->bdev, b),
>  	       mdname(mddev), conf->raid_disks - mddev->degraded);
>  }
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index c67aa54..686543d 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -1051,8 +1051,9 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
>  	}
>  	set_bit(Faulty, &rdev->flags);
>  	set_bit(MD_CHANGE_DEVS, &mddev->flags);
> -	printk(KERN_ALERT "md/raid10:%s: Disk failure on %s, disabling device.\n"
> -	       KERN_ALERT "md/raid10:%s: Operation continuing on %d devices.\n",
> +	printk(KERN_ALERT
> +	       "md/raid10:%s: Disk failure on %s, disabling device.\n"
> +	       "md/raid10:%s: Operation continuing on %d devices.\n",
>  	       mdname(mddev), bdevname(rdev->bdev, b),
>  	       mdname(mddev), conf->raid_disks - mddev->degraded);
>  }
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index dc574f3..316fbe7 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -1721,7 +1721,6 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
>  		set_bit(Faulty, &rdev->flags);
>  		printk(KERN_ALERT
>  		       "md/raid:%s: Disk failure on %s, disabling device.\n"
> -		       KERN_ALERT
>  		       "md/raid:%s: Operation continuing on %d devices.\n",
>  		       mdname(mddev),
>  		       bdevname(rdev->bdev, b),
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2010-11-24  5:16 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  9:44 [PATCH] ARM: allow, but warn, when issuing ioremap() on RAM Felipe Contreras
2010-10-07 11:51 ` Baruch Siach
2010-10-07 12:29   ` [PATCH v2] " Felipe Contreras
2010-10-07 18:00     ` Uwe Kleine-König
2010-10-07 19:22 ` [PATCH] " Russell King - ARM Linux
2010-10-08  9:32   ` Felipe Contreras
2010-10-08 17:53     ` Russell King - ARM Linux
2010-10-08 19:37       ` Felipe Contreras
2010-10-08 23:04         ` Russell King - ARM Linux
2010-10-08 23:25           ` Greg KH
2010-10-08 23:44             ` Russell King - ARM Linux
2010-10-09  0:00               ` Greg KH
2010-10-09  0:25                 ` Russell King - ARM Linux
2010-10-09  0:54                   ` Greg KH
2010-10-09  2:41                   ` Nicolas Pitre
2010-10-09  3:04                     ` Greg KH
2010-10-09  9:32                       ` Felipe Contreras
2010-10-11 10:05                     ` Catalin Marinas
2010-10-11 10:39                       ` Felipe Contreras
2010-10-11 10:52                         ` Russell King - ARM Linux
2010-10-11 11:23                         ` Catalin Marinas
2010-10-11 12:03                           ` Felipe Contreras
2010-10-11 12:30                             ` Catalin Marinas
2010-10-11 22:53                               ` Nicolas Pitre
2010-10-14 15:02                               ` Felipe Contreras
2010-10-14 17:18                                 ` Catalin Marinas
2010-10-14 17:44                                   ` Felipe Contreras
2010-10-11 11:01                       ` Pawel Moll
2010-10-11 11:03                         ` Catalin Marinas
2010-10-16  2:39                 ` Benjamin Herrenschmidt
2010-10-16  9:43                   ` Felipe Contreras
2010-10-09  0:10               ` Russell King - ARM Linux
2010-10-09  0:56               ` Felipe Contreras
2010-10-09  9:21                 ` Russell King - ARM Linux
2010-10-09 10:28                   ` Felipe Contreras
2010-10-09 11:11                     ` Arnd Bergmann
2010-10-09 11:43                       ` Dave Airlie
2010-10-09 11:55                         ` Christoph Hellwig
2010-10-09 12:17                           ` Felipe Contreras
2010-10-09 12:10                         ` Felipe Contreras
2010-10-09 14:37                           ` Russell King - ARM Linux
2010-10-09 16:18                             ` Felipe Contreras
2010-10-09 11:44                       ` Uwe Kleine-König
2010-10-09 12:05                         ` Russell King - ARM Linux
2010-10-09 11:59                       ` Felipe Contreras
2010-10-09 14:43                         ` Arnd Bergmann
2010-10-09 18:59                           ` Guennadi Liakhovetski
2010-10-10  1:52                   ` Felipe Contreras
2010-10-11  8:35                     ` Uwe Kleine-König
2010-10-11  9:02                       ` Russell King - ARM Linux
2010-10-11  9:24                         ` Uwe Kleine-König
2010-10-11 10:08                           ` Felipe Contreras
2010-10-11 10:15                             ` Russell King - ARM Linux
2010-10-11 15:25                     ` Russell King - ARM Linux
2010-10-14 14:47                       ` Felipe Contreras
2010-10-19  8:13                       ` Colin Cross
2010-10-19 18:12                         ` Russell King - ARM Linux
2010-10-19 19:21                         ` Russell King - ARM Linux
     [not found]                       ` <1290505382-16110-1-git-send-email-u.kleine-koenig@pengutronix.de>
     [not found]                         ` <20101123101210.GA18170@n2100.arm.linux.org.uk>
2010-11-23 10:39                           ` About multi-line printk and the need (not) to repeat loglevel markers [Was: Re: [PATCH] ARM: mx3/pcm037: properly allocate memory for mx3-camera] Uwe Kleine-König
2010-11-23 10:58                             ` Uwe Kleine-König
2010-11-23 22:16                               ` Linus Torvalds
2010-11-23 22:33                                 ` Russell King - ARM Linux
2010-11-23 23:23                                   ` Joe Perches
2010-11-24  0:57                                   ` [PATCH] md: Fix single printks with multiple KERN_<level>s Joe Perches
2010-11-24  5:16                                     ` Neil Brown [this message]
2010-11-24  8:17                                 ` About multi-line printk and the need (not) to repeat loglevel markers [Was: Re: [PATCH] ARM: mx3/pcm037: properly allocate memory for mx3-camera] Uwe Kleine-König
2010-11-24  8:56                                   ` [PATCH 0/6] add some KERN_CONT markers to continuation lines Uwe Kleine-König
2010-11-24  8:57                                     ` [PATCH 1/6] ARM: " Uwe Kleine-König
2010-11-24  8:57                                     ` [PATCH 2/6] block: " Uwe Kleine-König
2010-11-24  8:57                                     ` [PATCH 3/6] net: " Uwe Kleine-König
2010-11-28 18:48                                       ` David Miller
2010-11-24  8:57                                     ` [PATCH 4/6] init: " Uwe Kleine-König
2010-11-24  8:57                                     ` [PATCH 5/6] mm: " Uwe Kleine-König
2011-02-28 15:17                                       ` Uwe Kleine-König
2011-03-01 21:46                                         ` Linus Torvalds
2011-03-02  5:28                                           ` Joe Perches
2010-11-24  8:57                                     ` [PATCH 6/6] tty/vt: " Uwe Kleine-König
2011-02-28 15:16                                       ` Uwe Kleine-König
2011-02-28 15:39                                         ` Greg KH
2011-02-28 15:50                                           ` Uwe Kleine-König
2011-02-28 16:04                                             ` Greg KH
2011-03-01  3:18                                       ` Greg KH
2010-11-24  9:09                                   ` About multi-line printk and the need (not) to repeat loglevel markers [Was: Re: [PATCH] ARM: mx3/pcm037: properly allocate memory for mx3-camera] Michał Mirosław
2010-10-09  0:45             ` [PATCH] ARM: allow, but warn, when issuing ioremap() on RAM Felipe Contreras
2010-10-09  8:56               ` Russell King - ARM Linux
2010-10-08 23:19       ` Greg KH
2010-10-09  3:36         ` Nicolas Pitre
2010-10-09 10:00           ` Felipe Contreras
2010-10-09 17:38             ` Nicolas Pitre
2010-10-09 20:16               ` Felipe Contreras
2010-10-13 16:17             ` Woodruff, Richard
2010-10-14 13:48               ` Felipe Contreras
2010-10-14 15:29                 ` Woodruff, Richard
2010-10-16  2:36       ` Benjamin Herrenschmidt
2010-10-17 13:05         ` Woodruff, Richard
2010-10-17 23:17           ` Benjamin Herrenschmidt
2010-10-08 19:58   ` Andrew Morton
2010-10-09 13:52 ` Russell King - ARM Linux
2010-10-09 16:07   ` Felipe Contreras
2010-10-09 16:45     ` Russell King - ARM Linux
2010-10-09 19:25       ` Felipe Contreras
2010-10-10 14:23       ` Pedanekar, Hemant
2010-10-11  9:26       ` Catalin Marinas

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=20101124161632.27a05405@notabene.brown \
    --to=neilb@suse.de \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome