public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Bruce Beare <bbeare1@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Cleanups for: line length, printk KERN_ argument, stack frame size > 2048 (added a kmalloc/kfree), style/formatting errors, incorrect include files
Date: Fri, 9 Oct 2009 14:29:47 -0700	[thread overview]
Message-ID: <20091009212947.GA10187@suse.de> (raw)
In-Reply-To: <20091009142742.b12b80b1.randy.dunlap@oracle.com>

On Fri, Oct 09, 2009 at 02:27:42PM -0700, Randy Dunlap wrote:
> On Fri, 9 Oct 2009 14:16:10 -0700 Greg KH wrote:
> 
> > 
> > Try changing one thing at a time per patch please.
> > 
> > There's some bugs in here:
> > 
> > > -		struct config_t dig_in_config[32];
> > > -		struct config_t dig_out_config[32];
> > > -		struct config_t chan_in_config[32];
> > > -		struct config_t chan_out_config[32];
> > >  		int i;
> > > +		config_data = kmalloc(sizeof(struct config_data_t), GFP_KERNEL);
> > 
> > Shouldn't that be:
> > 		config_data = kmalloc(sizeof(struct config_data_t)*32, GFP_KERNEL);
> 
> The new struct already includes the [32]s.

Ah, missed that.

But your other comment about checking the kmalloc is valid.  We should
not add new calls to kmalloc that doesn't check, let's not _add_ new
errors to the code :)

Bruce, care to split this up into individual patches, each doing only
one thing, and check for the return value of this call?

thanks,

greg k-h

  reply	other threads:[~2009-10-09 21:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 21:11 [PATCH] Cleanups for: line length, printk KERN_ argument, stack frame size > 2048 (added a kmalloc/kfree), style/formatting errors, incorrect include files Bruce Beare
2009-10-09 21:16 ` Greg KH
2009-10-09 21:27   ` Randy Dunlap
2009-10-09 21:29     ` Greg KH [this message]
2009-10-09 21:41       ` Bruce B
2009-10-09 21:50         ` Greg KH
2009-10-09 21:31   ` Bruce B
2009-10-09 21:55     ` Daniel Walker
2009-10-09 21:23 ` Randy Dunlap
2009-10-09 21:29   ` Bruce B
2009-10-09 21:31     ` Randy Dunlap
2009-10-09 22:28 ` Jiri Slaby

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=20091009212947.GA10187@suse.de \
    --to=gregkh@suse.de \
    --cc=bbeare1@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.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