mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Rob Landley <landley@trommello.org>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: Re: small IDE cleanup: void * should not be used unless neccessary
Date: Wed, 13 Feb 2002 23:50:48 +0100	[thread overview]
Message-ID: <20020213225047.GI1454@elf.ucw.cz> (raw)
In-Reply-To: <20020211220937.GA121@elf.ucw.cz> <20020212224930.OKGN9845.femail25.sdc1.sfba.home.com@there> <20020213104731.GG32687@atrey.karlin.mff.cuni.cz> <20020213193835.CIGI23450.femail13.sdc1.sfba.home.com@there>
In-Reply-To: <20020213193835.CIGI23450.femail13.sdc1.sfba.home.com@there>

Hi!

> > > > This is really easy, please apply. (It will allow me to kill few casts
> > > > in future).
> > > > 								Pavel
> > > >
> > > > --- linux/include/linux/ide.h	Mon Feb 11 21:15:04 2002
> > > > +++ linux-dm/include/linux/ide.h	Mon Feb 11 22:36:12 2002
> > > > @@ -529,7 +531,7 @@
> > > >
> > > >  typedef struct hwif_s {
> > > >  	struct hwif_s	*next;		/* for linked-list in ide_hwgroup_t */
> > > > -	void		*hwgroup;	/* actually (ide_hwgroup_t *) */
> > > > +	struct hwgroup_s *hwgroup;	/* actually (ide_hwgroup_t *) */
> > > >  	ide_ioreg_t	io_ports[IDE_NR_PORTS];	/* task file registers */
> > > >  	hw_regs_t	hw;		/* Hardware info */
> > > >  	ide_drive_t	drives[MAX_DRIVES];	/* drive info */
> > >
> > > Now I'm confused about the comment on the end of the line.
> > >
> > > Should the comment be changed, or should the type be ide_hwgroup_t
> > > instead of struct hwgroup_s?
> >
> > struct hwgroup_s == ide_hwgroup_t. That's infection by hungarian
> > notation, and yes it would be nice to clean it up. For now, I'm
> > killing worst stuff.
> > 							Pavel
> 
> I know they're functionally equivalent, but so was the original void
> *. :)

Well, void * hides real errors.

> Just an "as long as you're touching this line anyway, why leave the old 
> comment?" thing.  A minor, in-passing nit at best...

ide_hwgroup_t is used in 90% of rest of code, so I thought I better
leave it there.
									Pavel
-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa

  reply	other threads:[~2002-02-14 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-11 22:09 Pavel Machek
2002-02-12 22:50 ` Rob Landley
2002-02-12 22:57   ` Rob Radez
2002-02-13 10:47   ` Pavel Machek
2002-02-13 19:39     ` Rob Landley
2002-02-13 22:50       ` Pavel Machek [this message]
2002-02-16  1:08         ` Andre Hedrick
2002-02-16  8:07           ` Vojtech Pavlik
2002-02-12 23:02 ` Rob Radez
2002-02-13  7:29   ` Vojtech Pavlik
2002-02-13 10:46   ` Pavel Machek

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=20020213225047.GI1454@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=landley@trommello.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®