mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: PATCH - mark 2: type safe(r) list_entry repacement: con
@ 2002-07-24 16:15 Petr Vandrovec
  2002-07-25  1:41 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vandrovec @ 2002-07-24 16:15 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

On 24 Jul 02 at 22:38, Neil Brown wrote:
> 
> With the "typeof" suggestion from Kevin, I could just change
> list_entry and not woory about the fact that lots of people use
> "list_entry" for things that aren't lists.... but I didn't.

Hello,
  is list_entry name really that bad? We have well established 
list_entry name since at least 2.2.0, and having two same functions 
with two different names will (IMHO) cause more damage than benefit 
from "clearer" name is.
                                        Thanks,
                                            Petr Vandrovec
                                            
P.S.: I converted whole matroxfb to use
list_entry(xxx, struct matrox_fb_info, fbcon) instead of
(struct matrox_fb_info*)xxx so that I can move fbcon field from 
first position in matrox_fb_info - so I'm personally interested
in backward source compatibility.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH - mark 2: type safe(r) list_entry repacement: con
  2002-07-24 16:15 PATCH - mark 2: type safe(r) list_entry repacement: con Petr Vandrovec
@ 2002-07-25  1:41 ` Neil Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2002-07-25  1:41 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel

On Wednesday July 24, VANDROVE@vc.cvut.cz wrote:
> On 24 Jul 02 at 22:38, Neil Brown wrote:
> > 
> > With the "typeof" suggestion from Kevin, I could just change
> > list_entry and not woory about the fact that lots of people use
> > "list_entry" for things that aren't lists.... but I didn't.
> 
> Hello,
>   is list_entry name really that bad? We have well established 
> list_entry name since at least 2.2.0, and having two same functions 
> with two different names will (IMHO) cause more damage than benefit 
> from "clearer" name is.

Well... "list_entry" is fine when you are working with a list... but
when you aren't it is downright confusing.

The two functions (actually macros) have the same body, but have
conceptually different uses.  Having extra clues in the code to help
readers know what is happening is a *good*thing*.

>                                         Thanks,
>                                             Petr Vandrovec
>                                             
> P.S.: I converted whole matroxfb to use
> list_entry(xxx, struct matrox_fb_info, fbcon) instead of
> (struct matrox_fb_info*)xxx so that I can move fbcon field from 
> first position in matrox_fb_info - so I'm personally interested
> in backward source compatibility.

In the final patch backward source compatability was not broken, so
you should be fine.

NeilBrown

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-25  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 16:15 PATCH - mark 2: type safe(r) list_entry repacement: con Petr Vandrovec
2002-07-25  1:41 ` Neil Brown

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®