mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] login: make some locally used functions static
@ 2015-10-30 12:55 Sergey Koshechkin
  2015-11-01  6:12 ` Antony Pavlov
  2015-11-02  6:59 ` Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Sergey Koshechkin @ 2015-10-30 12:55 UTC (permalink / raw)
  To: barebox; +Cc: tritel59

This patch continues cleanup password code from

  commit 40596b856f61c281fb34f804bf42550c099f26c3
  Author: Sascha Hauer <s.hauer@pengutronix.de>
  Date:   Thu Aug 27 15:58:50 2015 +0200

      login: cleanup password code

Signed-off-by: Sergey Koshechkin <tritel59@gmail.com>
---
 common/password.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/common/password.c b/common/password.c
index b5b7655..5b754d9 100644
--- a/common/password.c
+++ b/common/password.c
@@ -111,13 +111,12 @@ int password(unsigned char *passwd, size_t length, int flags, int timeout)
 }
 EXPORT_SYMBOL(password);
 
-int is_passwd_default_enable(void)
+static int is_passwd_default_enable(void)
 {
 	return strlen(default_passwd) > 0;
 }
-EXPORT_SYMBOL(is_passwd_default_enable);
 
-int is_passwd_env_enable(void)
+static int is_passwd_env_enable(void)
 {
 	int fd;
 
@@ -130,7 +129,6 @@ int is_passwd_env_enable(void)
 
 	return 1;
 }
-EXPORT_SYMBOL(is_passwd_env_enable);
 
 int passwd_env_disable(void)
 {
@@ -227,7 +225,7 @@ exit:
 }
 EXPORT_SYMBOL(read_env_passwd);
 
-int write_env_passwd(unsigned char *sum, size_t length)
+static int write_env_passwd(unsigned char *sum, size_t length)
 {
 	int fd;
 	unsigned char c;
@@ -274,7 +272,6 @@ exit:
 
 	return ret;
 }
-EXPORT_SYMBOL(write_env_passwd);
 
 static int check_passwd(unsigned char *passwd, size_t length)
 {
-- 
2.6.1


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] login: make some locally used functions static
  2015-10-30 12:55 [PATCH] login: make some locally used functions static Sergey Koshechkin
@ 2015-11-01  6:12 ` Antony Pavlov
  2015-11-02  7:06   ` Sascha Hauer
  2015-11-02  6:59 ` Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Antony Pavlov @ 2015-11-01  6:12 UTC (permalink / raw)
  To: Sergey Koshechkin; +Cc: barebox

On Fri, 30 Oct 2015 15:55:00 +0300
Sergey Koshechkin <tritel59@gmail.com> wrote:

> This patch continues cleanup password code from
> 
>   commit 40596b856f61c281fb34f804bf42550c099f26c3
>   Author: Sascha Hauer <s.hauer@pengutronix.de>
>   Date:   Thu Aug 27 15:58:50 2015 +0200
> 
>       login: cleanup password code


... and this patch fixes some 'no previous prototype' warnings:

common/password.c:114:5: warning: no previous prototype for ‘is_passwd_default_enable’ [-Wmissing-prototypes]
 int is_passwd_default_enable(void)
     ^
common/password.c:120:5: warning: no previous prototype for ‘is_passwd_env_enable’ [-Wmissing-prototypes]
 int is_passwd_env_enable(void)
     ^
common/password.c:230:5: warning: no previous prototype for ‘write_env_passwd’ [-Wmissing-prototypes]
 int write_env_passwd(unsigned char *sum, size_t length)
     ^

> 
> Signed-off-by: Sergey Koshechkin <tritel59@gmail.com>
> ---
>  common/password.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/common/password.c b/common/password.c
> index b5b7655..5b754d9 100644
> --- a/common/password.c
> +++ b/common/password.c
> @@ -111,13 +111,12 @@ int password(unsigned char *passwd, size_t length, int flags, int timeout)
>  }
>  EXPORT_SYMBOL(password);
>  
> -int is_passwd_default_enable(void)
> +static int is_passwd_default_enable(void)
>  {
>  	return strlen(default_passwd) > 0;
>  }
> -EXPORT_SYMBOL(is_passwd_default_enable);
>  
> -int is_passwd_env_enable(void)
> +static int is_passwd_env_enable(void)
>  {
>  	int fd;
>  
> @@ -130,7 +129,6 @@ int is_passwd_env_enable(void)
>  
>  	return 1;
>  }
> -EXPORT_SYMBOL(is_passwd_env_enable);
>  
>  int passwd_env_disable(void)
>  {
> @@ -227,7 +225,7 @@ exit:
>  }
>  EXPORT_SYMBOL(read_env_passwd);
>  
> -int write_env_passwd(unsigned char *sum, size_t length)
> +static int write_env_passwd(unsigned char *sum, size_t length)
>  {
>  	int fd;
>  	unsigned char c;
> @@ -274,7 +272,6 @@ exit:
>  
>  	return ret;
>  }
> -EXPORT_SYMBOL(write_env_passwd);
>  
>  static int check_passwd(unsigned char *passwd, size_t length)
>  {
> -- 
> 2.6.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] login: make some locally used functions static
  2015-10-30 12:55 [PATCH] login: make some locally used functions static Sergey Koshechkin
  2015-11-01  6:12 ` Antony Pavlov
@ 2015-11-02  6:59 ` Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-11-02  6:59 UTC (permalink / raw)
  To: Sergey Koshechkin; +Cc: barebox

On Fri, Oct 30, 2015 at 03:55:00PM +0300, Sergey Koshechkin wrote:
> This patch continues cleanup password code from
> 
>   commit 40596b856f61c281fb34f804bf42550c099f26c3
>   Author: Sascha Hauer <s.hauer@pengutronix.de>
>   Date:   Thu Aug 27 15:58:50 2015 +0200
> 
>       login: cleanup password code
> 
> Signed-off-by: Sergey Koshechkin <tritel59@gmail.com>

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] login: make some locally used functions static
  2015-11-01  6:12 ` Antony Pavlov
@ 2015-11-02  7:06   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-11-02  7:06 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox, Sergey Koshechkin

On Sun, Nov 01, 2015 at 09:12:58AM +0300, Antony Pavlov wrote:
> On Fri, 30 Oct 2015 15:55:00 +0300
> Sergey Koshechkin <tritel59@gmail.com> wrote:
> 
> > This patch continues cleanup password code from
> > 
> >   commit 40596b856f61c281fb34f804bf42550c099f26c3
> >   Author: Sascha Hauer <s.hauer@pengutronix.de>
> >   Date:   Thu Aug 27 15:58:50 2015 +0200
> > 
> >       login: cleanup password code
> 
> 
> ... and this patch fixes some 'no previous prototype' warnings:

Which by the way are only enabled on Mips. The other architectueres do
not enable -Wmissing-prototypes. I just tried setting this on Arm and
got many warnings. Maybe we should set this everywhere (in the toplevel
Makefile?). That would help fixing these earlier.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-02  7:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-30 12:55 [PATCH] login: make some locally used functions static Sergey Koshechkin
2015-11-01  6:12 ` Antony Pavlov
2015-11-02  7:06   ` Sascha Hauer
2015-11-02  6:59 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox