Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KEYS: trusted: Pass argument by pointer in dump_options

Instead of passing pkey_info into dump_options by value, using a
pointer instead.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+5 -5
+5 -5
security/keys/trusted-keys/trusted_caam.c
··· 29 29 }; 30 30 31 31 #ifdef CAAM_DEBUG 32 - static inline void dump_options(struct caam_pkey_info pkey_info) 32 + static inline void dump_options(const struct caam_pkey_info *pkey_info) 33 33 { 34 - pr_info("key encryption algo %d\n", pkey_info.key_enc_algo); 34 + pr_info("key encryption algo %d\n", pkey_info->key_enc_algo); 35 35 } 36 36 #else 37 - static inline void dump_options(struct caam_pkey_info pkey_info) 37 + static inline void dump_options(const struct caam_pkey_info *pkey_info) 38 38 { 39 39 } 40 40 #endif ··· 108 108 ret = get_pkey_options(datablob, &info.pkey_info); 109 109 if (ret < 0) 110 110 return 0; 111 - dump_options(info.pkey_info); 111 + dump_options(&info.pkey_info); 112 112 } 113 113 114 114 ret = caam_encap_blob(blobifier, &info); ··· 140 140 ret = get_pkey_options(datablob, &info.pkey_info); 141 141 if (ret < 0) 142 142 return 0; 143 - dump_options(info.pkey_info); 143 + dump_options(&info.pkey_info); 144 144 145 145 p->key_len = p->blob_len + sizeof(struct caam_pkey_info); 146 146 memcpy(p->key, &info.pkey_info, sizeof(struct caam_pkey_info));