Re: [PATCH] pwm: cros_ec: add __packed to prevent padding

2016-09-07 Thread Thierry Reding
On Tue, Jul 26, 2016 at 11:22:13AM -0700, Brian Norris wrote: > While the particular usage in question is likely safe (struct > cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's > been suggested this is not a great pattern to follow for the general > case -- for example, if we f

Re: [PATCH] pwm: cros_ec: add __packed to prevent padding

2016-09-04 Thread Thierry Reding
On Tue, Jul 26, 2016 at 11:22:13AM -0700, Brian Norris wrote: > While the particular usage in question is likely safe (struct > cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's > been suggested this is not a great pattern to follow for the general > case -- for example, if we f

Re: [PATCH] pwm: cros_ec: add __packed to prevent padding

2016-07-26 Thread Guenter Roeck
On Tue, Jul 26, 2016 at 11:22:13AM -0700, Brian Norris wrote: > While the particular usage in question is likely safe (struct > cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's > been suggested this is not a great pattern to follow for the general > case -- for example, if we f

Re: [PATCH] pwm: cros_ec: add __packed to prevent padding

2016-07-26 Thread Dmitry Torokhov
On Tue, Jul 26, 2016 at 11:22:13AM -0700, Brian Norris wrote: > While the particular usage in question is likely safe (struct > cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's > been suggested this is not a great pattern to follow for the general > case -- for example, if we f

[PATCH] pwm: cros_ec: add __packed to prevent padding

2016-07-26 Thread Brian Norris
While the particular usage in question is likely safe (struct cros_ec_command is 32-bit aligned, followed by <=32-bit fields), it's been suggested this is not a great pattern to follow for the general case -- for example, if we follow a 'struct cros_ec_command' (which is 32-bit- but not 64-bit-alig