From: "Jan Beulich" Subject: Re: [PATCH V2] Decouple SnadyBridge quirk form VTd timeout Date: Mon, 17 Nov 2014 12:06:42 +0000 Message-ID: <5469F2E2020000780004862C@mail.emea.novell.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Dugger Cc: eddie.dong@intel.com, will.auld@intel.com, allen.m.kay@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 17.11.14 at 05:11, wrote: > @@ -237,6 +254,18 @@ > } > } > > +static void __init parse_snb_timeout(const char *s) > +{ > + > + if (*s == '\0') > + snb_igd_timeout = SNB_IGD_TIMEOUT; > + else > + snb_igd_timeout = MILLISECS(simple_strtoul(s, &s, 0)); > + snb_igd_quirk = 1; > + return; > +} > +custom_param("snb_igd_timeout", parse_snb_timeout); Rather than adding a new command line option, can't you simply re-use (by extending) the existing (boolean) one? And similarly replace the current variable (using a value of zero to indicate no quirk) rather than adding another one? Also note that the if() statement above needs spaces inserted to match our coding style. Jan