Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
57e60db3
Commit
57e60db3
authored
Aug 04, 2020
by
Petr Mladek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.9-console-return-codes' into for-linus
parents
30d497a0
6f2fdb29
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
arch/mips/fw/arc/arc_con.c
arch/mips/fw/arc/arc_con.c
+3
-1
drivers/tty/hvc/hvc_xen.c
drivers/tty/hvc/hvc_xen.c
+2
-2
drivers/tty/hvc/hvsi.c
drivers/tty/hvc/hvsi.c
+1
-1
drivers/tty/serial/sunsab.c
drivers/tty/serial/sunsab.c
+1
-1
drivers/tty/serial/sunzilog.c
drivers/tty/serial/sunzilog.c
+1
-1
kernel/printk/printk.c
kernel/printk/printk.c
+4
-4
No files found.
arch/mips/fw/arc/arc_con.c
View file @
57e60db3
...
@@ -28,7 +28,9 @@ static void prom_console_write(struct console *co, const char *s,
...
@@ -28,7 +28,9 @@ static void prom_console_write(struct console *co, const char *s,
static
int
prom_console_setup
(
struct
console
*
co
,
char
*
options
)
static
int
prom_console_setup
(
struct
console
*
co
,
char
*
options
)
{
{
return
!
(
prom_flags
&
PROM_FLAG_USE_AS_CONSOLE
);
if
(
prom_flags
&
PROM_FLAG_USE_AS_CONSOLE
)
return
0
;
return
-
ENODEV
;
}
}
static
struct
console
arc_cons
=
{
static
struct
console
arc_cons
=
{
...
...
drivers/tty/hvc/hvc_xen.c
View file @
57e60db3
...
@@ -603,7 +603,7 @@ static void xen_hvm_early_write(uint32_t vtermno, const char *str, int len) { }
...
@@ -603,7 +603,7 @@ static void xen_hvm_early_write(uint32_t vtermno, const char *str, int len) { }
#endif
#endif
#ifdef CONFIG_EARLY_PRINTK
#ifdef CONFIG_EARLY_PRINTK
static
int
__init
xenboot_
setup_console
(
struct
console
*
console
,
char
*
string
)
static
int
__init
xenboot_
console_setup
(
struct
console
*
console
,
char
*
string
)
{
{
static
struct
xencons_info
xenboot
;
static
struct
xencons_info
xenboot
;
...
@@ -647,7 +647,7 @@ static void xenboot_write_console(struct console *console, const char *string,
...
@@ -647,7 +647,7 @@ static void xenboot_write_console(struct console *console, const char *string,
struct
console
xenboot_console
=
{
struct
console
xenboot_console
=
{
.
name
=
"xenboot"
,
.
name
=
"xenboot"
,
.
write
=
xenboot_write_console
,
.
write
=
xenboot_write_console
,
.
setup
=
xenboot_
setup_console
,
.
setup
=
xenboot_
console_setup
,
.
flags
=
CON_PRINTBUFFER
|
CON_BOOT
|
CON_ANYTIME
,
.
flags
=
CON_PRINTBUFFER
|
CON_BOOT
|
CON_ANYTIME
,
.
index
=
-
1
,
.
index
=
-
1
,
};
};
...
...
drivers/tty/hvc/hvsi.c
View file @
57e60db3
...
@@ -1128,7 +1128,7 @@ static int __init hvsi_console_setup(struct console *console, char *options)
...
@@ -1128,7 +1128,7 @@ static int __init hvsi_console_setup(struct console *console, char *options)
int
ret
;
int
ret
;
if
(
console
->
index
<
0
||
console
->
index
>=
hvsi_count
)
if
(
console
->
index
<
0
||
console
->
index
>=
hvsi_count
)
return
-
1
;
return
-
EINVAL
;
hp
=
&
hvsi_ports
[
console
->
index
];
hp
=
&
hvsi_ports
[
console
->
index
];
/* give the FSP a chance to change the baud rate when we re-open */
/* give the FSP a chance to change the baud rate when we re-open */
...
...
drivers/tty/serial/sunsab.c
View file @
57e60db3
...
@@ -886,7 +886,7 @@ static int sunsab_console_setup(struct console *con, char *options)
...
@@ -886,7 +886,7 @@ static int sunsab_console_setup(struct console *con, char *options)
* though...
* though...
*/
*/
if
(
up
->
port
.
type
!=
PORT_SUNSAB
)
if
(
up
->
port
.
type
!=
PORT_SUNSAB
)
return
-
1
;
return
-
EINVAL
;
printk
(
"Console: ttyS%d (SAB82532)
\n
"
,
printk
(
"Console: ttyS%d (SAB82532)
\n
"
,
(
sunsab_reg
.
minor
-
64
)
+
con
->
index
);
(
sunsab_reg
.
minor
-
64
)
+
con
->
index
);
...
...
drivers/tty/serial/sunzilog.c
View file @
57e60db3
...
@@ -1221,7 +1221,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
...
@@ -1221,7 +1221,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
int
baud
,
brg
;
int
baud
,
brg
;
if
(
up
->
port
.
type
!=
PORT_SUNZILOG
)
if
(
up
->
port
.
type
!=
PORT_SUNZILOG
)
return
-
1
;
return
-
EINVAL
;
printk
(
KERN_INFO
"Console: ttyS%d (SunZilog zs%d)
\n
"
,
printk
(
KERN_INFO
"Console: ttyS%d (SunZilog zs%d)
\n
"
,
(
sunzilog_reg
.
minor
-
64
)
+
con
->
index
,
con
->
index
);
(
sunzilog_reg
.
minor
-
64
)
+
con
->
index
,
con
->
index
);
...
...
kernel/printk/printk.c
View file @
57e60db3
...
@@ -2676,7 +2676,7 @@ early_param("keep_bootcon", keep_bootcon_setup);
...
@@ -2676,7 +2676,7 @@ early_param("keep_bootcon", keep_bootcon_setup);
static
int
try_enable_new_console
(
struct
console
*
newcon
,
bool
user_specified
)
static
int
try_enable_new_console
(
struct
console
*
newcon
,
bool
user_specified
)
{
{
struct
console_cmdline
*
c
;
struct
console_cmdline
*
c
;
int
i
;
int
i
,
err
;
for
(
i
=
0
,
c
=
console_cmdline
;
for
(
i
=
0
,
c
=
console_cmdline
;
i
<
MAX_CMDLINECONSOLES
&&
c
->
name
[
0
];
i
<
MAX_CMDLINECONSOLES
&&
c
->
name
[
0
];
...
@@ -2699,8 +2699,8 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
...
@@ -2699,8 +2699,8 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
return
0
;
return
0
;
if
(
newcon
->
setup
&&
if
(
newcon
->
setup
&&
newcon
->
setup
(
newcon
,
c
->
options
)
!=
0
)
(
err
=
newcon
->
setup
(
newcon
,
c
->
options
)
)
!=
0
)
return
-
EIO
;
return
err
;
}
}
newcon
->
flags
|=
CON_ENABLED
;
newcon
->
flags
|=
CON_ENABLED
;
if
(
i
==
preferred_console
)
{
if
(
i
==
preferred_console
)
{
...
@@ -2713,7 +2713,7 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
...
@@ -2713,7 +2713,7 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
/*
/*
* Some consoles, such as pstore and netconsole, can be enabled even
* Some consoles, such as pstore and netconsole, can be enabled even
* without matching. Accept the pre-enabled consoles only when match()
* without matching. Accept the pre-enabled consoles only when match()
* and setup() had a chan
g
e to be called.
* and setup() had a chan
c
e to be called.
*/
*/
if
(
newcon
->
flags
&
CON_ENABLED
&&
c
->
user_specified
==
user_specified
)
if
(
newcon
->
flags
&
CON_ENABLED
&&
c
->
user_specified
==
user_specified
)
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment