All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile warning
@ 2005-02-14 22:02 Stephen Biggs
  2005-02-14 22:51 ` [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile Alexey Dobriyan
  2005-02-15  6:40 ` Stephen Biggs
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Biggs @ 2005-02-14 22:02 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 2537 bytes --]

Description: compile warning cleanup - remove unmaintained rcs char 
strings from source and handle the occurrences of their use

Signed-off-by: Stephen Biggs <yrgrknmxpzlk@gawab.com>

diff -Nurdp -X dontdiff-osdl linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.c linux-2.6.11-rc3-mm2/drivers/telephony/ixj.c
--- linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.c	2005-02-12 12:06:25.000000000 +0200
+++ linux-2.6.11-rc3-mm2/drivers/telephony/ixj.c	2005-02-12 22:30:08.000000000 +0200
@@ -41,9 +41,6 @@
  *
  ***************************************************************************/
 
-static char ixj_c_rcsid[] = "$Id: ixj.c,v 4.7 2001/08/13 06:19:33 craigs Exp $";
-static char ixj_c_revision[] = "$Revision: 4.7 $";
-
 /*
  * $Log: ixj.c,v $
  *
@@ -6172,8 +6169,7 @@ static int ixj_ioctl(struct inode *inode
 		retval = j->serial;
 		break;
 	case IXJCTL_VERSION:
-		if (copy_to_user(argp, ixj_c_revision, strlen(ixj_c_revision))) 
-			retval = -EFAULT;
+		sprintf(argp, "\nDriver version %i.%i.%i", IXJ_VER_MAJOR, IXJ_VER_MINOR, IXJ_BLD_VER);
 		break;
 	case PHONE_RING_CADENCE:
 		j->ring_cadence = arg;
@@ -7168,9 +7164,6 @@ static int ixj_get_status_proc(char *buf
 	int cnt;
 	IXJ *j;
 	len = 0;
-	len += sprintf(buf + len, "%s", ixj_c_rcsid);
-	len += sprintf(buf + len, "\n%s", ixj_h_rcsid);
-	len += sprintf(buf + len, "\n%s", ixjuser_h_rcsid);
 	len += sprintf(buf + len, "\nDriver version %i.%i.%i", IXJ_VER_MAJOR, IXJ_VER_MINOR, IXJ_BLD_VER);
 	len += sprintf(buf + len, "\nsizeof IXJ struct %Zd bytes", sizeof(IXJ));
 	len += sprintf(buf + len, "\nsizeof DAA struct %Zd bytes", sizeof(DAA_REGS));
@@ -7790,7 +7783,7 @@ static int __init ixj_init(void)
 	if ((probe = ixj_probe_pci(&cnt)) < 0) {
 		return probe;
 	}
-	printk("%s\n", ixj_c_rcsid);
+	printk(KERN_INFO "ixj driver initialized.\n");
 	create_proc_read_entry ("ixj", 0, NULL, ixj_read_proc, NULL);
 	return probe;
 }
diff -Nurdp -X dontdiff-osdl linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.h linux-2.6.11-rc3-mm2/drivers/telephony/ixj.h
--- linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.h	2004-12-24 23:35:40.000000000 +0200
+++ linux-2.6.11-rc3-mm2/drivers/telephony/ixj.h	2005-02-12 22:11:46.000000000 +0200
@@ -38,8 +38,6 @@
  * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  *
  *****************************************************************************/
-static char ixj_h_rcsid[] = "$Id: ixj.h,v 4.1 2001/08/04 14:49:27 craigs Exp $";
-
 #define IXJ_VERSION 3031
 
 #include <linux/version.h>




[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile
  2005-02-14 22:02 [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile warning Stephen Biggs
@ 2005-02-14 22:51 ` Alexey Dobriyan
  2005-02-15  6:40 ` Stephen Biggs
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2005-02-14 22:51 UTC (permalink / raw)
  To: kernel-janitors

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

On Tuesday 15 February 2005 00:02, Stephen Biggs wrote:

> --- linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.c
> +++ linux-2.6.11-rc3-mm2/drivers/telephony/ixj.c

> -		if (copy_to_user(argp, ixj_c_revision, strlen(ixj_c_revision))) 
> -			retval = -EFAULT;
> +		sprintf(argp, "\nDriver version %i.%i.%i", IXJ_VER_MAJOR, IXJ_VER_MINOR, IXJ_BLD_VER);

argp is a userspace pointer. You _can't_ simply write to it.

	char tmpbuf[...];

	sprintf(tmpbuf, "version %i ...", MAJOR, ...);
	if (copy_to_user(argp, tmpbuf, ...))
		...

	Alexey

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile
  2005-02-14 22:02 [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile warning Stephen Biggs
  2005-02-14 22:51 ` [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile Alexey Dobriyan
@ 2005-02-15  6:40 ` Stephen Biggs
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Biggs @ 2005-02-15  6:40 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 728 bytes --]

On 15 Feb 2005 at 1:47, Alexey Dobriyan wrote:

> On Tuesday 15 February 2005 00:02, Stephen Biggs wrote:
> 
> > --- linux-2.6.11-rc3-mm2-original/drivers/telephony/ixj.c
> > +++ linux-2.6.11-rc3-mm2/drivers/telephony/ixj.c
> 
> > -		if (copy_to_user(argp, ixj_c_revision, strlen(ixj_c_revision))) 
> > -			retval = -EFAULT;
> > +		sprintf(argp, "\nDriver version %i.%i.%i", IXJ_VER_MAJOR, IXJ_VER_MINOR, IXJ_BLD_VER);
> 
> argp is a userspace pointer. You _can't_ simply write to it.

*** ARRGGH ***  Yes... I just simply screwed up on this one... sorry for 
the noise to the list!

> 
> 	char tmpbuf[...];
> 
> 	sprintf(tmpbuf, "version %i ...", MAJOR, ...);
> 	if (copy_to_user(argp, tmpbuf, ...))
> 		...
> 
> 	Alexey
> 




[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-15  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-14 22:02 [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile warning Stephen Biggs
2005-02-14 22:51 ` [KJ] [PATCH][RESUBMIT][14/21] drivers/telephony/* - compile Alexey Dobriyan
2005-02-15  6:40 ` Stephen Biggs

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.