diff mbox series

scsi: fdomain_isa: merge branches in fdomain_isa_match()

Message ID df68e341-5113-4cf2-b64c-dc1ad0b686ac@omprussia.ru
State New
Headers show
Series scsi: fdomain_isa: merge branches in fdomain_isa_match() | expand

Commit Message

Sergey Shtylyov Aug. 29, 2020, 8:19 p.m. UTC
The *else* branch of the *if* (base) statement in fdomain_isa_match() is
immediately followed by the *if* (!base) statement. Simplify the code by
removing the unneeded *if*...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

---
The patch is against the 'for-next' branch of Martin Petersen's 'scsi.git'
repo...

 drivers/scsi/fdomain_isa.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Sergey Shtylyov Nov. 6, 2020, 9:17 a.m. UTC | #1
On 09.09.2020 5:09, Martin K. Petersen wrote:

>> The *else* branch of the *if* (base) statement in fdomain_isa_match() is

>> immediately followed by the *if* (!base) statement. Simplify the code by

>> removing the unneeded *if*...

> 

> Applied to 5.10/scsi-queue, thanks!

> 

> [1/1] scsi: fdomain_isa: Merge branches in fdomain_isa_match()

>        https://git.kernel.org/mkp/scsi/c/255937d77390


    It was already merged to Linus' tree... but now I'm not seeing it there, 
the patch has just disappeared! How come?

MBR, Sergei
Sergey Shtylyov Nov. 6, 2020, 9:22 a.m. UTC | #2
On 06.11.2020 12:17, Sergey Shtylyov wrote:

>>> The *else* branch of the *if* (base) statement in fdomain_isa_match() is
>>> immediately followed by the *if* (!base) statement. Simplify the code by
>>> removing the unneeded *if*...
>>
>> Applied to 5.10/scsi-queue, thanks!
>>
>> [1/1] scsi: fdomain_isa: Merge branches in fdomain_isa_match()
>>        https://git.kernel.org/mkp/scsi/c/255937d77390
> 
>     It was already merged to Linus' tree... but now I'm not seeing it there, 
> the patch has just disappeared! How come?

    Has just reappeared again! :-/

MBR, Sergei
diff mbox series

Patch

Index: scsi/drivers/scsi/fdomain_isa.c
===================================================================
--- scsi.orig/drivers/scsi/fdomain_isa.c
+++ scsi/drivers/scsi/fdomain_isa.c
@@ -111,12 +111,11 @@  static int fdomain_isa_match(struct devi
 			base = readb(p + sig->base_offset) +
 			      (readb(p + sig->base_offset + 1) << 8);
 		iounmap(p);
-		if (base)
+		if (base) {
 			dev_info(dev, "BIOS at 0x%lx specifies I/O base 0x%x\n",
 				 bios_base, base);
-		else
+		} else { /* no I/O base in BIOS area */
 			dev_info(dev, "BIOS at 0x%lx\n", bios_base);
-		if (!base) {	/* no I/O base in BIOS area */
 			/* save BIOS signature for later use in port probing */
 			saved_sig = sig;
 			return 0;