Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: fcoe: Suppress a compiler warning

Suppress the following compiler warning:

warning: cast to smaller integer type
'enum fip_mode' from 'void *' [-Wvoid-pointer-to-enum-cast]
enum fip_mode fip_mode = (enum fip_mode)kp->arg;
^~~~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20210415220826.29438-9-bvanassche@acm.org
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
be5aeee3 90d66978

+1 -1
+1 -1
drivers/scsi/fcoe/fcoe_transport.c
··· 863 863 int rc = -ENODEV; 864 864 struct net_device *netdev = NULL; 865 865 struct fcoe_transport *ft = NULL; 866 - enum fip_mode fip_mode = (enum fip_mode)kp->arg; 866 + enum fip_mode fip_mode = (enum fip_mode)(uintptr_t)kp->arg; 867 867 868 868 mutex_lock(&ft_mutex); 869 869