lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/7] x86/boot: Convert early_serial_base to unsigned long
On Tue, Mar 19, 2019 at 09:43:19PM +0300, Andy Shevchenko wrote:
> As a preparatory of adding flexible serial I/O accessors, convert
> early_serial_base to unsigned long to cover all possible bus addresses
> on the system.
>
> No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> arch/x86/boot/boot.h | 2 +-
> arch/x86/boot/compressed/early_serial_console.c | 2 +-
> arch/x86/boot/compressed/misc.h | 4 ++--
> arch/x86/boot/early_serial_console.c | 6 +++---
> arch/x86/boot/tty.c | 2 +-
> 5 files changed, 8 insertions(+), 8 deletions(-)

...

> diff --git a/arch/x86/boot/early_serial_console.c b/arch/x86/boot/early_serial_console.c
> index 023bf1c3de8b..2b663beda582 100644
> --- a/arch/x86/boot/early_serial_console.c
> +++ b/arch/x86/boot/early_serial_console.c
> @@ -23,7 +23,7 @@
>
> #define DEFAULT_BAUD 9600
>
> -static void early_serial_init(int port, int baud)
> +static void early_serial_init(unsigned long port, int baud)
> {
> unsigned char c;
> unsigned divisor;
> @@ -48,7 +48,7 @@ static void parse_earlyprintk(void)
> int baud = DEFAULT_BAUD;
> char arg[32];
> int pos = 0;
> - int port = 0;
> + unsigned long port = 0;
>
> if (cmdline_find_option("earlyprintk", arg, sizeof(arg)) > 0) {
> char *e;
> @@ -118,7 +118,7 @@ static void parse_console_uart8250(void)
> {
> char optstr[64], *options;
> int baud = DEFAULT_BAUD;
> - int port = 0;
> + unsigned long port = 0;

Here and above:

Please sort function local variables declaration in a reverse christmas
tree order:

<type A> longest_variable_name;
<type B> shorter_var_name;
<type C> even_shorter;
<type D> i;

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2019-03-28 09:29    [W:0.147 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site