Re: [PATCH] unisys: staging: Check for s-Par firmware before initializing s-Par modules

From: Greg Kroah-Hartman
Date: Wed Apr 09 2014 - 15:24:46 EST


On Wed, Apr 09, 2014 at 02:04:50PM -0500, Romer, Benjamin M wrote:
> @@ -71,5 +71,6 @@
> u64 somethings, char *buf, size_t bufsize);
> struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size);
> void visor_seq_file_done_buffer(struct seq_file *m);
> +int is_spar_system( void );

That's a horrid function name to polute the global namespace, please be
more "unique".




>
> #endif
> diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
> index 8ea9c46..aa60ccb 100644
> --- a/drivers/staging/unisys/uislib/uislib.c
> +++ b/drivers/staging/unisys/uislib/uislib.c
> @@ -1,6 +1,6 @@
> /* uislib.c
> *
> - * Copyright ï 2010 - 2013 UNISYS CORPORATION
> + * Copyright  2010 - 2013 UNISYS CORPORATION
> * All rights reserved.
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -2276,6 +2276,11 @@
> static int __init
> uislib_mod_init(void)
> {
> + /* check for s-Par support */
> + if( !is_spar_system() ) {
> + printk( "s-Par not detected.\n" );
> + return -EPERM;
> + }

Always run your patches through scripts/checkpatch.pl so I don't reject
them for the things it points out...


thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/