oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [davejiang:cxl-ide 22/24] drivers/acpi/x86/keyp.c:369:5: warning: no previous prototype for 'keyp_tx_keys_validate'
@ 2023-08-11 18:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-11 18:08 UTC (permalink / raw)
  To: Dave Jiang; +Cc: oe-kbuild-all

tree:   https://github.com/davejiang/linux.git cxl-ide
head:   ee3a63e65f46140bcb484e3d0052d641abceb9da
commit: 0dbc667932bc8e9cc08c0dffe562e6ff19630e24 [22/24] acpi: keyp: Add support for IDE stream creation
config: x86_64-randconfig-r033-20230812 (https://download.01.org/0day-ci/archive/20230812/202308120117.5X4ORWP4-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230812/202308120117.5X4ORWP4-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/202308120117.5X4ORWP4-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/acpi/x86/keyp.c:369:5: warning: no previous prototype for 'keyp_tx_keys_validate' [-Wmissing-prototypes]
     369 | int keyp_tx_keys_validate(struct stream *stm)
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/x86/keyp.c:394:5: warning: no previous prototype for 'keyp_rx_keys_validate' [-Wmissing-prototypes]
     394 | int keyp_rx_keys_validate(struct stream *stm)
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/x86/keyp.c:425:6: warning: no previous prototype for 'keyp_keys_validate_and_free' [-Wmissing-prototypes]
     425 | void keyp_keys_validate_and_free(struct work_struct *work)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/acpi/x86/keyp.c: In function 'keyp_stream_setup':
   drivers/acpi/x86/keyp.c:541:31: error: 'struct pci_dev' has no member named 'ide'
     541 |         stm->stream_id = pdev2->ide.stream_id;
         |                               ^~
   drivers/acpi/x86/keyp.c: In function 'keyp_setup_pcie_ide_stream':
   drivers/acpi/x86/keyp.c:641:13: error: 'struct pci_dev' has no member named 'ide'
     641 |         pdev->ide.stream_min = kcu->stream_id_claimed;
         |             ^~
   drivers/acpi/x86/keyp.c:642:13: error: 'struct pci_dev' has no member named 'ide'
     642 |         pdev->ide.stream_max = kcu->stream_id_claimed + max_rp_streams - 1;
         |             ^~
   drivers/acpi/x86/keyp.c: At top level:
>> drivers/acpi/x86/keyp.c:619:33: warning: 'keyp_ide_ops' defined but not used [-Wunused-const-variable=]
     619 | static const struct pci_ide_ops keyp_ide_ops = {
         |                                 ^~~~~~~~~~~~


vim +/keyp_tx_keys_validate +369 drivers/acpi/x86/keyp.c

   368	
 > 369	int keyp_tx_keys_validate(struct stream *stm)
   370	{
   371		struct keyp_config_unit *kcu = stm->kcu;
   372		int stm_base;
   373		u32 val, sts;
   374	
   375		stm_base = KEYP_STM_CAP_SIZE + KEYP_STM_CONFIG_SIZE * stm->pos_id;
   376		val = readl(kcu->addr + stm_base + KEYP_STM_TX_STS_OFS);
   377		sts = FIELD_GET(KEYP_STM_TX_STS_SET, val);
   378	
   379		if (sts == KEYP_STM_TX_STS_KEY_NONE ||
   380		    sts == KEYP_STM_TX_STS_KEY_TRANSITION)
   381			return -EAGAIN;
   382	
   383		if (stm->keyset == KEY_SET_0 &&
   384		    sts != KEYP_STM_TX_STS_KEY_SET_0)
   385			return -EINVAL;
   386	
   387		if (stm->keyset == KEY_SET_1 &&
   388		    sts != KEYP_STM_TX_STS_KEY_SET_1)
   389			return -EINVAL;
   390	
   391		return 0;
   392	}
   393	
 > 394	int keyp_rx_keys_validate(struct stream *stm)
   395	{
   396		struct keyp_config_unit *kcu = stm->kcu;
   397		u32 val, pr_sts, npr_sts, cpl_sts;
   398		int stm_base;
   399	
   400		stm_base = KEYP_STM_CAP_SIZE + KEYP_STM_CONFIG_SIZE * stm->pos_id;
   401		val = readl(kcu->addr + stm_base + KEYP_STM_TX_STS_OFS);
   402		pr_sts = FIELD_GET(KEYP_STM_RX_STS_LAST_RCVD_SET_PR, val);
   403		npr_sts = FIELD_GET(KEYP_STM_RX_STS_LAST_RCVD_SET_NPR, val);
   404		cpl_sts = FIELD_GET(KEYP_STM_RX_STS_LAST_RCVD_SET_CPL, val);
   405		if (pr_sts == KEYP_STM_RX_STS_LAST_RCVD_NONE ||
   406		    npr_sts == KEYP_STM_RX_STS_LAST_RCVD_NONE ||
   407		    cpl_sts == KEYP_STM_RX_STS_LAST_RCVD_NONE)
   408			return -EAGAIN;
   409	
   410		if (stm->keyset == KEY_SET_0 &&
   411		    pr_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_0 &&
   412		    npr_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_0 &&
   413		    cpl_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_0)
   414			return 0;
   415	
   416		if (stm->keyset == KEY_SET_1 &&
   417		    pr_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_1 &&
   418		    npr_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_1 &&
   419		    cpl_sts == KEYP_STM_RX_STS_LAST_RCVD_SET_1)
   420			return 0;
   421	
   422		return -EINVAL;
   423	}
   424	
 > 425	void keyp_keys_validate_and_free(struct work_struct *work)
   426	{
   427		struct stream *stm = container_of(work, struct stream, dwork.work);
   428		int rc;
   429	
   430		guard(mutex)(&stm->lock);
   431		if (stm->key_slot_state == KEY_SLOT_STATE_CLEAR)
   432			return;
   433	
   434		stm->key_slot_state = KEY_SLOT_STATE_RELEASING;
   435		rc = keyp_tx_keys_validate(stm);
   436		if (rc) {
   437			queue_delayed_work(keyp_wq, &stm->dwork, msecs_to_jiffies(100));
   438			return;
   439		}
   440	
   441		rc = keyp_rx_keys_validate(stm);
   442		if (rc) {
   443			queue_delayed_work(keyp_wq, &stm->dwork, msecs_to_jiffies(100));
   444			return;
   445		}
   446	
   447		keyp_clear_keys(stm);
   448		keyp_keys_free(stm);
   449		stm->key_slot_state = KEY_SLOT_STATE_CLEAR;
   450	}
   451	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2023-08-11 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 18:08 [davejiang:cxl-ide 22/24] drivers/acpi/x86/keyp.c:369:5: warning: no previous prototype for 'keyp_tx_keys_validate' 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).