Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20210330]
[cannot apply to linux/master hch-configfs/for-next linus/master v5.12-rc5 
v5.12-rc4 v5.12-rc3 v5.12-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/MIPS-Remove-get_fs-set_fs/20210331-013005
base:    4143e05b7b171902f4938614c2a68821e1af46bc
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://github.com/0day-ci/linux/commit/628cb4a48f0f31c44bfc3a41b0bad05ba8b8ed3b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Thomas-Bogendoerfer/MIPS-Remove-get_fs-set_fs/20210331-013005
        git checkout 628cb4a48f0f31c44bfc3a41b0bad05ba8b8ed3b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

   arch/mips/kernel/ftrace.c: In function 'ftrace_modify_code_2':
>> arch/mips/kernel/ftrace.c:105:11: error: implicit declaration of function 
>> 'get_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
     105 |  old_fs = get_fs();
         |           ^~~~~~
         |           sget_fc
>> arch/mips/kernel/ftrace.c:105:11: error: incompatible types when assigning 
>> to type 'mm_segment_t' {aka 'struct <anonymous>'} from type 'int'
>> arch/mips/kernel/ftrace.c:106:2: error: implicit declaration of function 
>> 'set_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
     106 |  set_fs(KERNEL_DS);
         |  ^~~~~~
         |  sget_fc
>> arch/mips/kernel/ftrace.c:106:9: error: 'KERNEL_DS' undeclared (first use in 
>> this function); did you mean 'KERNFS_NS'?
     106 |  set_fs(KERNEL_DS);
         |         ^~~~~~~~~
         |         KERNFS_NS
   arch/mips/kernel/ftrace.c:106:9: note: each undeclared identifier is 
reported only once for each function it appears in
   arch/mips/kernel/ftrace.c: In function 'ftrace_modify_code_2r':
   arch/mips/kernel/ftrace.c:129:11: error: incompatible types when assigning 
to type 'mm_segment_t' {aka 'struct <anonymous>'} from type 'int'
     129 |  old_fs = get_fs();
         |           ^~~~~~
   arch/mips/kernel/ftrace.c:130:9: error: 'KERNEL_DS' undeclared (first use in 
this function); did you mean 'KERNFS_NS'?
     130 |  set_fs(KERNEL_DS);
         |         ^~~~~~~~~
         |         KERNFS_NS
   arch/mips/kernel/ftrace.c: At top level:
   arch/mips/kernel/ftrace.c:313:6: warning: no previous prototype for 
'prepare_ftrace_return' [-Wmissing-prototypes]
     313 | void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned 
long self_ra,
         |      ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +105 arch/mips/kernel/ftrace.c

538f19526e40ce Wu Zhangjin    2009-11-20   87  
58b69401c797e4 Al Cooper      2013-01-16   88  #ifndef CONFIG_64BIT
58b69401c797e4 Al Cooper      2013-01-16   89  static int 
ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
58b69401c797e4 Al Cooper      2013-01-16   90                           
unsigned int new_code2)
58b69401c797e4 Al Cooper      2013-01-16   91  {
58b69401c797e4 Al Cooper      2013-01-16   92   int faulted;
dce0e7d54a7104 Petri Gynther  2014-07-23   93   mm_segment_t old_fs;
58b69401c797e4 Al Cooper      2013-01-16   94  
58b69401c797e4 Al Cooper      2013-01-16   95   safe_store_code(new_code1, ip, 
faulted);
58b69401c797e4 Al Cooper      2013-01-16   96   if (unlikely(faulted))
58b69401c797e4 Al Cooper      2013-01-16   97           return -EFAULT;
dce0e7d54a7104 Petri Gynther  2014-07-23   98  
dce0e7d54a7104 Petri Gynther  2014-07-23   99   ip += 4;
dce0e7d54a7104 Petri Gynther  2014-07-23  100   safe_store_code(new_code2, ip, 
faulted);
dce0e7d54a7104 Petri Gynther  2014-07-23  101   if (unlikely(faulted))
dce0e7d54a7104 Petri Gynther  2014-07-23  102           return -EFAULT;
dce0e7d54a7104 Petri Gynther  2014-07-23  103  
dce0e7d54a7104 Petri Gynther  2014-07-23  104   ip -= 4;
dce0e7d54a7104 Petri Gynther  2014-07-23 @105   old_fs = get_fs();
736706bee32982 Linus Torvalds 2019-03-04 @106   set_fs(KERNEL_DS);
dce0e7d54a7104 Petri Gynther  2014-07-23  107   flush_icache_range(ip, ip + 8);
dce0e7d54a7104 Petri Gynther  2014-07-23  108   set_fs(old_fs);
dce0e7d54a7104 Petri Gynther  2014-07-23  109  
dce0e7d54a7104 Petri Gynther  2014-07-23  110   return 0;
dce0e7d54a7104 Petri Gynther  2014-07-23  111  }
dce0e7d54a7104 Petri Gynther  2014-07-23  112  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to