aboutsummaryrefslogtreecommitdiffstats
path: root/include/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-28 03:04:09 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-14 04:34:41 -0400
commit3627924acf70a9a26587712e4888ee7144489678 (patch)
tree1804290f2659105b2bd00e4d31f677f43f7d0dc1 /include/mtd
parente8e088de305d7cc00b2c8b2a857ceb62d5fa68d3 (diff)
UBI: use __packed instead of __attribute__((packed))
There was an attempt to standartize various "__attribute__" and other macros in order to have potentially portable and more consistent code, see commit 82ddcb040570411fc2d421d96b3e69711c670328. Note, that commit refers Rober Love's blog post, but the URL is broken, the valid URL is: http://blog.rlove.org/2005/10/with-little-help-from-your-compiler.html Moreover, nowadays checkpatch.pl warns about using __attribute__((packed)): "WARNING: __packed is preferred over __attribute__((packed))" It is not a big deal for UBI to use __packed, so let's do it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include/mtd')
-rw-r--r--include/mtd/ubi-user.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index e70bd347dbb..a3903423c00 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -310,7 +310,7 @@ struct ubi_mkvol_req {
310 __s16 name_len; 310 __s16 name_len;
311 __s8 padding2[4]; 311 __s8 padding2[4];
312 char name[UBI_MAX_VOLUME_NAME + 1]; 312 char name[UBI_MAX_VOLUME_NAME + 1];
313} __attribute__ ((packed)); 313} __packed;
314 314
315/** 315/**
316 * struct ubi_rsvol_req - a data structure used in volume re-size requests. 316 * struct ubi_rsvol_req - a data structure used in volume re-size requests.
@@ -326,7 +326,7 @@ struct ubi_mkvol_req {
326struct ubi_rsvol_req { 326struct ubi_rsvol_req {
327 __s64 bytes; 327 __s64 bytes;
328 __s32 vol_id; 328 __s32 vol_id;
329} __attribute__ ((packed)); 329} __packed;
330 330
331/** 331/**
332 * struct ubi_rnvol_req - volumes re-name request. 332 * struct ubi_rnvol_req - volumes re-name request.
@@ -368,7 +368,7 @@ struct ubi_rnvol_req {
368 __s8 padding2[2]; 368 __s8 padding2[2];
369 char name[UBI_MAX_VOLUME_NAME + 1]; 369 char name[UBI_MAX_VOLUME_NAME + 1];
370 } ents[UBI_MAX_RNVOL]; 370 } ents[UBI_MAX_RNVOL];
371} __attribute__ ((packed)); 371} __packed;
372 372
373/** 373/**
374 * struct ubi_leb_change_req - a data structure used in atomic LEB change 374 * struct ubi_leb_change_req - a data structure used in atomic LEB change
@@ -383,7 +383,7 @@ struct ubi_leb_change_req {
383 __s32 bytes; 383 __s32 bytes;
384 __s8 dtype; 384 __s8 dtype;
385 __s8 padding[7]; 385 __s8 padding[7];
386} __attribute__ ((packed)); 386} __packed;
387 387
388/** 388/**
389 * struct ubi_map_req - a data structure used in map LEB requests. 389 * struct ubi_map_req - a data structure used in map LEB requests.
@@ -395,7 +395,7 @@ struct ubi_map_req {
395 __s32 lnum; 395 __s32 lnum;
396 __s8 dtype; 396 __s8 dtype;
397 __s8 padding[3]; 397 __s8 padding[3];
398} __attribute__ ((packed)); 398} __packed;
399 399
400 400
401/** 401/**
@@ -409,6 +409,6 @@ struct ubi_set_vol_prop_req {
409 __u8 property; 409 __u8 property;
410 __u8 padding[7]; 410 __u8 padding[7];
411 __u64 value; 411 __u64 value;
412} __attribute__ ((packed)); 412} __packed;
413 413
414#endif /* __UBI_USER_H__ */ 414#endif /* __UBI_USER_H__ */