Re: [PATCH 1/4] fbdev: add a MIPI DSI header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 19, 2010 at 05:00:58PM +0200, ext Paul Mundt wrote:
> On Wed, May 19, 2010 at 05:27:32PM +0300, Ville Syrj?l? wrote:
> > On Wed, May 19, 2010 at 10:21:48AM +0200, Valkeinen Tomi (Nokia-D/Helsinki) wrote:
> > > I think a simple solution would be to just use defines, and have
> > > functions that take the command as u8. That's what the OMAP DSI driver
> > > does. If you have better ideas, please share =).
> > 
> > I find enums easier on the eye than defines. Less irrelevant junk on
> > each line. There's no reason you can't pass enum values as u8. But in
> > that case giving the enum a name doesn't really make sense.
> > 
> enums are cleaner for these cases, but you also have the case where the
> enum type itself is variable size depending on the ABI being used. If
> the type in question isn't being packed in to a user-visible data
> structure then this will never matter, but it does help to be a bit
> careful here regardless. Many people were bitten by this in the ARM
> OABI -> EABI conversion, while other architectures generally managed to
> get it right from the onset.

Yeah using the enum type in ABI is a bad idea since actual type is
implementation defined. But if you don't give the enum an identifier
there's no way to even accidentally use it as a type.

-- 
Ville Syrjälä
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux