linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: chanyeol.park@samsung.com
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] Add function for printing warnings
Date: Mon, 16 Apr 2012 10:36:53 +0200	[thread overview]
Message-ID: <1334565413.16897.167.camel@aeonflux> (raw)
In-Reply-To: <1334564820-31556-1-git-send-email-chanyeol.park@samsung.com>

Hi Chan-yeol,

> ---
>  src/log.c |   12 ++++++++++++
>  src/log.h |    1 +
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/src/log.c b/src/log.c
> index 4a50117..adbfba9 100644
> --- a/src/log.c
> +++ b/src/log.c
> @@ -55,6 +55,18 @@ void error(const char *format, ...)
>  	va_end(ap);
>  }
>  
> +void warn(const char *format, ...)
> +{
> +	va_list ap;
> +
> +	va_start(ap, format);
> +
> +	vsyslog(LOG_WARNING, format, ap);
> +
> +	va_end(ap);
> +}
> +
> +

the patch is fine, but just for consistence sake, you should put warn()
after info() function.

And no double empty lines between functions please. That is not part of
our coding style. And if you saw it somewhere else in the code, then
that is an oversight.

>  void btd_debug(const char *format, ...)
>  {
>  	va_list ap;
> diff --git a/src/log.h b/src/log.h
> index 51c52e6..cdcb146 100644
> --- a/src/log.h
> +++ b/src/log.h
> @@ -23,6 +23,7 @@
>  
>  void info(const char *format, ...) __attribute__((format(printf, 1, 2)));
>  void error(const char *format, ...) __attribute__((format(printf, 1, 2)));
> +void warn(const char *format, ...) __attribute__((format(printf, 1, 2)));

Same here. warn() comes after info().

>  
>  void btd_debug(const char *format, ...) __attribute__((format(printf, 1, 2)));
>  

Regards

Marcel



  reply	other threads:[~2012-04-16  8:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14  5:16 [PATCH 1/1] Add DBG() calls to authorization logic chanyeol.park
2012-04-14 16:01 ` Marcel Holtmann
2012-04-16  6:22   ` chanyeol.park
2012-04-16  7:50     ` Marcel Holtmann
2012-04-16  8:26       ` [PATCH 1/2] Add function for printing warnings chanyeol.park
2012-04-16  8:36         ` Marcel Holtmann [this message]
2012-04-16 11:56           ` [PATCH v2 1/3] src: " chanyeol.park
2012-04-16 19:55             ` Johan Hedberg
2012-04-16 11:56           ` [PATCH v2 2/3] adapter: Add warning if there is no authorization agent chanyeol.park
2012-04-16 11:56           ` [PATCH v2 3/3] audio: Add missing debug message in authorization chanyeol.park
2012-04-16  8:27       ` [PATCH 2/2] Add warning if there is no authorization agent chanyeol.park

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=1334565413.16897.167.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=chanyeol.park@samsung.com \
    --cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).