Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1610509pxk; Fri, 18 Sep 2020 18:24:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcVJmb5Fjy49hnSIkc3u+NvfrRcQtHTPYDO2QNzGdDEoTfzBVa7c+VLPwE1qd+w2tzRj86 X-Received: by 2002:a17:906:cf85:: with SMTP id um5mr22699580ejb.479.1600478668971; Fri, 18 Sep 2020 18:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600478668; cv=none; d=google.com; s=arc-20160816; b=SzDKQOeL2AMeUMkVwhPm3Ky00Uoa4f9Naazq7rXve5Q92sp3CA4wBcOC3U/21Lgf5K SOBxgS+PCgEqdR9G8xImqPxmFK5SVbgNVB979bP2nQ/9uRVD4TJSA00tRvK/zrxTokMz TbYuBWCxb814tmKggbQ0OT2/gTc3MBtW3JTKrB8TW40Gt6AlDbuJ5yE32Jl8FJ1IxM+O qdzv6L7xN6l7TtyGA8NQYxqvtiFVvALIjQpTLrnDz3WZ5aU4Gnd8UAOUw/sKP+5OgBQV wUCSnh3JhbXnjad1utjnib/xUoXQ2+x4eTbOmg9GB6y4uOoGbNGfRKLgYhuvNbfJ5rbt kQSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=hxGwuXSEZHdevniupNFgXwS2oey9/V7TioM2Q3bppR8=; b=SXWHZjQmDwcgxii2f5PYKB8F6tOlKQG7tkyAmxhWApNTT37ZZpdp5ClUTr2ocrCsJ3 8roG99pEGw1FDdXNZkWvRVNj+KhUfPSkeQkTEwOPfkMTWbhgdA3xl4x6Xx46ObVOal6F rU2h1KpJPGdOgGeUYVShHkfaRoROgAolFG4P3PDAUrpOaCFc+ktDw1A4HAXo1Ckdqj6m UGpVomUHgdATre4QF4U29tvXSbLGCPO4fK9frnY/HQYxDBWN9ezsKVcVRZ1QjnZMIyjV +zxt3zE+yi7c7Phmo/u4ZBp3c9fOlMXXRn0qRhSk6nEnDoU2ixmCBKeIdohtHlji1leL y70Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi13si3432839ejb.490.2020.09.18.18.23.54; Fri, 18 Sep 2020 18:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbgISBVz (ORCPT + 99 others); Fri, 18 Sep 2020 21:21:55 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13311 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726009AbgISBVz (ORCPT ); Fri, 18 Sep 2020 21:21:55 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B05845E416AE71A14D3F; Sat, 19 Sep 2020 09:21:50 +0800 (CST) Received: from [10.174.179.91] (10.174.179.91) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Sat, 19 Sep 2020 09:21:47 +0800 Subject: Re: [PATCH -next] RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE To: Borislav Petkov CC: Greg Kroah-Hartman , Tony Luck , , References: <20200716085834.11484-1-miaoqinglang@huawei.com> <20200817103121.GF549@zn.tnic> From: miaoqinglang Message-ID: <9198adbd-4da7-7cdf-76a2-8b10b5f0f9d3@huawei.com> Date: Sat, 19 Sep 2020 09:21:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200817103121.GF549@zn.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.91] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/8/17 18:31, Borislav Petkov 写道: > On Thu, Jul 16, 2020 at 04:58:34PM +0800, Qinglang Miao wrote: >> From: Yongqiang Liu >> >> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. >> >> Signed-off-by: Yongqiang Liu >> --- >> drivers/ras/cec.c | 17 +++-------------- >> 1 file changed, 3 insertions(+), 14 deletions(-) >> >> diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c >> index a992bb426..ed47b59e4 100644 >> --- a/drivers/ras/cec.c >> +++ b/drivers/ras/cec.c >> @@ -435,7 +435,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(action_threshold_ops, u64_get, action_threshold_set, "% >> >> static const char * const bins[] = { "00", "01", "10", "11" }; >> >> -static int array_dump(struct seq_file *m, void *v) >> +static int array_show(struct seq_file *m, void *v) >> { >> struct ce_array *ca = &ce_arr; >> int i; >> @@ -467,18 +467,7 @@ static int array_dump(struct seq_file *m, void *v) >> return 0; >> } >> >> -static int array_open(struct inode *inode, struct file *filp) >> -{ >> - return single_open(filp, array_dump, NULL); >> -} >> - >> -static const struct file_operations array_ops = { >> - .owner = THIS_MODULE, >> - .open = array_open, >> - .read_iter = seq_read_iter, > > $ test-apply.sh /tmp/01-ras-cec-convert_to_define_show_attribute.patch > checking file drivers/ras/cec.c > Hunk #2 FAILED at 467. > 1 out of 3 hunks FAILED > Apply? (y/n) n > > Where did this .read_iter come from? > Hi Borislav, .read_iter come from <4d4901c6d7> which has been reverted in Linux-next. So I resent a new patch against linux-next(20200917), and it can be applied to mainline cleanly now. Thanks.