linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ipmi:for-next 1/2] drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')'
@ 2021-08-12 19:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-12 19:08 UTC (permalink / raw)
  To: Wen Yang; +Cc: clang-built-linux, kbuild-all, linux-kernel, Corey Minyard

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

tree:   https://github.com/cminyard/linux-ipmi for-next
head:   f68d16759343cdbe44de07b9569b0b992291d13c
commit: 8365203515c64c9f7c11d14cdcccdac58c793598 [1/2] ipmi: rate limit ipmi smi_event failure message
config: hexagon-randconfig-r031-20210811 (attached as .config)
compiler: clang version 12.0.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/cminyard/linux-ipmi/commit/8365203515c64c9f7c11d14cdcccdac58c793598
        git remote add ipmi https://github.com/cminyard/linux-ipmi
        git fetch --no-tags ipmi for-next
        git checkout 8365203515c64c9f7c11d14cdcccdac58c793598
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=hexagon SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')'
                                   msg[2]);
                                   ^
   drivers/char/ipmi/ipmi_si_intf.c:686:4: note: to match this '('
                           dev_warn_ratelimited(smi_info->io.dev,
                           ^
   include/linux/dev_printk.h:188:24: note: expanded from macro 'dev_warn_ratelimited'
           dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
                                 ^
   1 error generated.


vim +689 drivers/char/ipmi/ipmi_si_intf.c

   536	
   537	static void handle_transaction_done(struct smi_info *smi_info)
   538	{
   539		struct ipmi_smi_msg *msg;
   540	
   541		debug_timestamp("Done");
   542		switch (smi_info->si_state) {
   543		case SI_NORMAL:
   544			if (!smi_info->curr_msg)
   545				break;
   546	
   547			smi_info->curr_msg->rsp_size
   548				= smi_info->handlers->get_result(
   549					smi_info->si_sm,
   550					smi_info->curr_msg->rsp,
   551					IPMI_MAX_MSG_LENGTH);
   552	
   553			/*
   554			 * Do this here becase deliver_recv_msg() releases the
   555			 * lock, and a new message can be put in during the
   556			 * time the lock is released.
   557			 */
   558			msg = smi_info->curr_msg;
   559			smi_info->curr_msg = NULL;
   560			deliver_recv_msg(smi_info, msg);
   561			break;
   562	
   563		case SI_GETTING_FLAGS:
   564		{
   565			unsigned char msg[4];
   566			unsigned int  len;
   567	
   568			/* We got the flags from the SMI, now handle them. */
   569			len = smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
   570			if (msg[2] != 0) {
   571				/* Error fetching flags, just give up for now. */
   572				smi_info->si_state = SI_NORMAL;
   573			} else if (len < 4) {
   574				/*
   575				 * Hmm, no flags.  That's technically illegal, but
   576				 * don't use uninitialized data.
   577				 */
   578				smi_info->si_state = SI_NORMAL;
   579			} else {
   580				smi_info->msg_flags = msg[3];
   581				handle_flags(smi_info);
   582			}
   583			break;
   584		}
   585	
   586		case SI_CLEARING_FLAGS:
   587		{
   588			unsigned char msg[3];
   589	
   590			/* We cleared the flags. */
   591			smi_info->handlers->get_result(smi_info->si_sm, msg, 3);
   592			if (msg[2] != 0) {
   593				/* Error clearing flags */
   594				dev_warn_ratelimited(smi_info->io.dev,
   595					 "Error clearing flags: %2.2x\n", msg[2]);
   596			}
   597			smi_info->si_state = SI_NORMAL;
   598			break;
   599		}
   600	
   601		case SI_GETTING_EVENTS:
   602		{
   603			smi_info->curr_msg->rsp_size
   604				= smi_info->handlers->get_result(
   605					smi_info->si_sm,
   606					smi_info->curr_msg->rsp,
   607					IPMI_MAX_MSG_LENGTH);
   608	
   609			/*
   610			 * Do this here becase deliver_recv_msg() releases the
   611			 * lock, and a new message can be put in during the
   612			 * time the lock is released.
   613			 */
   614			msg = smi_info->curr_msg;
   615			smi_info->curr_msg = NULL;
   616			if (msg->rsp[2] != 0) {
   617				/* Error getting event, probably done. */
   618				msg->done(msg);
   619	
   620				/* Take off the event flag. */
   621				smi_info->msg_flags &= ~EVENT_MSG_BUFFER_FULL;
   622				handle_flags(smi_info);
   623			} else {
   624				smi_inc_stat(smi_info, events);
   625	
   626				/*
   627				 * Do this before we deliver the message
   628				 * because delivering the message releases the
   629				 * lock and something else can mess with the
   630				 * state.
   631				 */
   632				handle_flags(smi_info);
   633	
   634				deliver_recv_msg(smi_info, msg);
   635			}
   636			break;
   637		}
   638	
   639		case SI_GETTING_MESSAGES:
   640		{
   641			smi_info->curr_msg->rsp_size
   642				= smi_info->handlers->get_result(
   643					smi_info->si_sm,
   644					smi_info->curr_msg->rsp,
   645					IPMI_MAX_MSG_LENGTH);
   646	
   647			/*
   648			 * Do this here becase deliver_recv_msg() releases the
   649			 * lock, and a new message can be put in during the
   650			 * time the lock is released.
   651			 */
   652			msg = smi_info->curr_msg;
   653			smi_info->curr_msg = NULL;
   654			if (msg->rsp[2] != 0) {
   655				/* Error getting event, probably done. */
   656				msg->done(msg);
   657	
   658				/* Take off the msg flag. */
   659				smi_info->msg_flags &= ~RECEIVE_MSG_AVAIL;
   660				handle_flags(smi_info);
   661			} else {
   662				smi_inc_stat(smi_info, incoming_messages);
   663	
   664				/*
   665				 * Do this before we deliver the message
   666				 * because delivering the message releases the
   667				 * lock and something else can mess with the
   668				 * state.
   669				 */
   670				handle_flags(smi_info);
   671	
   672				deliver_recv_msg(smi_info, msg);
   673			}
   674			break;
   675		}
   676	
   677		case SI_CHECKING_ENABLES:
   678		{
   679			unsigned char msg[4];
   680			u8 enables;
   681			bool irq_on;
   682	
   683			/* We got the flags from the SMI, now handle them. */
   684			smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
   685			if (msg[2] != 0) {
   686				dev_warn_ratelimited(smi_info->io.dev,
   687					"Couldn't get irq info: %x,\n"
   688					"Maybe ok, but ipmi might run very slowly.\n"
 > 689					msg[2]);
   690				smi_info->si_state = SI_NORMAL;
   691				break;
   692			}
   693			enables = current_global_enables(smi_info, 0, &irq_on);
   694			if (smi_info->io.si_type == SI_BT)
   695				/* BT has its own interrupt enable bit. */
   696				check_bt_irq(smi_info, irq_on);
   697			if (enables != (msg[3] & GLOBAL_ENABLES_MASK)) {
   698				/* Enables are not correct, fix them. */
   699				msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
   700				msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
   701				msg[2] = enables | (msg[3] & ~GLOBAL_ENABLES_MASK);
   702				smi_info->handlers->start_transaction(
   703					smi_info->si_sm, msg, 3);
   704				smi_info->si_state = SI_SETTING_ENABLES;
   705			} else if (smi_info->supports_event_msg_buff) {
   706				smi_info->curr_msg = ipmi_alloc_smi_msg();
   707				if (!smi_info->curr_msg) {
   708					smi_info->si_state = SI_NORMAL;
   709					break;
   710				}
   711				start_getting_events(smi_info);
   712			} else {
   713				smi_info->si_state = SI_NORMAL;
   714			}
   715			break;
   716		}
   717	
   718		case SI_SETTING_ENABLES:
   719		{
   720			unsigned char msg[4];
   721	
   722			smi_info->handlers->get_result(smi_info->si_sm, msg, 4);
   723			if (msg[2] != 0)
   724				dev_warn_ratelimited(smi_info->io.dev,
   725					 "Could not set the global enables: 0x%x.\n",
   726					 msg[2]);
   727	
   728			if (smi_info->supports_event_msg_buff) {
   729				smi_info->curr_msg = ipmi_alloc_smi_msg();
   730				if (!smi_info->curr_msg) {
   731					smi_info->si_state = SI_NORMAL;
   732					break;
   733				}
   734				start_getting_events(smi_info);
   735			} else {
   736				smi_info->si_state = SI_NORMAL;
   737			}
   738			break;
   739		}
   740		}
   741	}
   742	

---
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: 17850 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-12 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 19:08 [ipmi:for-next 1/2] drivers/char/ipmi/ipmi_si_intf.c:689:5: error: expected ')' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).