lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <001301cf4308$dd78baf0$986a30d0$%han@samsung.com>
Date:	Wed, 19 Mar 2014 09:19:17 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Mark Brown' <broonie@...nel.org>
Cc:	'Liam Girdwood' <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org,
	'Bengt Jonsson' <bengt.g.jonsson@...ricsson.com>,
	'Jingoo Han' <jg1.han@...sung.com>,
	'Fengguang Wu' <fengguang.wu@...el.com>
Subject: Re: [PATCH 2/3] regulator: dbx500: use seq_puts() instead of
 seq_printf()

On Wednesday, February 26, 2014 10:21 AM, Jingoo Han wrote:
> 
> For a constant format without additional arguments, use seq_puts()
> instead of seq_printf(). Also, it fixes the following checkpatch
> warning.
> 
>   WARNING: Prefer seq_puts to seq_printf
> 
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> ---
>  drivers/regulator/dbx500-prcmu.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
> index f111dfb..3dd1096 100644
> --- a/drivers/regulator/dbx500-prcmu.c
> +++ b/drivers/regulator/dbx500-prcmu.c
> @@ -97,10 +97,10 @@ static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p)
>  	int err;
> 
>  	/* print power state count */
> -	err = seq_printf(s, "ux500-regulator power state count: %i\n",
> -		power_state_active_get());
> +	err = seq_puts(s, "ux500-regulator power state count: %i\n",
> +			power_state_active_get());

It makes build error with 'make ARCH=arm allmodconfig', as 
Fengguang Wu reported.

  drivers/regulator/dbx500-prcmu.c: In function 'ux500_regulator_power_state_cnt_print':
  drivers/regulator/dbx500-prcmu.c:103:4: error: too many arguments to function 'seq_puts'

So, I will send v2 patch. Sorry for annoying you.
Thank you.

Best regards,
Jingoo Han

>  	if (err < 0)
> -		dev_err(dev, "seq_printf overflow\n");
> +		dev_err(dev, "seq_puts overflow\n");
> 
>  	return 0;
>  }
> @@ -127,9 +127,9 @@ static int ux500_regulator_status_print(struct seq_file *s, void *p)
>  	int i;
> 
>  	/* print dump header */
> -	err = seq_printf(s, "ux500-regulator status:\n");
> +	err = seq_puts(s, "ux500-regulator status:\n");
>  	if (err < 0)
> -		dev_err(dev, "seq_printf overflow\n");
> +		dev_err(dev, "seq_puts overflow\n");
> 
>  	err = seq_printf(s, "%31s : %8s : %8s\n", "current",
>  		"before", "after");
> --
> 1.7.10.4


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ