public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: Matthew Garrett <matthew.garrett@nebula.com>,
	"Fleming, Matt" <matt.fleming@intel.com>, joeyli <jlee@suse.com>,
	"rja@sgi.com" <rja@sgi.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"jkosina@suse.cz" <jkosina@suse.cz>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"oneukum@suse.de" <oneukum@suse.de>
Subject: Re: [PATCH] Modify UEFI anti-bricking code
Date: Wed, 05 Jun 2013 13:19:12 -0700	[thread overview]
Message-ID: <51AF9D40.60906@linux.intel.com> (raw)
In-Reply-To: <20130605155904.GC30420@console-pimps.org>

On 06/05/2013 08:59 AM, Matt Fleming wrote:
> +		 * There still isn't enough room, so return an error
> +		 */
> +		if (remaining_size - size < 5120)
> +			return EFI_OUT_OF_RESOURCES;
> +	}

Please don't open-code the constant 5120 in this case.  We may easily
run into a system which needs, say, 7K, and it is error-prone to just
replace numbers.

	-hpa



  parent reply	other threads:[~2013-06-05 20:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 20:06 [PATCH] Modify UEFI anti-bricking code Matthew Garrett
2013-06-02 15:48 ` Russ Anderson
2013-06-03 12:17 ` Matt Fleming
2013-06-03 14:58   ` Matthew Garrett
2013-06-03 16:13 ` joeyli
2013-06-03 16:31   ` Matthew Garrett
2013-06-04  3:35     ` joeyli
2013-06-05 14:49       ` Fleming, Matt
2013-06-05 14:53         ` Matthew Garrett
2013-06-05 15:59           ` Matt Fleming
2013-06-05 16:08             ` Matthew Garrett
2013-06-05 19:59               ` Matt Fleming
2013-06-06  2:24               ` joeyli
2013-06-05 20:19             ` H. Peter Anvin [this message]
2013-06-06  5:05             ` joeyli
2013-06-06  5:41               ` joeyli
2013-06-06  5:42               ` Matthew Garrett
2013-06-06  7:40                 ` joeyli
2013-06-06  9:25                   ` Matt Fleming
2013-06-06 14:48                     ` Russ Anderson
2013-06-06 15:00                       ` Matt Fleming
2013-06-06 15:28                         ` Russ Anderson
2013-06-10 18:54                     ` Russ Anderson
2013-06-04  5:29 ` Lingzhu Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51AF9D40.60906@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=jkosina@suse.cz \
    --cc=jlee@suse.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=matt@console-pimps.org \
    --cc=matthew.garrett@nebula.com \
    --cc=mingo@kernel.org \
    --cc=oneukum@suse.de \
    --cc=rja@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox