public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nick Dyer <nick@shmanahar.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - change a char type to u8
Date: Tue, 30 May 2017 03:21:43 +0000	[thread overview]
Message-ID: <20170530032143.GG32841@dtor-ws> (raw)
In-Reply-To: <20170503212319.frj4k66dzezlleey@mwanda>

On Thu, May 04, 2017 at 12:23:19AM +0300, Dan Carpenter wrote:
> Smatch doesn't like when we use "%02X" to print char types because,
> what about if it's a negative?

Applied, thank you. Furthermore, I think we could reduce it to using %ph
instead of that loop.

> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/input/rmi4/rmi_f34v7.c b/drivers/input/rmi4/rmi_f34v7.c
> index 10c0d11b72c9..ae2db1c3aebf 100644
> --- a/drivers/input/rmi4/rmi_f34v7.c
> +++ b/drivers/input/rmi4/rmi_f34v7.c
> @@ -518,7 +518,7 @@ static int rmi_f34v7_read_queries(struct f34_data *f34)
>  			query_1_7.partition_support[1] & HAS_GUEST_CODE;
>  
>  	if (query_0 & HAS_CONFIG_ID) {
> -		char f34_ctrl[CONFIG_ID_SIZE];
> +		u8 f34_ctrl[CONFIG_ID_SIZE];
>  		int i = 0;
>  		u8 *p = f34->configuration_id;
>  		*p = '\0';

Thanks.

-- 
Dmitry

      reply	other threads:[~2017-05-30  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 21:23 [PATCH] Input: synaptics-rmi4 - change a char type to u8 Dan Carpenter
2017-05-30  3:21 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170530032143.GG32841@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=nick@shmanahar.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox