mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.de>,
	Alex Dubov <oakad@yahoo.com>
Subject: Re: [PATCH 1/4] scatterlist: new helper functions
Date: Wed, 12 Jan 2011 04:52:29 +0200	[thread overview]
Message-ID: <1294800749.29447.2.camel@maxim-laptop> (raw)
In-Reply-To: <20110111155803.5638ec4e.rdunlap@xenotime.net>

On Tue, 2011-01-11 at 15:58 -0800, Randy Dunlap wrote:
> On Tue, 11 Jan 2011 15:55:11 -0800 Andrew Morton wrote:
> 
> > On Tue, 11 Jan 2011 15:51:24 -0800
> > Randy Dunlap <rdunlap@xenotime.net> wrote:
> > 
> > > >  /**
> > > > + * sg_advance - advance scatterlist by 'consumed' bytes
> > > > + * @sg - the current sg entry
> > > > + * @consumed - how much bytes to advance
> > > 
> > > kernel-doc notation for parameters is like so:
> > 
> > I think I fixed most of this.  Probably missed some though.
> > 
> > Teach checkpatch to check kerneldoc ;)
> > 
> 
> ugh, no thanks.
> 
> > 
> > 
> > From: Andrew Morton <akpm@linux-foundation.org>
> > 
> > fix general disaster in code comments
> > 
> > Cc: Alex Dubov <oakad@yahoo.com>
> > Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > Cc: Maxim Levitsky <maximlevitsky@gmail.com>
> > Cc: Tejun Heo <tj@kernel.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  lib/scatterlist.c |   31 ++++++++++++++++++-------------
> >  1 file changed, 18 insertions(+), 13 deletions(-)
> > 
> > diff -puN lib/scatterlist.c~scatterlist-new-helper-functions-fix lib/scatterlist.c
> > --- a/lib/scatterlist.c~scatterlist-new-helper-functions-fix
> > +++ a/lib/scatterlist.c
> > @@ -41,7 +41,7 @@ EXPORT_SYMBOL(sg_next);
> >  /**
> >   * sg_advance - advance scatterlist by 'consumed' bytes
> >   * @sg - the current sg entry
> > - * @consumed - how much bytes to advance
> > + * @consumed - how many bytes to advance
> 
>  * @consumed: how many bytes to advance
> 
> >   *
> >   */
> >  struct scatterlist *sg_advance(struct scatterlist *sg, int consumed)
> > @@ -76,8 +76,8 @@ EXPORT_SYMBOL(sg_advance);
> >   * sg_nents - calculate number of sg entries in sg list
> >   * @sg - the current sg entry
> 
>  * @sg:
> 
> >   *
> > - * Allows to calculate dynamicly the lenght of the sg table, based on
> > - * assumption that last entry is NULL
> > + * Allows to calculate aldynamicly the length of the sg table, based on an
> > + * assumption that the last entry is NULL
> >   */
> >  int sg_nents(struct scatterlist *sg)
> >  {
> > @@ -92,11 +92,11 @@ int sg_nents(struct scatterlist *sg)
> >  EXPORT_SYMBOL(sg_nents);
> >  
> >  /**
> > - * sg_total_len - calculate total lenght of scatterlist
> > + * sg_total_len - calculate total length of scatterlist
> >   * @sg - the current sg entry
> 
>  * @sg:
> 
> >   *
> > - * Dynamicly calculate total number of bytes in a sg list
> > - * based on assumption that list ends with a NULL entry
> > + * Dynamically calculate total number of bytes in a sg list
> 
> preferably:
>                                                   in an sg list
> 
> > + * based on an assumption that the list ends with a NULL entry
> >   */
> >  int sg_total_len(struct scatterlist *sg)
> >  {
> > @@ -182,8 +182,14 @@ void sg_init_one(struct scatterlist *sg,
> >  EXPORT_SYMBOL(sg_init_one);
> >  
> >  /**
> > - * sg_copy - copies sg entries from sg_from to sg_to, such
> > - * as sg_to covers first 'len' bytes from sg_from.
> > + * sg_copy - copy sg entries
> > + * @sg_from: source
> > + * @sg_to: destination
> > + *
> > + * Copies from @sg_from to @sg_to.  @sg_to covers first 'len' bytes from
> > + * @sg_from.
> > + *
> > + * Returns zero on success, else a -ve errno.
> >   */
> >  int sg_copy(struct scatterlist *sg_from, struct scatterlist *sg_to, int len)
> >  {
> > @@ -616,13 +622,12 @@ size_t sg_copy_to_buffer(struct scatterl
> >  }
> >  EXPORT_SYMBOL(sg_copy_to_buffer);
> >  
> > -
> >  /**
> > - * sg_compare_to_buffer - compare contents of the data pointeted by sg table
> > + * sg_compare_to_buffer - compare contents of the data covered by an sg table
> >   * to a kernel ram buffer
> > - * @sg - the current sg entry
> > - * @buffer - linear buffer to compare with
> > - * @len - lenght of that buffer
> > + * @sg: the current sg entry
> > + * @buffer: linear buffer to compare with
> > + * @len: length of that buffer
> 
> Returns what??
0 if equal and 1 otherwise.
Was too lazy to implement full strcmp compliance.
Is that needed?


All very fair comments.
Will check everything once again.
Thanks for a review!

Best regards,
	Maxim Levitsky


  reply	other threads:[~2011-01-12  2:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 23:36 [PATCH V2 0/4]: MEMSTICK: My 2 drivers for 2.6.38 inclusion Maxim Levitsky
2011-01-11 23:36 ` [PATCH 1/4] scatterlist: new helper functions Maxim Levitsky
2011-01-11 23:51   ` Randy Dunlap
2011-01-11 23:55     ` Andrew Morton
2011-01-11 23:58       ` Randy Dunlap
2011-01-12  2:52         ` Maxim Levitsky [this message]
2011-01-12  6:41           ` Randy Dunlap
2011-01-18  0:46   ` [PATCH] " Maxim Levitsky
2011-01-11 23:36 ` [PATCH 2/4] memstick: Add driver for Ricoh R5C592 card reader Maxim Levitsky
2011-01-11 23:36 ` [PATCH 3/4] memstick: add support for legacy memorysticks Maxim Levitsky
2011-01-11 23:36 ` [PATCH 4/4] memstick: add Alex Dubov to MAINTAINERS of the memstick core Maxim Levitsky
  -- strict thread matches above, loose matches on Subject: below --
2011-03-04  4:16 [PATH 0/4] Memstick patches for 2.6.39 Maxim Levitsky
2011-03-04  4:16 ` [PATCH 1/4] scatterlist: new helper functions Maxim Levitsky
2011-03-06  7:29   ` FUJITA Tomonori
2011-03-06 15:14     ` Maxim Levitsky
2011-03-06 21:49       ` FUJITA Tomonori
2011-03-07  2:20         ` Maxim Levitsky
2011-03-09 17:24           ` Maxim Levitsky
2011-03-16  0:44           ` Andrew Morton
2011-03-16  2:35             ` FUJITA Tomonori
2011-03-16  4:18               ` Alex Dubov
2011-03-16  4:55                 ` FUJITA Tomonori
2011-03-17  3:46                   ` Alex Dubov
2011-03-17  3:57                     ` James Bottomley
2011-03-16 22:33                 ` Andrew Morton
2011-03-17  6:41                   ` Alex Dubov
2011-03-17 13:17                     ` Maxim Levitsky
2011-03-18  0:59                     ` FUJITA Tomonori
2011-01-11  2:58 Alex Dubov
2011-01-11  1:50 MEMSTICK: My 2 drivers for 2.6.38 inclusion Maxim Levitsky
2011-01-11  1:50 ` [PATCH 1/4] scatterlist: new helper functions Maxim Levitsky

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=1294800749.29447.2.camel@maxim-laptop \
    --to=maximlevitsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    --cc=rdunlap@xenotime.net \
    --cc=tiwai@suse.de \
    /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