Commit 6084466e authored by Herbert Xu's avatar Herbert Xu

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5072b1c2
......@@ -72,7 +72,7 @@ static int (*nx842_powernv_exec)(const unsigned char *in,
unsigned int inlen, unsigned char *out,
unsigned int *outlenp, void *workmem, int fc);
/**
/*
* setup_indirect_dde - Setup an indirect DDE
*
* 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,
dde->address = cpu_to_be64(nx842_get_pa(ddl));
}
/**
/*
* setup_direct_dde - Setup single DDE from buffer
*
* 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,
return l;
}
/**
/*
* setup_ddl - Setup DDL from buffer
*
* Returns:
......@@ -181,9 +181,6 @@ static int setup_ddl(struct data_descriptor_entry *dde,
CSB_ERR(csb, msg " at %lx", ##__VA_ARGS__, \
(unsigned long)be64_to_cpu((csb)->address))
/**
* wait_for_csb
*/
static int wait_for_csb(struct nx842_workmem *wmem,
struct coprocessor_status_block *csb)
{
......@@ -632,8 +629,8 @@ static int nx842_exec_vas(const unsigned char *in, unsigned int inlen,
* @inlen: input buffer size
* @out: output buffer pointer
* @outlenp: output buffer size pointer
* @workmem: working memory buffer pointer, size determined by
* nx842_powernv_driver.workmem_size
* @wmem: working memory buffer pointer, size determined by
* nx842_powernv_driver.workmem_size
*
* Returns: see @nx842_powernv_exec()
*/
......
......@@ -123,14 +123,16 @@ struct ibm_nx842_counters {
atomic64_t decomp_times[32];
};
static struct nx842_devdata {
struct nx842_devdata {
struct vio_dev *vdev;
struct device *dev;
struct ibm_nx842_counters *counters;
unsigned int max_sg_len;
unsigned int max_sync_size;
unsigned int max_sync_sg;
} __rcu *devdata;
};
static struct nx842_devdata __rcu *devdata;
static DEFINE_SPINLOCK(devdata_mutex);
#define NX842_COUNTER_INC(_x) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment