* [RFC 5/5] PCI: tegra: use seq_open_data [not found] <20180301233724.20440-1-linux@rasmusvillemoes.dk> @ 2018-03-01 23:37 ` Rasmus Villemoes 2018-03-02 10:42 ` Thierry Reding 0 siblings, 1 reply; 3+ messages in thread From: Rasmus Villemoes @ 2018-03-01 23:37 UTC (permalink / raw) To: Thierry Reding, Lorenzo Pieralisi, Bjorn Helgaas, Jonathan Hunter Cc: Rasmus Villemoes, linux-tegra, linux-pci, linux-kernel Simplify the code slightly by having seq_open_data do the ->private assignment. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> --- drivers/pci/host/pci-tegra.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index dd9b3bcc41c3..7921428786aa 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -2188,17 +2188,8 @@ static const struct seq_operations tegra_pcie_ports_seq_ops = { static int tegra_pcie_ports_open(struct inode *inode, struct file *file) { struct tegra_pcie *pcie = inode->i_private; - struct seq_file *s; - int err; - - err = seq_open(file, &tegra_pcie_ports_seq_ops); - if (err) - return err; - - s = file->private_data; - s->private = pcie; - return 0; + return seq_open_data(file, &tegra_pcie_ports_seq_ops, pcie); } static const struct file_operations tegra_pcie_ports_ops = { -- 2.15.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC 5/5] PCI: tegra: use seq_open_data 2018-03-01 23:37 ` [RFC 5/5] PCI: tegra: use seq_open_data Rasmus Villemoes @ 2018-03-02 10:42 ` Thierry Reding 2018-03-07 12:41 ` Lorenzo Pieralisi 0 siblings, 1 reply; 3+ messages in thread From: Thierry Reding @ 2018-03-02 10:42 UTC (permalink / raw) To: Rasmus Villemoes Cc: Lorenzo Pieralisi, Bjorn Helgaas, Jonathan Hunter, linux-tegra, linux-pci, linux-kernel [-- Attachment #1: Type: text/plain, Size: 522 bytes --] On Fri, Mar 02, 2018 at 12:37:24AM +0100, Rasmus Villemoes wrote: > Simplify the code slightly by having seq_open_data do the ->private > assignment. > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > --- > drivers/pci/host/pci-tegra.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) I had to go hunt for patch 1/5 to be able to tell if this is indeed equivalent. It is, so: Reviewed-by: Thierry Reding <treding@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC 5/5] PCI: tegra: use seq_open_data 2018-03-02 10:42 ` Thierry Reding @ 2018-03-07 12:41 ` Lorenzo Pieralisi 0 siblings, 0 replies; 3+ messages in thread From: Lorenzo Pieralisi @ 2018-03-07 12:41 UTC (permalink / raw) To: Thierry Reding Cc: Rasmus Villemoes, Bjorn Helgaas, Jonathan Hunter, linux-tegra, linux-pci, linux-kernel On Fri, Mar 02, 2018 at 11:42:07AM +0100, Thierry Reding wrote: > On Fri, Mar 02, 2018 at 12:37:24AM +0100, Rasmus Villemoes wrote: > > Simplify the code slightly by having seq_open_data do the ->private > > assignment. > > > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > > --- > > drivers/pci/host/pci-tegra.c | 11 +---------- > > 1 file changed, 1 insertion(+), 10 deletions(-) > > I had to go hunt for patch 1/5 to be able to tell if this is indeed > equivalent. It is, so: > > Reviewed-by: Thierry Reding <treding@nvidia.com> > Acked-by: Thierry Reding <treding@nvidia.com> I can't apply this patch standalone so I assume this will go via some other tree; I will drop it from the PCI patch queue, if I should not please do let me know. Thanks, Lorenzo ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-07 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180301233724.20440-1-linux@rasmusvillemoes.dk>
2018-03-01 23:37 ` [RFC 5/5] PCI: tegra: use seq_open_data Rasmus Villemoes
2018-03-02 10:42 ` Thierry Reding
2018-03-07 12:41 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).