From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbdLEESD (ORCPT ); Mon, 4 Dec 2017 23:18:03 -0500 Received: from mga11.intel.com ([192.55.52.93]:47418 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbdLEESA (ORCPT ); Mon, 4 Dec 2017 23:18:00 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,362,1508828400"; d="scan'208";a="13132284" Date: Tue, 5 Dec 2017 12:08:24 +0800 From: Wu Hao To: Alan Tull Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, "Kang, Luwei" , "Zhang, Yi Z" Subject: Re: [PATCH v3 03/21] fpga: mgr: add status for fpga-manager Message-ID: <20171205040824.GD19730@hao-dev> References: <1511764948-20972-1-git-send-email-hao.wu@intel.com> <1511764948-20972-4-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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 04, 2017 at 02:55:42PM -0600, Alan Tull wrote: > On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao wrote: > > Hi Hao, > > mgr->status isn't used anywhere except in status_show. So we don't > need to add status to the fpga_manager struct. Also don't need the > inline function to update it. Just read the status in status_show, if > that ops exists. If mops->status is NULL, return an error, as below. > This will simplify things and make sure that status_show gets status > that is not stale at all. Hi Alan You're right, this is much simpler. Will follow this to fix it in the next version. Thanks! Hao