From: "Jan Beulich" Subject: Re: [PATCH for-4.5 V7 11/14] Add arch specific module handling to read_file() Date: Fri, 26 Sep 2014 07:25:56 +0100 Message-ID: <54252314020000780003963C@mail.emea.novell.com> References: <1411609352-24549-1-git-send-email-roy.franz@linaro.org> <1411609352-24549-12-git-send-email-roy.franz@linaro.org> <54240BEE0200007800038DE8@mail.emea.novell.com> 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: Roy Franz Cc: keir , Ian Campbell , tim , xen-devel , Stefano Stabellini , Fu Wei List-Id: xen-devel@lists.xenproject.org >>> On 26.09.14 at 02:25, wrote: > On Thu, Sep 25, 2014 at 11:52 AM, Roy Franz wrote: >> On Thu, Sep 25, 2014 at 9:44 AM, Roy Franz wrote: >>> On Thu, Sep 25, 2014 at 3:34 AM, Jan Beulich wrote: >>>>>>> On 25.09.14 at 03:42, wrote: >>>>> + place_string(&mb_modules[mbi.mods_count].string, options); >>>>> + place_string(&mb_modules[mbi.mods_count].string, ""); >>>> >>>> Hmm, this one's still here, and I don't recall having seen an >>>> explanation for it. I guess I need to cut off committing at this >>>> patch then... >>>> >> >> The original code put the entire line from the config file into the >> mb_modules[i].string field, >> which consists of the filename and module options, space separated. >> This was done at the >> same time the filename was extracted to pass to read_file(). >> >> My refactored version of read_file() takes a filename and option >> string as separate arguments, >> and then after the file is loaded and address known, the module info is > updated. >> The efi_arch_handle_module() gets the filename and options separately, >> and the above place_string() >> commands reconstruct the the single string of filename followed by >> options that is placed >> in the mb_modules[i].string field. >> >> I will add a comment to this effect, and also only add the options if >> present, since for >> several module types options will be NULL. >> > > Reviewing this in more detail, the line: > > place_string(&mb_modules[mbi.mods_count].string, ""); > > is not needed and has been removed. I have verified the same kernel > commandline > in dom0 (/proc/cmdline) before and after the change. Indeed, since if ( s && *s ) in place_string() made this a no-op. Jan