public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Dinh Nguyen <dinguyen@kernel.org>
Subject: drivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting
Date: Sat, 20 Nov 2021 03:52:10 +0800	[thread overview]
Message-ID: <202111200307.Fa7jd7by-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7121 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32803 bytes --]

             reply	other threads:[~2021-11-19 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 19:52 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-11 22:34 drivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting kernel test robot

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=202111200307.Fa7jd7by-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dinguyen@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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