All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	"David S. Miller" <davem@davemloft.net>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 1/4] alim15x3: move irq-restore before pci_dev_put()
Date: Fri,  4 May 2018 16:24:43 +0200	[thread overview]
Message-ID: <20180504142446.30525-2-bigeasy@linutronix.de> (raw)
In-Reply-To: <20180504142446.30525-1-bigeasy@linutronix.de>

init_chipset_ali15x3() initializes the chipset during init with disabled
interrupts. There is no need to keep the interrupts disabled during
pci_dev_put().
Move the irq-restore before pci_dev_put() is invoked.

Side note: The same init is performed in
drivers/ata/pata_ali.c::ali_init_chipset() without disabled interrupts.
It looks that the same hardware is supported in the ATA land. Would it
make sense to remove this driver since it is supported in the other
subsystem?

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/ide/alim15x3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index 36f76e28a0bf..3265970aee34 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -323,9 +323,9 @@ static int init_chipset_ali15x3(struct pci_dev *dev)
 
 		pci_write_config_byte(dev, 0x53, tmpbyte);
 	}
+	local_irq_restore(flags);
 	pci_dev_put(north);
 	pci_dev_put(isa_dev);
-	local_irq_restore(flags);
 	return 0;
 }
 
-- 
2.17.0

  reply	other threads:[~2018-05-04 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 14:24 [PATCH 0/4] avoid disabling interrupts where it is not required Sebastian Andrzej Siewior
2018-05-04 14:24 ` Sebastian Andrzej Siewior [this message]
2018-05-04 17:37   ` [PATCH 1/4] alim15x3: move irq-restore before pci_dev_put() David Miller
2018-05-04 14:24 ` [PATCH 2/4] ide: Handle irq disabling consistently Sebastian Andrzej Siewior
2018-05-04 17:38   ` David Miller
2018-05-04 14:24 ` [PATCH 3/4] ide: don't disable interrupts during kmap_atomic() Sebastian Andrzej Siewior
2018-05-04 17:38   ` David Miller
2018-05-04 14:24 ` [PATCH 4/4] ide: don't enable/disable interrupts in force threaded-IRQ mode Sebastian Andrzej Siewior
2018-05-04 17:39   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180504142446.30525-2-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.