From: Greg KH <gregkh@linuxfoundation.org>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Brian Swetland <swetland@google.com>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: android: logger: Allocate logs dynamically at boot
Date: Fri, 4 May 2012 16:37:07 -0700 [thread overview]
Message-ID: <20120504233707.GA24213@kroah.com> (raw)
In-Reply-To: <4FA4673C.7010209@am.sony.com>
On Fri, May 04, 2012 at 04:33:16PM -0700, Tim Bird wrote:
> +#define MAX_LOGS 5
> +struct logger_log *logs_array[MAX_LOGS];
You are going to make this a list and not a static array in the
future, right?
> -static int __init init_log(struct logger_log *log)
> +static int __init add_log(struct logger_log *log)
> {
> - int ret;
> + int i;
>
> + for (i = 0; i < MAX_LOGS; i++) {
> + if (logs_array[i] == 0) {
> + logs_array[i] = log;
> + return 0;
> + }
> + }
> + return -1;
> +}
I see you didn't run your patch through sparse :(
Care to fix up the sparse warnings and resend?
thanks,
greg k-h
next prev parent reply other threads:[~2012-05-04 23:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 23:33 [PATCH] staging: android: logger: Allocate logs dynamically at boot Tim Bird
2012-05-04 23:37 ` Greg KH [this message]
2012-05-07 18:50 ` Tim Bird
2012-05-07 18:58 ` Greg KH
2012-05-07 19:14 ` Tim Bird
2012-05-07 19:56 ` Greg KH
2012-05-07 22:13 ` Brian Swetland
2012-05-07 23:40 ` Tim Bird
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=20120504233707.GA24213@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swetland@google.com \
--cc=tim.bird@am.sony.com \
/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