lkml.org 
[lkml]   [2021]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting
Hi Krzysztof,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: 4a9a1a5602d82c079325bf37466af0b67d6c0b9e arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA
date: 8 months ago
config: arm64-randconfig-m031-20211116 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0

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

smatch warnings:
drivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting

vim +823 drivers/firmware/stratix10-svc.c

7ca5ce896524f5 Richard Gong 2018-11-13 791
7ca5ce896524f5 Richard Gong 2018-11-13 792 /**
7ca5ce896524f5 Richard Gong 2018-11-13 793 * stratix10_svc_send() - send a message data to the remote
7ca5ce896524f5 Richard Gong 2018-11-13 794 * @chan: service channel assigned to the client
7ca5ce896524f5 Richard Gong 2018-11-13 795 * @msg: message data to be sent, in the format of
7ca5ce896524f5 Richard Gong 2018-11-13 796 * "struct stratix10_svc_client_msg"
7ca5ce896524f5 Richard Gong 2018-11-13 797 *
7ca5ce896524f5 Richard Gong 2018-11-13 798 * This function is used by service client to add a message to the service
7ca5ce896524f5 Richard Gong 2018-11-13 799 * layer driver's queue for being sent to the secure world.
7ca5ce896524f5 Richard Gong 2018-11-13 800 *
7ca5ce896524f5 Richard Gong 2018-11-13 801 * Return: 0 for success, -ENOMEM or -ENOBUFS on error.
7ca5ce896524f5 Richard Gong 2018-11-13 802 */
7ca5ce896524f5 Richard Gong 2018-11-13 803 int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg)
7ca5ce896524f5 Richard Gong 2018-11-13 804 {
7ca5ce896524f5 Richard Gong 2018-11-13 805 struct stratix10_svc_client_msg
7ca5ce896524f5 Richard Gong 2018-11-13 806 *p_msg = (struct stratix10_svc_client_msg *)msg;
7ca5ce896524f5 Richard Gong 2018-11-13 807 struct stratix10_svc_data_mem *p_mem;
7ca5ce896524f5 Richard Gong 2018-11-13 808 struct stratix10_svc_data *p_data;
7ca5ce896524f5 Richard Gong 2018-11-13 809 int ret = 0;
7ca5ce896524f5 Richard Gong 2018-11-13 810 unsigned int cpu = 0;
7ca5ce896524f5 Richard Gong 2018-11-13 811
7ca5ce896524f5 Richard Gong 2018-11-13 812 p_data = kzalloc(sizeof(*p_data), GFP_KERNEL);
7ca5ce896524f5 Richard Gong 2018-11-13 813 if (!p_data)
7ca5ce896524f5 Richard Gong 2018-11-13 814 return -ENOMEM;
7ca5ce896524f5 Richard Gong 2018-11-13 815
7ca5ce896524f5 Richard Gong 2018-11-13 816 /* first client will create kernel thread */
7ca5ce896524f5 Richard Gong 2018-11-13 817 if (!chan->ctrl->task) {
7ca5ce896524f5 Richard Gong 2018-11-13 818 chan->ctrl->task =
7ca5ce896524f5 Richard Gong 2018-11-13 819 kthread_create_on_node(svc_normal_to_secure_thread,
7ca5ce896524f5 Richard Gong 2018-11-13 820 (void *)chan->ctrl,
7ca5ce896524f5 Richard Gong 2018-11-13 821 cpu_to_node(cpu),
7ca5ce896524f5 Richard Gong 2018-11-13 822 "svc_smc_hvc_thread");
7ca5ce896524f5 Richard Gong 2018-11-13 @823 if (IS_ERR(chan->ctrl->task)) {
7ca5ce896524f5 Richard Gong 2018-11-13 824 dev_err(chan->ctrl->dev,
b5dc75c915cdae Richard Gong 2019-09-03 825 "failed to create svc_smc_hvc_thread\n");
7ca5ce896524f5 Richard Gong 2018-11-13 826 kfree(p_data);
7ca5ce896524f5 Richard Gong 2018-11-13 827 return -EINVAL;
7ca5ce896524f5 Richard Gong 2018-11-13 828 }
7ca5ce896524f5 Richard Gong 2018-11-13 829 kthread_bind(chan->ctrl->task, cpu);
7ca5ce896524f5 Richard Gong 2018-11-13 830 wake_up_process(chan->ctrl->task);
7ca5ce896524f5 Richard Gong 2018-11-13 831 }
7ca5ce896524f5 Richard Gong 2018-11-13 832
7ca5ce896524f5 Richard Gong 2018-11-13 833 pr_debug("%s: sent P-va=%p, P-com=%x, P-size=%u\n", __func__,
7ca5ce896524f5 Richard Gong 2018-11-13 834 p_msg->payload, p_msg->command,
7ca5ce896524f5 Richard Gong 2018-11-13 835 (unsigned int)p_msg->payload_length);
7ca5ce896524f5 Richard Gong 2018-11-13 836
7ca5ce896524f5 Richard Gong 2018-11-13 837 if (list_empty(&svc_data_mem)) {
7ca5ce896524f5 Richard Gong 2018-11-13 838 if (p_msg->command == COMMAND_RECONFIG) {
7ca5ce896524f5 Richard Gong 2018-11-13 839 struct stratix10_svc_command_config_type *ct =
7ca5ce896524f5 Richard Gong 2018-11-13 840 (struct stratix10_svc_command_config_type *)
7ca5ce896524f5 Richard Gong 2018-11-13 841 p_msg->payload;
7ca5ce896524f5 Richard Gong 2018-11-13 842 p_data->flag = ct->flags;
7ca5ce896524f5 Richard Gong 2018-11-13 843 }
7ca5ce896524f5 Richard Gong 2018-11-13 844 } else {
7ca5ce896524f5 Richard Gong 2018-11-13 845 list_for_each_entry(p_mem, &svc_data_mem, node)
7ca5ce896524f5 Richard Gong 2018-11-13 846 if (p_mem->vaddr == p_msg->payload) {
7ca5ce896524f5 Richard Gong 2018-11-13 847 p_data->paddr = p_mem->paddr;
7ca5ce896524f5 Richard Gong 2018-11-13 848 break;
7ca5ce896524f5 Richard Gong 2018-11-13 849 }
7ca5ce896524f5 Richard Gong 2018-11-13 850 }
7ca5ce896524f5 Richard Gong 2018-11-13 851
7ca5ce896524f5 Richard Gong 2018-11-13 852 p_data->command = p_msg->command;
7ca5ce896524f5 Richard Gong 2018-11-13 853 p_data->arg[0] = p_msg->arg[0];
7ca5ce896524f5 Richard Gong 2018-11-13 854 p_data->arg[1] = p_msg->arg[1];
7ca5ce896524f5 Richard Gong 2018-11-13 855 p_data->arg[2] = p_msg->arg[2];
7ca5ce896524f5 Richard Gong 2018-11-13 856 p_data->size = p_msg->payload_length;
7ca5ce896524f5 Richard Gong 2018-11-13 857 p_data->chan = chan;
7ca5ce896524f5 Richard Gong 2018-11-13 858 pr_debug("%s: put to FIFO pa=0x%016x, cmd=%x, size=%u\n", __func__,
7ca5ce896524f5 Richard Gong 2018-11-13 859 (unsigned int)p_data->paddr, p_data->command,
7ca5ce896524f5 Richard Gong 2018-11-13 860 (unsigned int)p_data->size);
7ca5ce896524f5 Richard Gong 2018-11-13 861 ret = kfifo_in_spinlocked(&chan->ctrl->svc_fifo, p_data,
7ca5ce896524f5 Richard Gong 2018-11-13 862 sizeof(*p_data),
7ca5ce896524f5 Richard Gong 2018-11-13 863 &chan->ctrl->svc_fifo_lock);
7ca5ce896524f5 Richard Gong 2018-11-13 864
7ca5ce896524f5 Richard Gong 2018-11-13 865 kfree(p_data);
7ca5ce896524f5 Richard Gong 2018-11-13 866
7ca5ce896524f5 Richard Gong 2018-11-13 867 if (!ret)
7ca5ce896524f5 Richard Gong 2018-11-13 868 return -ENOBUFS;
7ca5ce896524f5 Richard Gong 2018-11-13 869
7ca5ce896524f5 Richard Gong 2018-11-13 870 return 0;
7ca5ce896524f5 Richard Gong 2018-11-13 871 }
7ca5ce896524f5 Richard Gong 2018-11-13 872 EXPORT_SYMBOL_GPL(stratix10_svc_send);
7ca5ce896524f5 Richard Gong 2018-11-13 873

:::::: The code at line 823 was first introduced by commit
:::::: 7ca5ce896524f5292e610b27d168269e5ab74951 firmware: add Intel Stratix10 service layer driver

:::::: TO: Richard Gong <richard.gong@intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-19 20:53    [W:3.109 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site