All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] drivers/usb/misc/sisusbvga/sisusb.c: fix warning: 'assignment
Date: Tue, 06 Dec 2005 17:54:36 +0000	[thread overview]
Message-ID: <4395D05C.5070106@bfs.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

fix a warning 'assignment discards qualifiers' . also a bit cleanup.

sign-off-by: walter <wharms@bfs.de>


--- linux-2.6.14/drivers/usb/misc/sisusbvga/sisusb.c.bak	2005-12-03 
21:23:38.000000000 +0100
+++ linux-2.6.14/drivers/usb/misc/sisusbvga/sisusb.c	2005-12-03 
21:50:02.000000000 +0100
@@ -2440,7 +2440,7 @@
  sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init)
  {
  	int ret = 0, slot = sisusb->font_slot, i;
-	struct font_desc *myfont;
+	const struct font_desc *myfont;
  	u8 *tempbuf;
  	u16 *tempbufb;
  	size_t written;
@@ -2458,10 +2458,12 @@
  	/* Set mode 0x03 */
  	SiSUSBSetMode(sisusb->SiS_Pr, 0x03);

-	if (!(myfont = find_font("VGA8x16")))
+	myfont = find_font("VGA8x16");
+	if (!myfont)
  		return 1;

-	if (!(tempbuf = vmalloc(8192)))
+	tempbuf = vmalloc(8192);
+	if (!tempbuf)
  		return 1;

  	for (i = 0; i < 256; i++)

[-- Attachment #2: sisusb.c.diff --]
[-- Type: text/x-patch, Size: 844 bytes --]

fix a warning 'assignment discards qualifiers' . also a bit cleanup.

sign-off: walter <wharms@bfs.de>


--- linux-2.6.14/drivers/usb/misc/sisusbvga/sisusb.c.bak	2005-12-03 21:23:38.000000000 +0100
+++ linux-2.6.14/drivers/usb/misc/sisusbvga/sisusb.c	2005-12-03 21:50:02.000000000 +0100
@@ -2440,7 +2440,7 @@
 sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init)
 {
 	int ret = 0, slot = sisusb->font_slot, i;
-	struct font_desc *myfont;
+	const struct font_desc *myfont;
 	u8 *tempbuf;
 	u16 *tempbufb;
 	size_t written;
@@ -2458,10 +2458,12 @@
 	/* Set mode 0x03 */
 	SiSUSBSetMode(sisusb->SiS_Pr, 0x03);
 
-	if (!(myfont = find_font("VGA8x16")))
+	myfont = find_font("VGA8x16");
+	if (!myfont)
 		return 1;
 
-	if (!(tempbuf = vmalloc(8192)))
+	tempbuf = vmalloc(8192);
+	if (!tempbuf)
 		return 1;
 
 	for (i = 0; i < 256; i++)

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-12-06 17:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4395D05C.5070106@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.