[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] console: const-ify the arguments for __warn() and __bug()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Mihai DonÈu <mdontu@xxxxxxxxxxxxxxx>
  • Date: Tue, 9 Dec 2014 19:55:30 +0200
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Tue, 09 Dec 2014 17:55:53 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=PBeA4KjYUdFyu4RFW4phwTiwK7OCKZ5Vu/7rsul+Fe1SpeuBmEhCUFhp0OQoaiRqCYdH6WsbkHmHwApu7fco9uAkojdEM82qyTU+rqoACE/zq2FmDKJY32j6rkSGgn6XqCEP0Zm3Zd3pUdapF4PDWgY4ZhOL0nY/b36sxyxVuHrJF4orij/OHutg+Mr6/C5ohC3kh+nUN59BHarfMhyuSEMArX412Oit8VCj95z6912VzM+UC/gnX4Jpz/1tgY/DUSUFab3Q51Pnaoco/rGdHZ/5FFOMx+yj3SwtugCXzPRuhOGSsUDb34tX1nEFcfmJlKuzc/7FUAa1tWQy+BmFJw==; h=Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:Organization:MIME-Version:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On Monday 08 December 2014 10:28:41 Andrew Cooper wrote:
> On 08/12/14 00:19, Mihai DonÈu wrote:
> > Both __warn() and __bug() take as first parameter the file name of the
> > current compilation unit (__FILE__). Mark that parameter as constant to
> > better reflect that.
> >
> > Signed-off-by: Mihai DonÈu <mdontu@xxxxxxxxxxxxxxx>
> 
> This seems reasonable, but for 4.6 at this point.
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> In future, please CC the relevant maintainers (scrips/get_maintainer.pl
> should help)

Thank you Andrew.

Should I resend the patch with your Reviewed-by and the proper people in
CC?

> > ---
> >  xen/drivers/char/console.c | 4 ++--
> >  xen/include/xen/lib.h      | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> > index 2f03259..7807cf2 100644
> > --- a/xen/drivers/char/console.c
> > +++ b/xen/drivers/char/console.c
> > @@ -1138,7 +1138,7 @@ void panic(const char *fmt, ...)
> >          machine_restart(5000);
> >  }
> >
> > -void __bug(char *file, int line)
> > +void __bug(const char *file, int line)
> >  {
> >      console_start_sync();
> >      printk("Xen BUG at %s:%d\n", file, line);
> > @@ -1146,7 +1146,7 @@ void __bug(char *file, int line)
> >      panic("Xen BUG at %s:%d", file, line);
> >  }
> >
> > -void __warn(char *file, int line)
> > +void __warn(const char *file, int line)
> >  {
> >      printk("Xen WARN at %s:%d\n", file, line);
> >      dump_execution_state();
> > diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
> > index f11b49e..8f9cadb 100644
> > --- a/xen/include/xen/lib.h
> > +++ b/xen/include/xen/lib.h
> > @@ -8,8 +8,8 @@
> >  #include <xen/string.h>
> >  #include <asm/bug.h>
> >
> > -void noreturn __bug(char *file, int line);
> > -void __warn(char *file, int line);
> > +void noreturn __bug(const char *file, int line);
> > +void __warn(const char *file, int line);
> >
> >  #define BUG_ON(p)  do { if (unlikely(p)) BUG();  } while (0)
> >  #define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)

-- 
Mihai DONÈU

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.