loongson-community / linux-stable

Linux kernel source tree for Loongson
Other
67 stars 21 forks source link

[Kernel] void function 'smi_encoder_dpms' should not return a value #13

Open xiangzhai opened 6 years ago

xiangzhai commented 6 years ago

Hi Loonger,

$ make CC=/opt/loong-llvm/bin/clang
clang-7: warning: argument unused during compilation: '-Wa,-msoft-float' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-Wa,--trap' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-Wa,-mno-fix-loongson3-llsc' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
  ...
drivers/gpu/drm/smi/smi_mode.c:541:5: error: void function 'smi_encoder_dpms' should not return a value
      [-Wreturn-type]
                                LEAVE(0);
                                ^     ~
drivers/gpu/drm/smi/smi_drv.h:66:20: note: expanded from macro 'LEAVE'
#define LEAVE(...) return __VA_ARGS__;
                   ^      ~~~~~~~~~~~
drivers/gpu/drm/smi/smi_mode.c:551:5: error: void function 'smi_encoder_dpms' should not return a value
      [-Wreturn-type]
                                LEAVE(0);
                                ^     ~
drivers/gpu/drm/smi/smi_drv.h:66:20: note: expanded from macro 'LEAVE'
#define LEAVE(...) return __VA_ARGS__;
                   ^      ~~~~~~~~~~~
drivers/gpu/drm/smi/smi_mode.c:558:5: error: void function 'smi_encoder_dpms' should not return a value
      [-Wreturn-type]
                                LEAVE(0);
                                ^     ~
drivers/gpu/drm/smi/smi_drv.h:66:20: note: expanded from macro 'LEAVE'
#define LEAVE(...) return __VA_ARGS__;
                   ^      ~~~~~~~~~~~
drivers/gpu/drm/smi/smi_mode.c:572:5: error: void function 'smi_encoder_dpms' should not return a value
      [-Wreturn-type]
                                LEAVE(0);
                                ^     ~
drivers/gpu/drm/smi/smi_drv.h:66:20: note: expanded from macro 'LEAVE'
#define LEAVE(...) return __VA_ARGS__;
                   ^      ~~~~~~~~~~~
...
10 warnings and 4 errors generated.
scripts/Makefile.build:296: recipe for target 'drivers/gpu/drm/smi/smi_mode.o' failed
make[4]: *** [drivers/gpu/drm/smi/smi_mode.o] Error 1

Regards, Leslie Zhai