crypto: qat - uint8_t is not large enough for accel_id
authorTadeusz Struk <tadeusz.struk@intel.com>
Thu, 10 Dec 2015 22:23:03 +0000 (14:23 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 14 Dec 2015 13:03:38 +0000 (21:03 +0800)
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>
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_cfg_common.h

index 4d78ec0ae87955ec1a7412cb1207fff813070869..f96d427e502c05ea7316f66830adfeebb49fb17d 100644 (file)
@@ -251,6 +251,6 @@ struct adf_accel_dev {
                } vf;
        };
        bool is_vf;
-       uint8_t accel_id;
+       u32 accel_id;
 } __packed;
 #endif
index 673dbf73b147fa977f7a9763e0c056bfd3a794b9..8c4f6573ce597b1c42edc4a2e6d1246fd74f37de 100644 (file)
@@ -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;