All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Jim Nelson <james4765@verizon.net>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] ip2: fix compile warnings
Date: Sun, 19 Dec 2004 15:08:06 +0100	[thread overview]
Message-ID: <20041219140805.GT21288@stusta.de> (raw)
In-Reply-To: <41C3A108.7080602@verizon.net>

On Fri, Dec 17, 2004 at 10:16:24PM -0500, Jim Nelson wrote:
> 
> How about doing something like this:
> 
> #ifdef ENABLE_DSSNOW
> #define DSSNOW_ENABLED 1
> #else
> #define DSSNOW_ENABLED 0
> #endif
> 
> -blah-
> 
> static int ip2_tiocmget(struct tty_struct *tty, struct file *file)
> {
> 	i2ChanStrPtr pCh = DevTable[tty->index];
> 
> 	if (pCh == NULL)
> 		return -ENODEV;
> 
> if (DSSNOW_ENABLED) {
> 	if (ip2_tiocmget_dssnow() == -EINTR) return -EINTR;
> 	}
> 
> 	return  ((pCh->dataSetOut & I2_RTS) ? TIOCM_RTS : 0)
> 	      | ((pCh->dataSetOut & I2_DTR) ? TIOCM_DTR : 0)
> 	      | ((pCh->dataSetIn  & I2_DCD) ? TIOCM_CAR : 0)
> 	      | ((pCh->dataSetIn  & I2_RI)  ? TIOCM_RNG : 0)
> 	      | ((pCh->dataSetIn  & I2_DSR) ? TIOCM_DSR : 0)
> 	      | ((pCh->dataSetIn  & I2_CTS) ? TIOCM_CTS : 0);
> }
> 
> /*
> 	FIXME - the following code is causing a NULL pointer dereference in
> 	2.3.51 in an interrupt handler.  It's suppose to prompt the board
> 	to return the DSS signal status immediately.  Why doesn't it do
> 	the same thing in 2.2.14?
> */
> 
> /*	This thing is still busted in the 1.2.12 driver on 2.4.x
> 	and even hoses the serial console so the oops can be trapped.
> 		/\/\|=mhw=|\/\/			*/
> 
> static int ip2_tiocmget_dssnow (void)
> {
>...

The real issue is the FIXME in the comment.

Such a patch would remove the warning but wouldn't fix the underlying 
real issue.

Fixing warnings is usually not a bad idea, but in this case I'd say the 
warning could stay until somebody fixes the real issue in the code.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


      reply	other threads:[~2004-12-19 14:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17 21:47 [PATCH] ip2: fix compile warnings james4765
2004-12-18  1:46 ` Randy.Dunlap
2004-12-18 13:17   ` Jim Nelson
2004-12-20  6:20     ` Randy.Dunlap
2004-12-18  2:14 ` Adrian Bunk
2004-12-18  3:16   ` Jim Nelson
2004-12-19 14:08     ` Adrian Bunk [this message]

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=20041219140805.GT21288@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=james4765@verizon.net \
    --cc=linux-kernel@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.