Skip to content

Commit

Permalink
crypto: bcm - Rename struct device_private to bcm_device_private
Browse files Browse the repository at this point in the history
[ Upstream commit f7f2b43 ]

Renaming 'struct device_private' to 'struct bcm_device_private',
because it clashes with 'struct device_private' from
'drivers/base/base.h'.

While it's not a functional problem, it's causing two distinct
type hierarchies in BTF data. It also breaks build with options:
  CONFIG_DEBUG_INFO_BTF=y
  CONFIG_CRYPTO_DEV_BCM_SPU=y

as reported by Qais Yousef [1].

[1] https://lore.kernel.org/lkml/20201229151352.6hzmjvu3qh6p2qgg@e107158-lin/

Fixes: 9d12ba8 ("crypto: brcm - Add Broadcom SPU driver")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
olsajiri authored and gregkh committed Mar 4, 2021
1 parent 3d5afca commit 48f2fcd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/crypto/bcm/cipher.c
Expand Up @@ -41,7 +41,7 @@

/* ================= Device Structure ================== */

struct device_private iproc_priv;
struct bcm_device_private iproc_priv;

/* ==================== Parameters ===================== */

Expand Down
4 changes: 2 additions & 2 deletions drivers/crypto/bcm/cipher.h
Expand Up @@ -418,7 +418,7 @@ struct spu_hw {
u32 num_chan;
};

struct device_private {
struct bcm_device_private {
struct platform_device *pdev;

struct spu_hw spu;
Expand Down Expand Up @@ -465,6 +465,6 @@ struct device_private {
struct mbox_chan **mbox;
};

extern struct device_private iproc_priv;
extern struct bcm_device_private iproc_priv;

#endif
2 changes: 1 addition & 1 deletion drivers/crypto/bcm/util.c
Expand Up @@ -348,7 +348,7 @@ char *spu_alg_name(enum spu_cipher_alg alg, enum spu_cipher_mode mode)
static ssize_t spu_debugfs_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *offp)
{
struct device_private *ipriv;
struct bcm_device_private *ipriv;
char *buf;
ssize_t ret, out_offset, out_count;
int i;
Expand Down

0 comments on commit 48f2fcd

Please sign in to comment.