Skip to content
Commit 6f359f99 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

qedf: fix wrong le16 conversion



gcc points out that we are converting a 16-bit integer into a 32-bit
little-endian type and assigning that to 16-bit little-endian
will end up with a zero:

drivers/scsi/qedf/drv_fcoe_fw_funcs.c: In function 'init_initiator_rw_fcoe_task':
include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
  t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID);

The correct solution appears to be to just use a 16-bit byte swap instead.

Fixes: be086e7c ("qed*: Utilize Firmware 8.15.3.0")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarChad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 028ba8aa
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