设备属性权限导致的编译错误

先记录下来,后续研究原因。

 

static DEVICE_ATTR(debug_mesg, S_IRUGO | S_IWUGO, show_debug_mesg, store_debug_mesg);

将S_IWUGO改为S_IWUSR就好了。

 

In file included from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/thread_info.h:11:0,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/asm-generic/preempt.h:4,
                 from arch/arm64/include/generated/asm/preempt.h:1,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/preempt.h:18,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/spinlock.h:50,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/seqlock.h:35,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/time.h:5,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/uapi/linux/timex.h:56,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/timex.h:56,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sched.h:19,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/arch/arm64/include/asm/compat.h:25,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/arch/arm64/include/asm/stat.h:23,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/stat.h:5,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/module.h:10,
                 from /home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-
3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:47:
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2812:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(debug_mesg, S_IRUGO | S_IWUGO, show_debug_mesg, store_debug_mesg);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2817:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(reset, S_IRUGO | S_IWUGO, show_reset, store_reset);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2818:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(iap, S_IWUGO, NULL, store_iap);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2819:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(enable_irq, S_IRUGO | S_IWUGO, show_enable_irq, store_enable_irq);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2820:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(disable_irq, S_IRUGO | S_IWUGO, show_disable_irq, store_disable_irq);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2821:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(calibrate, S_IWUGO, NULL, store_calibrate);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2822:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(shift_finger_id, S_IWUGO, NULL, store_shift_finger_id);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2825:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(fw_update_in_driver, S_IWUGO, NULL, store_fw_update_in_driver);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2826:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(fw_update, S_IWUGO, NULL, store_fw_update);
        ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/bug.h:33:45: error: negative width in bit-
field ''
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/kernel.h:827:3: note: in expansion of macro
'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO((perms) & 2) +    \
   ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/sysfs.h:75:12: note: in expansion of macro
'VERIFY_OCTAL_PERMISSIONS'
    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },  \
            ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/include/linux/device.h:570:45: note: in expansion of macro
'__ATTR'
  struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
                                             ^
/home/android/work2/R20/LA.UM.6.6/LINUX/android/kernel/msm-3.18/drivers/input/touchscreen/elan_ktf/elan_ktf_6720.c:2827:8:
note: in expansion of macro 'DEVICE_ATTR'
 static DEVICE_ATTR(fw_update_elan, S_IWUGO, NULL, store_fw_update_elan);

你可能感兴趣的:(设备属性权限导致的编译错误)