Skip to content

Commit 6084466

Browse files
committed
crypto: nx - Fix sparse warnings
This driver generates a large number of sparse warnings due to two issues. First of all the structure nx842_devdata is defined inline causing the __rcu tag to be added to all users of it. This easily fixed by splitting up the struct definition. The second issue is with kdoc markers being incomplete. The trivial case of nx842_exec_vas has been fixed, while the other incomplete documentation has simply been downgraded to normal C comments. Signed-off-by: Herbert Xu <[email protected]>
1 parent 5072b1c commit 6084466

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

drivers/crypto/nx/nx-common-powernv.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static int (*nx842_powernv_exec)(const unsigned char *in,
7272
unsigned int inlen, unsigned char *out,
7373
unsigned int *outlenp, void *workmem, int fc);
7474

75-
/**
75+
/*
7676
* setup_indirect_dde - Setup an indirect DDE
7777
*
7878
* The DDE is setup with the DDE count, byte count, and address of
@@ -89,7 +89,7 @@ static void setup_indirect_dde(struct data_descriptor_entry *dde,
8989
dde->address = cpu_to_be64(nx842_get_pa(ddl));
9090
}
9191

92-
/**
92+
/*
9393
* setup_direct_dde - Setup single DDE from buffer
9494
*
9595
* The DDE is setup with the buffer and length. The buffer must be properly
@@ -111,7 +111,7 @@ static unsigned int setup_direct_dde(struct data_descriptor_entry *dde,
111111
return l;
112112
}
113113

114-
/**
114+
/*
115115
* setup_ddl - Setup DDL from buffer
116116
*
117117
* Returns:
@@ -181,9 +181,6 @@ static int setup_ddl(struct data_descriptor_entry *dde,
181181
CSB_ERR(csb, msg " at %lx", ##__VA_ARGS__, \
182182
(unsigned long)be64_to_cpu((csb)->address))
183183

184-
/**
185-
* wait_for_csb
186-
*/
187184
static int wait_for_csb(struct nx842_workmem *wmem,
188185
struct coprocessor_status_block *csb)
189186
{
@@ -632,8 +629,8 @@ static int nx842_exec_vas(const unsigned char *in, unsigned int inlen,
632629
* @inlen: input buffer size
633630
* @out: output buffer pointer
634631
* @outlenp: output buffer size pointer
635-
* @workmem: working memory buffer pointer, size determined by
636-
* nx842_powernv_driver.workmem_size
632+
* @wmem: working memory buffer pointer, size determined by
633+
* nx842_powernv_driver.workmem_size
637634
*
638635
* Returns: see @nx842_powernv_exec()
639636
*/

drivers/crypto/nx/nx-common-pseries.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@ struct ibm_nx842_counters {
123123
atomic64_t decomp_times[32];
124124
};
125125

126-
static struct nx842_devdata {
126+
struct nx842_devdata {
127127
struct vio_dev *vdev;
128128
struct device *dev;
129129
struct ibm_nx842_counters *counters;
130130
unsigned int max_sg_len;
131131
unsigned int max_sync_size;
132132
unsigned int max_sync_sg;
133-
} __rcu *devdata;
133+
};
134+
135+
static struct nx842_devdata __rcu *devdata;
134136
static DEFINE_SPINLOCK(devdata_mutex);
135137

136138
#define NX842_COUNTER_INC(_x) \

0 commit comments

Comments
 (0)