Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp653256imu; Mon, 5 Nov 2018 06:51:52 -0800 (PST) X-Google-Smtp-Source: AJdET5e1s67B0tGiRLCKzMHSssejD9sz8Lwgzw3bFxjjSMYA7cUhC+46DNjbSosbcF6Fwj4TfHSh X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr12450671plb.276.1541429512866; Mon, 05 Nov 2018 06:51:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541429512; cv=none; d=google.com; s=arc-20160816; b=MAx6Ffic5UcoNp9xSKK6RHIh07tiXsgQNA7kIcOzU+JDidQNn2dFNcZjdK4jjwJLUM vikRM7AxAtYxz7pcASFeibr1czPbUCiAdEl9PPYeKV3yT4rYKiuJNAG8O5eRax/KWW5j U3NlPhaCvhF9+Uk5Oq0UaZlQAqKfqcnYmYjhka8e6mGpmUQI/AyqvSfn+VeAF4L0EZrw zOPJaD2dHcrfJCMk48uvNPV4TKMQrNPZcnQWKfQ85IW+p8JkieUj8M0E3ur2cmGjSQ/A 9VumpYArCgyzpsiYdGgrk3XLM1xg67SgXIk3rZ2DXGrZxHBmns+POJX/MCPtUbHDfre8 N7nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=2B7uMq8TqOBuAo7vU8+IMU1kjMIN9Kqw1L+asdWIuHQ=; b=XnX0xG79cSpZg1VNf0mVq3iIII7obZVvxCDb/0TjQBGFFFyJ60oi8Kx/C8PfyFlNj7 c3vngEPF7sBk8bQ8vJ9Ej0UHfW2CsQ1X5uC1K5i16ys1ga2jPd9MTLOgAU/IF/Q5dvZh /+PdtfxOliCkRPB4ePkb1PmVqhK4LiluYpR+opzE4kOsIl7CRnd3QS8STKiUSVMmMZkC oL/oXFKvSI+I0QuIJ1+DXx9QJeIABnS8N54Wad7Jeme9UW+iGv2anirp7XzSYBFaLg2a TxWImCaZIJmSHOlcZx1wcQyx/3+XBchtnXtckonouk9H+jdnifpIHJ78BfKE9WhSJ8sD nWxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jhHXnwi5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z189-v6si46107574pfz.32.2018.11.05.06.51.37; Mon, 05 Nov 2018 06:51:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jhHXnwi5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729798AbeKFAK7 (ORCPT + 99 others); Mon, 5 Nov 2018 19:10:59 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41081 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbeKFAK7 (ORCPT ); Mon, 5 Nov 2018 19:10:59 -0500 Received: by mail-pf1-f194.google.com with SMTP id e22-v6so4536575pfn.8 for ; Mon, 05 Nov 2018 06:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2B7uMq8TqOBuAo7vU8+IMU1kjMIN9Kqw1L+asdWIuHQ=; b=jhHXnwi5N3/L7zBLT3i/y/rO8BSQ6O8PFmse5gtSTVsbMoUbT4PVUDiVzQ4ckcnEkB dcrpGyA3hilxNjRqYsReykOqJf+GFpgA3t9AzPOO+1GJDMVbu3UB0+S+WC95LaRFBvqK v5GCgaLm1L18Jk2KudnVwnmg9p52Sj6MypiRKh/Gy8saCceAeHGgn1kuzqB0HPm7JbEK jZZiXF55f/NUZGokNiiVPt3TrBUCUz6N5F86FObO04OTDqYGIjTti16LiXEheTzj+V1+ LO9zgsYTeaFpGoJMOpv0IvRsvwkJud2L79UnzoH/+rxrMriGiX0pehDXxSXyFQSCIB8r iVDg== 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; bh=2B7uMq8TqOBuAo7vU8+IMU1kjMIN9Kqw1L+asdWIuHQ=; b=dne4+/Au6M1bQ5gGgjQQibRKxkjCoKZR/6u7kwVBcySGZVp4gX8a87+6eamuyd+Au2 6dJycjFAnesimycBvdEXeCzDkLf1Aoz9HAsEmHi/aaSkCIblaZQ7CJot1Pd0kQAlnvia 1/RLBNacdpd0eH7IbV8yEfowswC8zU7RKxKMXwICrQrNUw92vS9/Ab9UHrNywvJkDprM 68i7uo5aMJJG18eiXOb99czKUfVLDXUA21Dpu0rZ/Wm/9eDHKFwuXwayXIPgogb1/hNN ylQlBl7KMGjPsot63Z5ghC8Q3Idt6SlNlepJNwnB3/xq3G7L/WVaIcaHT9ZstnwmfYlG 9Ejg== X-Gm-Message-State: AGRZ1gKErLDKUHwb/qx3nc/dEfQU3qMsBjBHHUFGsyLAO6GkUrkZi5Ji FE2tL1+oIS4FfosbDnCEGfA= X-Received: by 2002:a62:1693:: with SMTP id 141-v6mr22992293pfw.183.1541429454756; Mon, 05 Nov 2018 06:50:54 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id e204-v6sm8594336pfh.68.2018.11.05.06.50.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Nov 2018 06:50:54 -0800 (PST) From: Yangtao Li To: ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH] MIPS: math-emu: Change to use DEFINE_SHOW_ATTRIBUTE macro Date: Mon, 5 Nov 2018 09:50:49 -0500 Message-Id: <20181105145049.6336-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li --- arch/mips/math-emu/me-debugfs.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/mips/math-emu/me-debugfs.c b/arch/mips/math-emu/me-debugfs.c index 62566385ce0e..58798f527356 100644 --- a/arch/mips/math-emu/me-debugfs.c +++ b/arch/mips/math-emu/me-debugfs.c @@ -183,17 +183,7 @@ static int fpuemustats_clear_show(struct seq_file *s, void *unused) return 0; } -static int fpuemustats_clear_open(struct inode *inode, struct file *file) -{ - return single_open(file, fpuemustats_clear_show, inode->i_private); -} - -static const struct file_operations fpuemustats_clear_fops = { - .open = fpuemustats_clear_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(fpuemustats_clear); static int __init debugfs_fpuemu(void) { -- 2.17.0