Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1585065yba; Thu, 9 May 2019 20:10:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuq/7rmGx72iwTrK44dbVh9aiJty0UuPc0x0YQQR9ndYHZQozrly4jAgQxTuy2uBcnW4PO X-Received: by 2002:a65:6496:: with SMTP id e22mr10582198pgv.249.1557457859696; Thu, 09 May 2019 20:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557457859; cv=none; d=google.com; s=arc-20160816; b=UrOvtxBJleqNwvgpRpPsivlWXYdEV2+agrwFS8W1g1SeyHgEEyh56SHvAaKpEoubdn EQZrkFv1Y0cxNS1crhng6Mk5+EBVHRK6d19teR6+jEY7YmA/OPGZSHqVSPVG+zgIwDQw Q3A3Jfn5BmJBWQ/7YdaWy9MRaXFmtAWUBWwD/SMI0QVNtBWgWzjwjFJ39fmwoG8dSkM4 DARLiWVUW5jrjaEK5gBVt07jN+hOyoDMesEeETNEoEHcwhHaIxnlsHEuzJduD7/49iVy ggPrTX/0FYwy2Mnfc+a1NBbrHRVHnKGAVpLfxzPIAdoNDUuYSzPYGTzSZ7r33QeiWzf0 e1BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6S/Dx4AsuA2UflvJMK4nT2pTeoakqnJzkNvBN0z1L9c=; b=qNZ8tdxll6e0qgs2mcpWJstUOWj7bkAKJzUTON5WlNGzrCARMOEWOy+hlejVu0+0z6 LAXaYRix6XUC5g8J8/dRJ8fctkJPNpwA7pbaSJFcmWKxVcTrLN4t1MkCoAwiblb7hL6A +3cIAaK/ABb0Tnk7IE8o8TNaou2vPkSZK2jfpGt3dmtIrzwHK8Kvdb54xaTQeTMJVehd nf4/HX0pmHeSzzhzY8+O2cxQpzA6luu0AINwas+xNcS60pRN2z4TLyy75JKzCr73r6i7 1omNdi0mG2AT6AeZAHboFEkwt9sBlw/7UwTKrHfR/VRqmJLHbITxeE/4sETCRwr4Ux9C gQGA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si5919879pgm.340.2019.05.09.20.10.43; Thu, 09 May 2019 20:10:59 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727018AbfEJCjz (ORCPT + 99 others); Thu, 9 May 2019 22:39:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:22061 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbfEJCjz (ORCPT ); Thu, 9 May 2019 22:39:55 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 19:39:54 -0700 X-ExtLoop1: 1 Received: from hao-dev.bj.intel.com (HELO localhost) ([10.238.157.65]) by orsmga008.jf.intel.com with ESMTP; 09 May 2019 19:39:52 -0700 Date: Fri, 10 May 2019 10:23:29 +0800 From: Wu Hao To: Alan Tull Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, Luwei Kang , Ananda Ravuri , Xu Yilun Subject: Re: [PATCH v2 17/18] fpga: dfl: fme: add global error reporting support Message-ID: <20190510022329.GA12617@hao-dev> References: <1556528151-17221-1-git-send-email-hao.wu@intel.com> <1556528151-17221-18-git-send-email-hao.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 09, 2019 at 11:27:36AM -0500, Alan Tull wrote: > On Mon, Apr 29, 2019 at 4:13 AM Wu Hao wrote: > > Hi Hao, > > The changes look good. There's one easy to fix thing that Greg has > pointed out recently on another patch (below). > > > > > This patch adds support for global error reporting for FPGA > > Management Engine (FME), it introduces sysfs interfaces to > > report different error detected by the hardware, and allow > > user to clear errors or inject error for testing purpose. > > > > Signed-off-by: Luwei Kang > > Signed-off-by: Ananda Ravuri > > Signed-off-by: Xu Yilun > > Signed-off-by: Wu Hao > > Acked-by: Alan Tull > > > --- > > v2: fix issues found in sysfs doc. > > fix returned error code issues for writable sysfs interfaces. > > (use -EINVAL if input doesn't match error code) > > reorder the sysfs groups in code. > > > +static ssize_t revision_show(struct device *dev, struct device_attribute *attr, > > + char *buf) > > +{ > > + struct device *err_dev = dev->parent; > > + void __iomem *base; > > + > > + base = dfl_get_feature_ioaddr_by_id(err_dev, FME_FEATURE_ID_GLOBAL_ERR); > > + > > + return scnprintf(buf, PAGE_SIZE, "%u\n", dfl_feature_revision(base)); > > Greg is discouraging use of scnprintf for sysfs attributes where it's > not needed [1]. > > Please fix this up the attributes added in this patchset. Besides > that, looks good, I added my Ack. Sure, will fix them in the next patchset. thanks a lot! Hao > > Alan > > > +} > > +static DEVICE_ATTR_RO(revision); > > [1] https://lkml.org/lkml/2019/4/25/1050