From patchwork Thu Mar 1 23:37:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 880174 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="GeKSBl0i"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zsplB130Nz9s7C for ; Fri, 2 Mar 2018 10:37:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163406AbeCAXhz (ORCPT ); Thu, 1 Mar 2018 18:37:55 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55663 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163400AbeCAXhg (ORCPT ); Thu, 1 Mar 2018 18:37:36 -0500 Received: by mail-wm0-f68.google.com with SMTP id q83so28747wme.5 for ; Thu, 01 Mar 2018 15:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2ffpOHtwERBTdpS172sbWW1WUrMUbc/yJAthfdT9Hk8=; b=GeKSBl0iCqGd9GRbg5Ed4c3GqKe0GxBfe79041aJFgBzdORuaKHU3ZxSGzfWFFK+EH 9GRoBT9thXkTR59qnWomv+i7GUbHtByzl7kwZXjKxr1dtBnnxaYEQVZEE7aWbqjKyOpL qT7bQfsGeUtdzsy2gjqQhEYBztaY7MOInu78s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2ffpOHtwERBTdpS172sbWW1WUrMUbc/yJAthfdT9Hk8=; b=I+7kdB5QTpDaTSr/F1rNEc3lYiHscEjyHFn0Wv+udk5w7p9Bcs8W/GsxXtMz2hqfHf 0Yiz4aAq9AudIjo2uEJBpIZjmP4Qcttr7reX4AMmiHVZ03CtNZ1KGIaE0/8BoTA/g+D4 cyjn5za5lVKkXYpcBJr+Bd6rjK62apPF6a79CK3o150Xa7mlZ6OsrNG4am3DB07SIzze A+UY3OtpTZLufcCtT5Qot3LcxIDZ3h5BpohWGlEikpMBSsHb+A2JuHu0BQzWw7FuClfe Oc3BVEbeiVsdEpmEF//KsH73dA35n8aP5oK4qolG597+HJiBzbsIt6kBhg3vg/rRC056 L9pg== X-Gm-Message-State: APf1xPCw2rhRCRopTDTn0KKzlrUKp/MDJQLjYzgubPjISTCKq+PPHcCX LubDMh+M1uJj0jQ/qyyWzxnzFQ== X-Google-Smtp-Source: AG47ELvzw/BtEZUCr2FfwMBWLDbglPXzek5+39m1Cyb4uqDfXFLkuqCqWUWoz6ZPi2xLEnqiRyOiww== X-Received: by 10.80.245.245 with SMTP id x50mr4750201edm.310.1519947455327; Thu, 01 Mar 2018 15:37:35 -0800 (PST) Received: from prevas-ravi.waoo.dk (dhcp-5-186-126-104.cgn.ip.fibianet.dk. [5.186.126.104]) by smtp.gmail.com with ESMTPSA id e12sm4088274edi.29.2018.03.01.15.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 15:37:34 -0800 (PST) From: Rasmus Villemoes To: Thierry Reding , Lorenzo Pieralisi , Bjorn Helgaas , Jonathan Hunter Cc: Rasmus Villemoes , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 5/5] PCI: tegra: use seq_open_data Date: Fri, 2 Mar 2018 00:37:24 +0100 Message-Id: <20180301233724.20440-5-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180301233724.20440-1-linux@rasmusvillemoes.dk> References: <20180301233724.20440-1-linux@rasmusvillemoes.dk> Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Simplify the code slightly by having seq_open_data do the ->private assignment. Signed-off-by: Rasmus Villemoes Reviewed-by: Thierry Reding Acked-by: Thierry Reding --- 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 = {