Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbKBHRr (ORCPT ); Mon, 2 Nov 2015 02:17:47 -0500 Received: from mga02.intel.com ([134.134.136.20]:29246 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069AbbKBHRm (ORCPT ); Mon, 2 Nov 2015 02:17:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,233,1444719600"; d="scan'208";a="809404863" From: "Kweh, Hock Leong" To: Borislav Petkov CC: Matt Fleming , Greg Kroah-Hartman , "Ong, Boon Leong" , LKML , "linux-efi@vger.kernel.org" , Sam Protsenko , Peter Jones , Andy Lutomirski , "Roy Franz" , James Bottomley , Linux FS Devel , "Fleming, Matt" , "Anvin, H Peter" Subject: RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware Thread-Topic: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware Thread-Index: AQHRFJBNC81W/lCPlUaMyOpZJhbG6Z6G+NDA//+ATICAAIi5gP//mPeAgAGpBIA= Date: Mon, 2 Nov 2015 07:17:28 +0000 Message-ID: References: <1446055138-26047-1-git-send-email-hock.leong.kweh@intel.com> <1446055138-26047-2-git-send-email-hock.leong.kweh@intel.com> <20151101102944.GA12711@pd.tnic> <20151101105801.GB12711@pd.tnic> <20151101125835.GC12711@pd.tnic> In-Reply-To: <20151101125835.GC12711@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tA27ITBF029809 Content-Length: 1004 Lines: 30 > -----Original Message----- > From: Borislav Petkov [mailto:bp@alien8.de] > Sent: Sunday, November 01, 2015 8:59 PM > > On Sun, Nov 01, 2015 at 11:11:23AM +0000, Kweh, Hock Leong wrote: > > Hmm .... If I combine these 2 flags to become one as > > "NO_MORE_WRITE_ACTION" to better describing the situation, you Okay > > with it? > > I don't understand, why combine? > > Why not simply make UPLOAD_DONE a positive value: > > #define UPLOAD_DONE 1 > #define ERR_OCCURRED -1 > > 0 would obviously mean, no errors occurred whatsoever. > Hi Boris, This is not a return value to indicate what is going now. It is a flag used in "cap_info->index" which positive value has a meaning of index number. I am using the negative value for the flag which similar to the implementation of pointer & error pointer (ERR_PTR). Thanks & Regards, Wilson ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?