All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: status grub2 port of grub-legasy map command
Date: Sun, 03 May 2009 23:57:11 -0400	[thread overview]
Message-ID: <1241409431.26483.33.camel@mj> (raw)
In-Reply-To: <1241393832.6586.35.camel@accesodirecto.casa>

On Mon, 2009-05-04 at 01:37 +0200, Javier Martín wrote:

> > The patch adds many trailing spaces.  I suggest that you run GNU indent
> > on drivemap.c.  It will take care of most of the trailing spaces.
> > Comments will still need to be fixed.
> > 
> > Assembler files use different formatting in GRUB.  Also, it's better to
> > use meaningful names for the labels.  Label 4 is unused.
> Where can I find those assembly formatting conventions? From what I see
> in your version of the patch, the gist is that asm instructions start at
> the 8th column (not after a \t). This carries an unpleasant
> FORTRAN-esque smell that I would rather avoid.

I don't know if it's documented anywhere, but it's sufficient to looks
at other *.S files in GRUB or another GNU project, such as GCC.

> > Some comments are excessive or unnecessary.  "These functions defined in
> > this file may be called from C" - irrelevant, we have no such functions.
> > Complaints that the processor is not in 64-bit mode are also useless.  I
> > don't understand what "bundle" means in the comments.
> Sorry, I copied the initial comment from another .S file in GRUB2 as a
> kind-of-boilerplate. In this context, "bundle" means the whole "int13
> handler" package that is deployed to the reserved memory address,
> consisting of the old IVT pointer, the actual int13h handler code and
> the entry map.

It would be great if you change the comments to avoid the word "bundle"
unless it's explained.

> > What is "(void) mod;"?  It doesn't prevent any warnings for me.
> Once again, boilerplate code copied from hello.c long ago. I suspect
> this stopped being required when the command framework was revamped.

Correct.  We are using gcc attributes to suppress warnings in
GRUB_MOD_INIT.  I've committed a patch that removes all that stuff.

> > grub_symbol_t is already used in kern/dl.c with a different meaning.
> > Why not just use void?
> The reason to avoid using a plain "void" is that it might be a slightly
> confusing sight, so a future coder might have an idea-of-the-moment and
> change it to a "meaningful type" like void*. The presence of an explicit
> type with a big comment is supposed to at least make people think twice
> before changing it.

You can leave the comment but use void.  I don't think anyone (of the
reasonable people allowed to touch GRUB code) would change the type if
the code is working.

> > Improved patch is attached.
> Thanks. I will read it thoroughly tomorrow when I'm back from uni. I
> think that drivemap.h could be scrapped, its contents incorporated into
> drivemap.c so as to reduce clutter and bitrot potential, and would
> reduce the impact of the declaration of grub_symbol_t even more.

That's a good idea.  Still, I would prefer that we don't use
grub_symbol_t where void is be sufficient.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-05-04  3:57 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  1:03 status grub2 port of grub-legasy map command John Stanley
2009-04-14  7:33 ` Felix Zielcke
2009-04-14  9:21   ` John Stanley
2009-04-14  9:04     ` phcoder
2009-04-15  8:55       ` John Stanley
2009-04-15  9:06         ` phcoder
2009-04-15  9:30           ` John Stanley
2009-04-15  9:34             ` phcoder
2009-04-17 21:20               ` Javier Martín
2009-04-17 21:42                 ` Vladimir Serbinenko
2009-04-17 23:12                 ` John Stanley
2009-04-17 23:46                   ` Vladimir Serbinenko
2009-04-18  0:01                     ` John Stanley
2009-04-18  2:18                       ` Javier Martín
2009-04-18  2:36                         ` Vladimir Serbinenko
2009-05-03  0:02                           ` Javier Martín
2009-05-03  9:17                             ` Vladimir 'phcoder' Serbinenko
2009-05-03 19:45                               ` Pavel Roskin
2009-05-03 20:59                             ` Pavel Roskin
2009-05-03 23:37                               ` Javier Martín
2009-05-04  3:57                                 ` Pavel Roskin [this message]
2009-05-06 18:41                                   ` Javier Martín
2009-05-09  9:17                                     ` Vladimir 'phcoder' Serbinenko
2009-05-09 13:27                                       ` Javier Martín
2009-05-09 14:04                                         ` Vladimir 'phcoder' Serbinenko
2009-05-09 15:42                                           ` Javier Martín
2009-05-10 11:47                                             ` Vladimir 'phcoder' Serbinenko
2009-05-10 17:03                                               ` Javier Martín
2009-05-14  1:51                                             ` Pavel Roskin
2009-05-14  6:49                                               ` Vladimir 'phcoder' Serbinenko
2009-05-14 14:03                                                 ` Pavel Roskin
2009-05-14 15:01                                                   ` Vladimir 'phcoder' Serbinenko
2009-05-14 18:17                                                     ` Pavel Roskin
2009-05-14 18:38                                                       ` Vladimir 'phcoder' Serbinenko
2009-05-15 22:46                                                         ` Javier Martín
2009-05-30 15:28                                                       ` Vladimir 'phcoder' Serbinenko
2009-05-31 10:01                                                         ` Javier Martín
2009-05-31 11:36                                                           ` Vladimir 'phcoder' Serbinenko
2009-05-31 12:48                                                             ` Javier Martín
2009-05-31 16:00                                                               ` Vladimir 'phcoder' Serbinenko
2009-05-31 16:26                                                                 ` Javier Martín
2009-05-31 18:05                                                                   ` Vladimir 'phcoder' Serbinenko
2009-05-31 18:50                                                                     ` Javier Martín
2009-05-31 19:00                                                                       ` Vladimir 'phcoder' Serbinenko
2009-05-31 19:35                                                                 ` Christian Franke
2009-05-31 20:13                                                                   ` Javier Martín
2009-06-01  9:53                                                                     ` Vladimir 'phcoder' Serbinenko
2009-06-01 20:41                                                                       ` Javier Martín
2009-06-01 21:45                                                                         ` Vladimir 'phcoder' Serbinenko
2009-06-04 18:56                                                                           ` Vladimir 'phcoder' Serbinenko
2009-06-05 13:55                                                                           ` Vladimir 'phcoder' Serbinenko
2009-06-05 14:06                                                                             ` Javier Martín
2009-05-14  6:53                                               ` Vladimir 'phcoder' Serbinenko
2009-05-14 14:11                                                 ` Pavel Roskin

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=1241409431.26483.33.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.