]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fddi: defza: add missing pointer type cast
authorJakub Kicinski <kuba@kernel.org>
Mon, 25 Oct 2021 16:00:00 +0000 (09:00 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 Oct 2021 17:28:47 +0000 (10:28 -0700)
hw_addr is a uint AKA unsigned int. dev_addr_set() takes
a u8 *.

  drivers/net/fddi/defza.c:1383:27: error: passing argument 2 of 'dev_addr_set' from incompatible pointer type [-Werror=incompatible-pointer-types]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 1e9258c389ee ("fddi: defxx,defza: use dev_addr_set()")
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/20211025160000.2803818-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/fddi/defza.c

index 3a6b08eb5e1b66f53bed9eb468b0a54bd307a316..f5c25acaa57713e0d1ff7fd8feba93db344d7ad6 100644 (file)
@@ -1380,7 +1380,7 @@ static int fza_probe(struct device *bdev)
                goto err_out_irq;
 
        fza_reads(&init->hw_addr, &hw_addr, sizeof(hw_addr));
-       dev_addr_set(dev, &hw_addr);
+       dev_addr_set(dev, (u8 *)&hw_addr);
 
        fza_reads(&init->rom_rev, &rom_rev, sizeof(rom_rev));
        fza_reads(&init->fw_rev, &fw_rev, sizeof(fw_rev));