All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@linux.ibm.com>
To: Philipp Rudo <prudo@redhat.com>
Cc: Alexander Egorenkov <egorenar@linux.ibm.com>, kexec@lists.infradead.org
Subject: Re: [PATCH 1/3] s390: add variable command line size
Date: Tue, 07 Dec 2021 17:06:58 +0100	[thread overview]
Message-ID: <yt9dwnkgpffh.fsf@linux.ibm.com> (raw)
In-Reply-To: <20211207152940.2f6536e6@rhtmp> (Philipp Rudo's message of "Tue,  7 Dec 2021 15:29:40 +0100")

Hi Philipp,

Philipp Rudo <prudo@redhat.com> writes:

>> diff --git a/kexec/arch/s390/kexec-image.c b/kexec/arch/s390/kexec-image.c
>> index 3c24fdfe3c7c..7747d02399db 100644
>> --- a/kexec/arch/s390/kexec-image.c
>> +++ b/kexec/arch/s390/kexec-image.c
>> @@ -25,7 +25,7 @@
>>  #include <fcntl.h>
>>  
>>  static uint64_t crash_base, crash_end;
>> -static char command_line[COMMAND_LINESIZE];
>> +static char *command_line;
>
> isn't this the perfect opportunity to get rid of this global variable
> and...
>
>>  static void add_segment_check(struct kexec_info *info, const void *buf,
>>  			      size_t bufsz, unsigned long base, size_t memsz)
>> @@ -38,11 +38,16 @@ static void add_segment_check(struct kexec_info *info, const void *buf,
>>  
>>  int command_line_add(const char *str)
>
> ... simply pass the pointer as an argument ;)

The reason for it being global is that command_line_add() might get
called multiple times. But yes, we could move that variable scope into
the calling function.

Thanks
Sven

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2021-12-07 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22  7:13 [PATCH 0/3] s390: add support for extended cmdline length Sven Schnelle
2021-11-22  7:13 ` [PATCH 1/3] s390: add variable command line size Sven Schnelle
2021-12-07 14:29   ` Philipp Rudo
2021-12-07 16:06     ` Sven Schnelle [this message]
2021-11-22  7:14 ` [PATCH 2/3] s390: use KEXEC_ALL_OPTIONS Sven Schnelle
2021-11-22  7:14 ` [PATCH 3/3] s390: add support for --reuse-cmdline Sven Schnelle
2021-12-07 14:34   ` Philipp Rudo
2021-12-07 16:12     ` Sven Schnelle

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=yt9dwnkgpffh.fsf@linux.ibm.com \
    --to=svens@linux.ibm.com \
    --cc=egorenar@linux.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=prudo@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.