Skip to content

Commit

Permalink
crypto: qat - uint8_t is not large enough for accel_id
Browse files Browse the repository at this point in the history
accel_id has to be large enough to hold ADF_MAX_DEVICES + 1
(which is > 1025) so uint8_t is too small.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Tadeusz Struk authored and Herbert Xu committed Dec 14, 2015
1 parent 50eca25 commit 81b312f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/crypto/qat/qat_common/adf_accel_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,6 @@ struct adf_accel_dev {
} vf;
};
bool is_vf;
uint8_t accel_id;
u32 accel_id;
} __packed;
#endif
4 changes: 2 additions & 2 deletions drivers/crypto/qat/qat_common/adf_cfg_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ enum adf_device_type {

struct adf_dev_status_info {
enum adf_device_type type;
uint8_t accel_id;
uint8_t instance_id;
u32 accel_id;
u32 instance_id;
uint8_t num_ae;
uint8_t num_accel;
uint8_t num_logical_accel;
Expand Down

0 comments on commit 81b312f

Please sign in to comment.