re: crypto: qat - add support for new devices to FW loader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Pingchao Yang,

The patch b0272276d903: "crypto: qat - add support for new devices to
FW loader" from Dec 4, 2015, leads to the following static checker
warning:

	drivers/crypto/qat/qat_common/qat_hal.c:421 qat_hal_check_ae_active()
	warn: bitwise AND condition is false here

drivers/crypto/qat/qat_common/qat_hal.c
   414  int qat_hal_check_ae_active(struct icp_qat_fw_loader_handle *handle,
   415                              unsigned int ae)
   416  {
   417          unsigned int enable = 0, active = 0;
   418  
   419          qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES, &enable);
   420          qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS, &active);
   421          if ((enable & (0xff >> CE_ENABLE_BITPOS)) ||
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Never true.
CE_ENABLE_BITPOS is 8.
Perhaps the intention was to left shift like we do with ACS_ABO_BITPOS
on the next line?

   422              (active & (1 << ACS_ABO_BITPOS)))
   423                  return 1;
   424          else
   425                  return 0;
   426  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux