From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by ozlabs.org (Postfix) with ESMTP id B613CDDEE7 for ; Wed, 4 Jun 2008 03:31:01 +1000 (EST) From: Arnd Bergmann To: linuxppc-dev@ozlabs.org Subject: Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped) Date: Tue, 3 Jun 2008 19:30:09 +0200 References: <200806031444.21945.borntraeger@de.ibm.com> <200806031449.14385.borntraeger@de.ibm.com> In-Reply-To: <200806031449.14385.borntraeger@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200806031930.09556.arnd@arndb.de> Cc: Christian Borntraeger , Jeremy Fitzhardinge , Rusty Russell , LKML , Virtualization Mailing List List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tuesday 03 June 2008, Christian Borntraeger wrote: > @@ -42,22 +42,48 @@ > */ > #define HVC_ALLOC_TTY_ADAPTERS 8 > > +struct hvc_struct { > + spinlock_t lock; > + int index; > + struct tty_struct *tty; > + unsigned int count; > + int do_wakeup; > + char *outbuf; > + int outbuf_size; > + int n_outbuf; > + uint32_t vtermno; > + struct hv_ops *ops; > + int data; > + struct list_head next; > + struct kref kref; /* ref count & hvc_struct lifetime */ > +}; > I don't see a reason to make this data structure known to other files, so why not leave it in hvc_console.c? > + > +#ifdef CONFIG_HVC_IRQ > +/* default notifier for irq based notification */ > +extern int notifier_add_irq(struct hvc_struct *hp, int irq); > +extern void notifier_del_irq(struct hvc_struct *hp, int irq); > +#endif > #endif // HVC_CONSOLE_H Please remove the #ifdef around the declarations. h Arnd <>< From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped) Date: Tue, 3 Jun 2008 19:30:09 +0200 Message-ID: <200806031930.09556.arnd@arndb.de> References: <200806031444.21945.borntraeger@de.ibm.com> <200806031449.14385.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200806031449.14385.borntraeger@de.ibm.com> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: linuxppc-dev@ozlabs.org Cc: Christian Borntraeger , Virtualization Mailing List , Jeremy Fitzhardinge , Rusty Russell , LKML List-Id: virtualization@lists.linuxfoundation.org On Tuesday 03 June 2008, Christian Borntraeger wrote: > @@ -42,22 +42,48 @@ > */ > #define HVC_ALLOC_TTY_ADAPTERS 8 > > +struct hvc_struct { > + spinlock_t lock; > + int index; > + struct tty_struct *tty; > + unsigned int count; > + int do_wakeup; > + char *outbuf; > + int outbuf_size; > + int n_outbuf; > + uint32_t vtermno; > + struct hv_ops *ops; > + int data; > + struct list_head next; > + struct kref kref; /* ref count & hvc_struct lifetime */ > +}; > I don't see a reason to make this data structure known to other files, so why not leave it in hvc_console.c? > + > +#ifdef CONFIG_HVC_IRQ > +/* default notifier for irq based notification */ > +extern int notifier_add_irq(struct hvc_struct *hp, int irq); > +extern void notifier_del_irq(struct hvc_struct *hp, int irq); > +#endif > #endif // HVC_CONSOLE_H Please remove the #ifdef around the declarations. h Arnd <><