lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[sudeep-holla:for-next/ffa 1/1] drivers/firmware/arm_ffa/driver.c:404:17: warning: suggest explicit braces to avoid ambiguous 'else'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git for-next/ffa
head: f924bccb73cadccf18a97c3c6a4e8c12120c3cdc
commit: f924bccb73cadccf18a97c3c6a4e8c12120c3cdc [1/1] firmware: arm_ffa: Fix handling of fragmented memory descriptors
config: arm64-randconfig-r023-20220425 (https://download.01.org/0day-ci/archive/20220427/202204270258.eWC4oaGl-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.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://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/commit/?id=f924bccb73cadccf18a97c3c6a4e8c12120c3cdc
git remote add sudeep-holla https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git
git fetch --no-tags sudeep-holla for-next/ffa
git checkout f924bccb73cadccf18a97c3c6a4e8c12120c3cdc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/firmware/arm_ffa/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

drivers/firmware/arm_ffa/driver.c: In function 'ffa_mem_first_frag':
>> drivers/firmware/arm_ffa/driver.c:404:17: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
404 | else if (ret.a0 == FFA_MEM_FRAG_RX)
| ^
drivers/firmware/arm_ffa/driver.c:401:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
401 | if (ret.a0 == FFA_SUCCESS)
| ^


vim +/else +404 drivers/firmware/arm_ffa/driver.c

381
382 static int ffa_mem_first_frag(u32 func_id, phys_addr_t buf, u32 buf_sz,
383 u32 frag_len, u32 len, u64 *handle)
384 {
385 ffa_value_t ret;
386
387 invoke_ffa_fn((ffa_value_t){
388 .a0 = func_id, .a1 = len, .a2 = frag_len,
389 .a3 = buf, .a4 = buf_sz,
390 }, &ret);
391
392 while (ret.a0 == FFA_MEM_OP_PAUSE)
393 invoke_ffa_fn((ffa_value_t){
394 .a0 = FFA_MEM_OP_RESUME,
395 .a1 = ret.a1, .a2 = ret.a2,
396 }, &ret);
397
398 if (ret.a0 == FFA_ERROR)
399 return ffa_to_linux_errno((int)ret.a2);
400
401 if (ret.a0 == FFA_SUCCESS)
402 if (handle)
403 *handle = PACK_HANDLE(ret.a2, ret.a3);
> 404 else if (ret.a0 == FFA_MEM_FRAG_RX)
405 if (handle)
406 *handle = PACK_HANDLE(ret.a1, ret.a2);
407 else
408 return -EOPNOTSUPP;
409
410 return frag_len;
411 }
412

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-04-26 20:37    [W:0.023 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site