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]
Date:	Wed, 06 Aug 2014 11:56:07 -0300
From:	Mauro Carvalho Chehab <m.chehab@...sung.com>
To:	Hans Wennborg <hans@...shq.net>
Cc:	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/15] [media] dvb: fix decimal printf format specifiers
 prefixed with 0x

Em Tue, 05 Aug 2014 21:42:17 -0700
Hans Wennborg <hans@...shq.net> escreveu:

> The prefix suggests the number should be printed in hex, so use
> the %x specifier to do that.
> 
> Found by using regex suggested by Joe Perches.
> 
> Signed-off-by: Hans Wennborg <hans@...shq.net>
> ---
>  drivers/media/dvb-frontends/mb86a16.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/dvb-frontends/mb86a16.c b/drivers/media/dvb-frontends/mb86a16.c
> index 9ae40ab..5939133 100644
> --- a/drivers/media/dvb-frontends/mb86a16.c
> +++ b/drivers/media/dvb-frontends/mb86a16.c
> @@ -115,7 +115,7 @@ static int mb86a16_read(struct mb86a16_state *state, u8 reg, u8 *val)
>  	};
>  	ret = i2c_transfer(state->i2c_adap, msg, 2);
>  	if (ret != 2) {
> -		dprintk(verbose, MB86A16_ERROR, 1, "read error(reg=0x%02x, ret=0x%i)",
> +		dprintk(verbose, MB86A16_ERROR, 1, "read error(reg=0x%02x, ret=0x%x)",
>  			reg, ret);

Hmm... returning it in hex doesn't make much sense. the better would
be to remove the "0x" prefix here...

>  
>  		return -EREMOTEIO;

Btw, what we're doing on modern drivers is to return the error
as reported by i2c_transfer if it is negative. So, the best would be
to do:
	if (ret < 0)
		return ret;
	return -EREMOTEIO;

Thanks,
Mauro
--
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