lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 Dec 2010 10:05:34 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Hans Verkuil <hverkuil@...all.nl>
Cc:	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	alsa-devel@...a-project.org, broonie@...nsource.wolfsonmicro.com,
	clemens@...isch.de, gregkh@...e.de,
	sakari.ailus@...well.research.nokia.com
Subject: Re: [RFC/PATCH v7 03/12] media: Entities, pads and links

Hi Hans,

On Tuesday 21 December 2010 17:22:39 Hans Verkuil wrote:
> Hi Laurent,
> 
> I promised to look at the new type names, so here is my opinion:

Thanks.

> On Monday, December 20, 2010 12:36:26 Laurent Pinchart wrote:
> 
> <snip>
> 
> > +
> > +#define MEDIA_ENTITY_TYPE_SHIFT			16
> > +#define MEDIA_ENTITY_TYPE_MASK			0x00ff0000
> > +#define MEDIA_ENTITY_SUBTYPE_MASK		0x0000ffff
> > +
> > +#define MEDIA_ENTITY_TYPE_DEVNODE		(1 << MEDIA_ENTITY_TYPE_SHIFT)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_V4L		(MEDIA_ENTITY_TYPE_DEVNODE + 
1)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_FB		(MEDIA_ENTITY_TYPE_DEVNODE + 2)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_ALSA		(MEDIA_ENTITY_TYPE_DEVNODE + 
3)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_DVB		(MEDIA_ENTITY_TYPE_DEVNODE + 
4)
> > +
> > +#define MEDIA_ENTITY_TYPE_V4L2_SUBDEV		(2 << MEDIA_ENTITY_TYPE_SHIFT)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_SENSOR	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 1)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_FLASH	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 2)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_LENS	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 3) +
> > +#define MEDIA_ENTITY_FLAG_DEFAULT		(1 << 0)
> > +
> > +#define MEDIA_LINK_FLAG_ENABLED			(1 << 0)
> > +#define MEDIA_LINK_FLAG_IMMUTABLE		(1 << 1)
> > +
> > +#define MEDIA_PAD_FLAG_INPUT			(1 << 0)
> > +#define MEDIA_PAD_FLAG_OUTPUT			(1 << 1)
> 
> Using V4L2_SUBDEV instead of just SUBDEV is definitely an improvement.
> 
> However, I think the defines are getting way too long and I would propose
> to use the ME_ prefix instead of MEDIA_ENTITY_. Also ML_ instead of
> MEDIA_LINK_ and MP_ instead of MEDIA_PAD_.
> 
> That way it is less of an alphabet soup when reading code.

I agree that the names are too long, but I'm concerned that the ME_, ML_ and 
MP_ prefixes might cause namespace clashes.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ