public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Jay Buddhabhatti <jay.buddhabhatti@amd.com>,
	michal.simek@amd.com, gregkh@linuxfoundation.org,
	tanmay.shah@amd.com, mathieu.poirier@linaro.org,
	nava.kishore.manne@amd.com, ben.levinsky@amd.com,
	sai.krishna.potthuri@amd.com, marex@denx.de, robh@kernel.org,
	ruanjinjie@huawei.com, arnd@arndb.de, shubhrajyoti.datta@amd.com,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Izhar Ameer Shaikh <izhar.ameer.shaikh@amd.com>
Subject: Re: [PATCH v4 1/5] firmware: xilinx: Update firmware call interface to support additional args
Date: Tue, 14 Nov 2023 13:00:56 -0700	[thread overview]
Message-ID: <20231114200056.GA3377479@dev-arch.thelio-3990X> (raw)
In-Reply-To: <202311111439.Hxd4wZ6x-lkp@intel.com>

On Sat, Nov 11, 2023 at 02:47:06PM +0800, kernel test robot wrote:
> Hi Jay,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on driver-core/driver-core-testing]
> [also build test WARNING on driver-core/driver-core-next driver-core/driver-core-linus staging/staging-testing staging/staging-next staging/staging-linus linus/master v6.6 next-20231110]
> [cannot apply to xilinx-xlnx/master]
> [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#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Jay-Buddhabhatti/firmware-xilinx-Update-firmware-call-interface-to-support-additional-args/20231109-191827
> base:   driver-core/driver-core-testing
> patch link:    https://lore.kernel.org/r/20231109070021.16291-2-jay.buddhabhatti%40amd.com
> patch subject: [PATCH v4 1/5] firmware: xilinx: Update firmware call interface to support additional args
> config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20231111/202311111439.Hxd4wZ6x-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311111439.Hxd4wZ6x-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202311111439.Hxd4wZ6x-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/firmware/xilinx/zynqmp.c:139:21: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]
>      139 |         va_start(arg_list, num_args);
>          |                            ^
>    drivers/firmware/xilinx/zynqmp.c:129:57: note: parameter of type 'u8' (aka 'unsigned char') is declared here
>      129 | static noinline int do_fw_call_smc(u32 *ret_payload, u8 num_args, ...)
>          |                                                         ^
>    drivers/firmware/xilinx/zynqmp.c:179:21: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]
>      179 |         va_start(arg_list, num_args);
>          |                            ^
>    drivers/firmware/xilinx/zynqmp.c:169:57: note: parameter of type 'u8' (aka 'unsigned char') is declared here
>      169 | static noinline int do_fw_call_hvc(u32 *ret_payload, u8 num_args, ...)
>          |                                                         ^
>    drivers/firmware/xilinx/zynqmp.c:349:21: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs]
>      349 |         va_start(arg_list, num_args);
>          |                            ^
>    drivers/firmware/xilinx/zynqmp.c:335:61: note: parameter of type 'u8' (aka 'unsigned char') is declared here
>      335 | int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 *ret_payload, u8 num_args, ...)
>          |                                                             ^
>    3 warnings generated.

FWIW, this is saying that num_args should be 'int' or 'unsigned int',
see commit be24b37e22c2 ("KEYS: trusted: fix -Wvarags warning") for
another instance of this problem.

Cheers,
Nathan

> vim +/va_start +139 drivers/firmware/xilinx/zynqmp.c
> 
>    119	
>    120	/**
>    121	 * do_fw_call_smc() - Call system-level platform management layer (SMC)
>    122	 * @num_args:		Number of variable arguments should be <= 8
>    123	 * @ret_payload:	Returned value array
>    124	 *
>    125	 * Invoke platform management function via SMC call (no hypervisor present).
>    126	 *
>    127	 * Return: Returns status, either success or error+reason
>    128	 */
>    129	static noinline int do_fw_call_smc(u32 *ret_payload, u8 num_args, ...)
>    130	{
>    131		struct arm_smccc_res res;
>    132		u64 args[8] = {0};
>    133		va_list arg_list;
>    134		u8 i;
>    135	
>    136		if (num_args > 8)
>    137			return -EINVAL;
>    138	
>  > 139		va_start(arg_list, num_args);
>    140	
>    141		for (i = 0; i < num_args; i++)
>    142			args[i] = va_arg(arg_list, u64);
>    143	
>    144		va_end(arg_list);
>    145	
>    146		arm_smccc_smc(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], &res);
>    147	
>    148		if (ret_payload) {
>    149			ret_payload[0] = lower_32_bits(res.a0);
>    150			ret_payload[1] = upper_32_bits(res.a0);
>    151			ret_payload[2] = lower_32_bits(res.a1);
>    152			ret_payload[3] = upper_32_bits(res.a1);
>    153		}
>    154	
>    155		return zynqmp_pm_ret_code((enum pm_ret_status)res.a0);
>    156	}
>    157	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-14 20:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  7:00 [PATCH v4 0/5] update for versal net platform Jay Buddhabhatti
2023-11-09  7:00 ` [PATCH v4 1/5] firmware: xilinx: Update firmware call interface to support additional args Jay Buddhabhatti
2023-11-11  6:47   ` kernel test robot
2023-11-14 20:00     ` Nathan Chancellor [this message]
2023-11-09  7:00 ` [PATCH v4 2/5] firmware: xilinx: Expand feature check to support all PLM modules Jay Buddhabhatti
2023-11-09  7:00 ` [PATCH v4 3/5] firmware: xilinx: Register event manager driver Jay Buddhabhatti
2023-11-09  7:00 ` [PATCH v4 4/5] drivers: soc: xilinx: Fix error message on SGI registration failure Jay Buddhabhatti
2023-11-09  7:00 ` [PATCH v4 5/5] firmware: zynqmp: Add support to handle IPI CRC failure Jay Buddhabhatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231114200056.GA3377479@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ben.levinsky@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=izhar.ameer.shaikh@amd.com \
    --cc=jay.buddhabhatti@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marex@denx.de \
    --cc=mathieu.poirier@linaro.org \
    --cc=michal.simek@amd.com \
    --cc=nava.kishore.manne@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=shubhrajyoti.datta@amd.com \
    --cc=tanmay.shah@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox