Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[firefly-linux-kernel-4.4.55.git] / drivers / edac / edac_core.h
index 7450fd3bdf0b640e549add55a2709953c20a6432..d7ca43a828bd3fe57b3de1341d7e75d1bed84f0a 100644 (file)
 
 #if PAGE_SHIFT < 20
 #define PAGES_TO_MiB( pages )  ( ( pages ) >> ( 20 - PAGE_SHIFT ) )
+#define MiB_TO_PAGES(mb)       ((mb) >> (20 - PAGE_SHIFT))
 #else                          /* PAGE_SHIFT > 20 */
 #define PAGES_TO_MiB( pages )  ( ( pages ) << ( PAGE_SHIFT - 20 ) )
+#define MiB_TO_PAGES(mb)       ((mb) >> (PAGE_SHIFT - 20))
 #endif
 
 #define edac_printk(level, prefix, fmt, arg...) \
@@ -328,7 +330,7 @@ struct csrow_info {
 
 struct mcidev_sysfs_group {
        const char *name;                               /* group name */
-       struct mcidev_sysfs_attribute *mcidev_attr;     /* group attributes */
+       const struct mcidev_sysfs_attribute *mcidev_attr; /* group attributes */
 };
 
 struct mcidev_sysfs_group_kobj {
@@ -336,7 +338,7 @@ struct mcidev_sysfs_group_kobj {
 
        struct kobject kobj;            /* kobj for the group */
 
-       struct mcidev_sysfs_group *grp; /* group description table */
+       const struct mcidev_sysfs_group *grp;   /* group description table */
        struct mem_ctl_info *mci;       /* the parent */
 };
 
@@ -347,7 +349,7 @@ struct mcidev_sysfs_group_kobj {
 struct mcidev_sysfs_attribute {
        /* It should use either attr or grp */
        struct attribute attr;
-       struct mcidev_sysfs_group *grp; /* Points to a group of attributes */
+       const struct mcidev_sysfs_group *grp;   /* Points to a group of attributes */
 
        /* Ops for show/store values at the attribute - not used on group */
         ssize_t (*show)(struct mem_ctl_info *,char *);
@@ -440,7 +442,7 @@ struct mem_ctl_info {
         * If attributes are desired, then set to array of attributes
         * If no attributes are desired, leave NULL
         */
-       struct mcidev_sysfs_attribute *mc_driver_sysfs_attributes;
+       const struct mcidev_sysfs_attribute *mc_driver_sysfs_attributes;
 
        /* work struct for this MC */
        struct delayed_work work;