Re: [PATCH 3/3] ALSA: firewire-lib: change structure member with proper type

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

 



Hi Clemens,

On Jan 4 2017 20:13, Clemens Ladisch wrote:
Takashi Sakamoto wrote:
The 'amdtp_stream' structure is initialized by a call of
'amdtp_stream_init()'. Although a parameter of this function is for bit
flags of packet attributes, its type is enumerator.

This is the correct type to use for an enumeration consisting of bit
flags.  What problem do you see with this?

We have cases that an actual value to the parameter is not one of enumeration-constants. I had this concern and posted the patch.

But this is permitted, as you said. C language specification has loose constrains to the actual value of the type, just within a range of enumeration-constants. I understand that a list of enumeration-constants is just used to decide the actual integer type of the type.

I'll post revert patch. Thanks for your indication!

 int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
-		      enum amdtp_stream_direction dir, enum cip_flags flags,
+		      enum amdtp_stream_direction dir, int flags,
 		      unsigned int fmt,


Regards

Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux