All of lore.kernel.org
 help / color / mirror / Atom feed
* [ebiggers:inline-encryption-wip 1/17] include/linux/keyslot-manager.h:87:32: error: parameter 2 ('crypto_mode') has incomplete type
@ 2019-10-22  4:38 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-22  4:38 UTC (permalink / raw)
  To: kbuild-all

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

Hi Satya,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git inline-encryption-wip
head:   c28718ce2d1946a03c111e1d558ecb6ecbc5de7a
commit: 4f87b463abc596e36f15feeb252d22df571cadb5 [1/17] block: Keyslot Manager for Inline Encryption
config: x86_64-randconfig-f004-201942 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 4f87b463abc596e36f15feeb252d22df571cadb5
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   In file included from <command-line>:0:0:
   include/linux/keyslot-manager.h:32:16: warning: 'enum blk_crypto_mode_num' declared inside parameter list will not be visible outside of this definition or declaration
              enum blk_crypto_mode_num crypto_mode,
                   ^~~~~~~~~~~~~~~~~~~
   include/linux/keyslot-manager.h:36:14: warning: 'enum blk_crypto_mode_num' declared inside parameter list will not be visible outside of this definition or declaration
            enum blk_crypto_mode_num crypto_mode,
                 ^~~~~~~~~~~~~~~~~~~
   include/linux/keyslot-manager.h:40:16: warning: 'enum blk_crypto_mode_num' declared inside parameter list will not be visible outside of this definition or declaration
              enum blk_crypto_mode_num crypto_mode,
                   ^~~~~~~~~~~~~~~~~~~
   include/linux/keyslot-manager.h:43:13: warning: 'enum blk_crypto_mode_num' declared inside parameter list will not be visible outside of this definition or declaration
           enum blk_crypto_mode_num crypto_mode,
                ^~~~~~~~~~~~~~~~~~~
   include/linux/keyslot-manager.h:87:12: warning: 'enum blk_crypto_mode_num' declared inside parameter list will not be visible outside of this definition or declaration
          enum blk_crypto_mode_num crypto_mode,
               ^~~~~~~~~~~~~~~~~~~
>> include/linux/keyslot-manager.h:87:32: error: parameter 2 ('crypto_mode') has incomplete type
          enum blk_crypto_mode_num crypto_mode,
                                   ^~~~~~~~~~~
>> include/linux/keyslot-manager.h:86:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
    keyslot_manager_rq_crypto_mode_supported(struct request_queue *q,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +87 include/linux/keyslot-manager.h

    10	
    11	/**
    12	 * struct keyslot_mgmt_ll_ops - functions to manage keyslots in hardware
    13	 * @keyslot_program:	Program the specified key and algorithm into the
    14	 *			specified slot in the inline encryption hardware.
    15	 * @keyslot_evict:	Evict key from the specified keyslot in the hardware.
    16	 *			The key, crypto_mode and data_unit_size are also passed
    17	 *			down so that e.g. dm layers can evict keys from
    18	 *			the devices that they map over.
    19	 *			Returns 0 on success, -errno otherwise.
    20	 * @crypto_mode_supported:	Check whether a crypto_mode and data_unit_size
    21	 *				combo is supported.
    22	 * @keyslot_find:	Returns the slot number that matches the key,
    23	 *			or -ENOKEY if no match found, or -errno on
    24	 *			error.
    25	 *
    26	 * This structure should be provided by storage device drivers when they set up
    27	 * a keyslot manager - this structure holds the function ptrs that the keyslot
    28	 * manager will use to manipulate keyslots in the hardware.
    29	 */
    30	struct keyslot_mgmt_ll_ops {
    31		int (*keyslot_program)(void *ll_priv_data, const u8 *key,
    32				       enum blk_crypto_mode_num crypto_mode,
    33				       unsigned int data_unit_size,
    34				       unsigned int slot);
    35		int (*keyslot_evict)(void *ll_priv_data, const u8 *key,
    36				     enum blk_crypto_mode_num crypto_mode,
    37				     unsigned int data_unit_size,
    38				     unsigned int slot);
    39		bool (*crypto_mode_supported)(void *ll_priv_data,
  > 40					      enum blk_crypto_mode_num crypto_mode,
    41					      unsigned int data_unit_size);
    42		int (*keyslot_find)(void *ll_priv_data, const u8 *key,
  > 43				    enum blk_crypto_mode_num crypto_mode,
    44				    unsigned int data_unit_size);
    45	};
    46	
    47	#ifdef CONFIG_BLK_INLINE_ENCRYPTION
    48	struct keyslot_manager;
    49	
    50	extern struct keyslot_manager *keyslot_manager_create(unsigned int num_slots,
    51					const struct keyslot_mgmt_ll_ops *ksm_ops,
    52					void *ll_priv_data);
    53	
    54	extern int
    55	keyslot_manager_get_slot_for_key(struct keyslot_manager *ksm,
    56					 const u8 *key,
    57					 enum blk_crypto_mode_num crypto_mode,
    58					 unsigned int data_unit_size);
    59	
    60	extern void keyslot_manager_get_slot(struct keyslot_manager *ksm,
    61					     unsigned int slot);
    62	
    63	extern void keyslot_manager_put_slot(struct keyslot_manager *ksm,
    64					     unsigned int slot);
    65	
    66	extern bool
    67	keyslot_manager_crypto_mode_supported(struct keyslot_manager *ksm,
    68					      enum blk_crypto_mode_num crypto_mode,
    69					      unsigned int data_unit_size);
    70	
    71	extern bool
    72	keyslot_manager_rq_crypto_mode_supported(struct request_queue *q,
    73						 enum blk_crypto_mode_num crypto_mode,
    74						 unsigned int data_unit_size);
    75	
    76	extern int keyslot_manager_evict_key(struct keyslot_manager *ksm,
    77					     const u8 *key,
    78					     enum blk_crypto_mode_num crypto_mode,
    79					     unsigned int data_unit_size);
    80	
    81	extern void keyslot_manager_destroy(struct keyslot_manager *ksm);
    82	
    83	#else /* CONFIG_BLK_INLINE_ENCRYPTION */
    84	
    85	static inline bool
  > 86	keyslot_manager_rq_crypto_mode_supported(struct request_queue *q,
  > 87						 enum blk_crypto_mode_num crypto_mode,
    88						 unsigned int data_unit_size)
    89	{
    90		return false;
    91	}
    92	#endif /* CONFIG_BLK_INLINE_ENCRYPTION */
    93	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

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

only message in thread, other threads:[~2019-10-22  4:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22  4:38 [ebiggers:inline-encryption-wip 1/17] include/linux/keyslot-manager.h:87:32: error: parameter 2 ('crypto_mode') has incomplete type kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.