From df997abeebadaa4824271009e2d2b526a70a11cb Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 11 Feb 2019 12:43:23 -0600 Subject: iscsi_ibft: Fix missing break in switch statement Add missing break statement in order to prevent the code from falling through to case ISCSI_BOOT_TGT_NAME, which is unnecessary. This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. Fixes: b33a84a38477 ("ibft: convert iscsi_ibft module to iscsi boot lib") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Konrad Rzeszutek Wilk --- drivers/firmware/iscsi_ibft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 6bc8e6640d71..c51462f5aa1e 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -542,6 +542,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type) case ISCSI_BOOT_TGT_NIC_ASSOC: case ISCSI_BOOT_TGT_CHAP_TYPE: rc = S_IRUGO; + break; case ISCSI_BOOT_TGT_NAME: if (tgt->tgt_name_len) rc = S_IRUGO; -- cgit v1.2.3-59-g8ed1b From 8bd04c57fda62e3599f654aa43b521b326a95805 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 11 Feb 2019 14:46:42 +0100 Subject: iscsi_ibft: use virt_to_phys instead of isa_virt_to_bus As far as I can tell IBFT is a firmware table and has nothing to do with the good old ISA bus. And even if it the two would be the same on x86 anyway. So remove the isa_virt_to_bus call in preparation of eventually removing that API entirely. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk --- drivers/firmware/iscsi_ibft_find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c index 72d9ea18270b..85c656d04bb0 100644 --- a/drivers/firmware/iscsi_ibft_find.c +++ b/drivers/firmware/iscsi_ibft_find.c @@ -104,7 +104,7 @@ unsigned long __init find_ibft_region(unsigned long *sizep) if (ibft_addr) { *sizep = PAGE_ALIGN(ibft_addr->header.length); - return (u64)isa_virt_to_bus(ibft_addr); + return (u64)virt_to_phys(ibft_addr); } *sizep = 0; -- cgit v1.2.3-59-g8ed1b