public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Maxin B. John" <maxin.john@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@suse.de, paul.gortmaker@windriver.com, mikew@google.com,
	dlaurie@google.com, adurbin@google.com
Subject: [PATCH] firmware: google: fix gsmi.c build warning
Date: Thu, 1 Dec 2011 01:37:33 +0200	[thread overview]
Message-ID: <20111130233733.GA11577@maxin> (raw)

Use min_t() macro instead of min() to fix a build warning:

  CC      drivers/firmware/google/gsmi.o
drivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’:
drivers/firmware/google/gsmi.c:348: warning: comparison of distinct
pointer types lacks a cast

Signed-off-by: Maxin B. John <maxin.john@gmail.com>
---
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index c4e7c59..91ddf0f 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -345,7 +345,8 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name,
 		memcpy(&param, gsmi_dev.param_buf->start, sizeof(param));
 
 		/* The size reported is the min of all of our buffers */
-		*data_size = min(*data_size, gsmi_dev.data_buf->length);
+		*data_size = min_t(unsigned long, *data_size,
+						gsmi_dev.data_buf->length);
 		*data_size = min_t(unsigned long, *data_size, param.data_len);
 
 		/* Copy data back to return buffer. */

             reply	other threads:[~2011-11-30 23:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 23:37 Maxin B. John [this message]
2011-11-30 23:56 ` [PATCH] firmware: google: fix gsmi.c build warning Mike Waychison
2011-12-01  3:21   ` Greg KH
2011-12-01  6:07     ` Mike Waychison
2011-12-01 14:29       ` Maxin B John
2011-12-07 11:55         ` Maxin B John
2011-12-07 17:16           ` Greg KH

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=20111130233733.GA11577@maxin \
    --to=maxin.john@gmail.com \
    --cc=adurbin@google.com \
    --cc=dlaurie@google.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=paul.gortmaker@windriver.com \
    /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