public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] small compile warning fix
@ 2001-10-29 16:13 Petr Vandrovec
  2001-10-30  4:23 ` Manik Raina
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vandrovec @ 2001-10-29 16:13 UTC (permalink / raw)
  To: Manik Raina; +Cc: linux-kernel

On 29 Oct 01 at 15:43, Manik Raina wrote:
> 
> Index: ncplib_kernel.c
> ===================================================================
> RCS file: /vger/linux/fs/ncpfs/ncplib_kernel.c,v
> retrieving revision 1.29
> diff -u -r1.29 ncplib_kernel.c
> --- ncplib_kernel.c 18 Sep 2001 22:29:08 -0000  1.29
> +++ ncplib_kernel.c 29 Oct 2001 10:09:27 -0000
> @@ -52,6 +52,11 @@
>     return;
>  }
> 
> +#ifdef LATER
> +/*
> + * This function is not currently in use. This leads to a compiler warning.
> + * Remove #ifdef when in use...
> + */
>  static void ncp_add_mem_fromfs(struct ncp_server *server, const char *source, int size)
>  {
>     assert_server_locked(server);

You can remove it completely. It should not be '#ifdef LATER', but
'#ifdef OLDVERSION'... ncp_add_mem_fromfs was invoked with lock on
ncp_server structure, but then it directly accessed userspace. It was
possible to use this to cause deadlock, so now ncpfs uses bounce buffers
and double copy instead of this.

I have some ncpfs patches, but I though that I'll leave them for 2.5.x.
Maybe it is time to change this decision.
                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [PATCH] small compile warning fix
@ 2001-10-30 21:21 Petr Vandrovec
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vandrovec @ 2001-10-30 21:21 UTC (permalink / raw)
  To: Manik Raina; +Cc: linux-kernel

> > You can remove it completely. It should not be '#ifdef LATER', but
> > '#ifdef OLDVERSION'... ncp_add_mem_fromfs was invoked with lock on
> > ncp_server structure, but then it directly accessed userspace. It was
> > possible to use this to cause deadlock, so now ncpfs uses bounce buffers
> > and double copy instead of this.
> >
> 
> would you include this in your patches or would you like me to make
> it #ifdef OLDVERSION ?

I removed ncp_add_mem_fromfs() from my tree...

> > I have some ncpfs patches, but I though that I'll leave them for 2.5.x.
> > Maybe it is time to change this decision.

... but as diff between my ncpfs and Alan's is about 30KB, I still did not
decide whether I'll send it for 2.4.x...
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                            

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] small compile warning fix
@ 2001-10-29 10:13 Manik Raina
  0 siblings, 0 replies; 4+ messages in thread
From: Manik Raina @ 2001-10-29 10:13 UTC (permalink / raw)
  To: linux-kernel, linware, alan

Hi,

ncplib_kernel.c defines ncp_add_mem_fromfs() but never
uses it, resulting in a compile warning. Here are the
diffs ...

thanks
Manik

Index: ncplib_kernel.c
===================================================================
RCS file: /vger/linux/fs/ncpfs/ncplib_kernel.c,v
retrieving revision 1.29
diff -u -r1.29 ncplib_kernel.c
--- ncplib_kernel.c	18 Sep 2001 22:29:08 -0000	1.29
+++ ncplib_kernel.c	29 Oct 2001 10:09:27 -0000
@@ -52,6 +52,11 @@
 	return;
 }

+#ifdef LATER
+/*
+ * This function is not currently in use. This leads to a compiler warning.
+ * Remove #ifdef when in use...
+ */
 static void ncp_add_mem_fromfs(struct ncp_server *server, const char *source, int size)
 {
 	assert_server_locked(server);
@@ -59,6 +64,7 @@
 	server->current_size += size;
 	return;
 }
+#endif

 static void ncp_add_pstring(struct ncp_server *server, const char *s)
 {


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

end of thread, other threads:[~2001-10-30 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-29 16:13 [PATCH] small compile warning fix Petr Vandrovec
2001-10-30  4:23 ` Manik Raina
  -- strict thread matches above, loose matches on Subject: below --
2001-10-30 21:21 Petr Vandrovec
2001-10-29 10:13 Manik Raina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox